diff --git a/.lock b/.lock new file mode 100644 index 0000000..e69de29 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/ba2/all.html b/ba2/all.html new file mode 100644 index 0000000..6821d55 --- /dev/null +++ b/ba2/all.html @@ -0,0 +1,2 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Aliases</a></li></ul></section></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.BStr.html">BStr</a></li><li><a href="struct.BString.html">BString</a></li><li><a href="struct.Borrowed.html">Borrowed</a></li><li><a href="struct.Copied.html">Copied</a></li><li><a href="fo4/struct.Archive.html">fo4::Archive</a></li><li><a href="fo4/struct.ArchiveKey.html">fo4::ArchiveKey</a></li><li><a href="fo4/struct.ArchiveOptions.html">fo4::ArchiveOptions</a></li><li><a href="fo4/struct.ArchiveOptionsBuilder.html">fo4::ArchiveOptionsBuilder</a></li><li><a href="fo4/struct.Chunk.html">fo4::Chunk</a></li><li><a href="fo4/struct.ChunkCompressionOptions.html">fo4::ChunkCompressionOptions</a></li><li><a href="fo4/struct.ChunkCompressionOptionsBuilder.html">fo4::ChunkCompressionOptionsBuilder</a></li><li><a href="fo4/struct.DX10Header.html">fo4::DX10Header</a></li><li><a href="fo4/struct.File.html">fo4::File</a></li><li><a href="fo4/struct.FileCapacityError.html">fo4::FileCapacityError</a></li><li><a href="fo4/struct.FileHash.html">fo4::FileHash</a></li><li><a href="fo4/struct.FileReadOptions.html">fo4::FileReadOptions</a></li><li><a href="fo4/struct.FileReadOptionsBuilder.html">fo4::FileReadOptionsBuilder</a></li><li><a href="fo4/struct.FileWriteOptions.html">fo4::FileWriteOptions</a></li><li><a href="fo4/struct.FileWriteOptionsBuilder.html">fo4::FileWriteOptionsBuilder</a></li><li><a href="fo4/struct.GNMFHeader.html">fo4::GNMFHeader</a></li><li><a href="fo4/struct.Hash.html">fo4::Hash</a></li><li><a href="tes3/struct.Archive.html">tes3::Archive</a></li><li><a href="tes3/struct.ArchiveKey.html">tes3::ArchiveKey</a></li><li><a href="tes3/struct.File.html">tes3::File</a></li><li><a href="tes3/struct.FileHash.html">tes3::FileHash</a></li><li><a href="tes3/struct.Hash.html">tes3::Hash</a></li><li><a href="tes4/struct.Archive.html">tes4::Archive</a></li><li><a href="tes4/struct.ArchiveFlags.html">tes4::ArchiveFlags</a></li><li><a href="tes4/struct.ArchiveKey.html">tes4::ArchiveKey</a></li><li><a href="tes4/struct.ArchiveOptions.html">tes4::ArchiveOptions</a></li><li><a href="tes4/struct.ArchiveOptionsBuilder.html">tes4::ArchiveOptionsBuilder</a></li><li><a href="tes4/struct.ArchiveTypes.html">tes4::ArchiveTypes</a></li><li><a href="tes4/struct.Directory.html">tes4::Directory</a></li><li><a href="tes4/struct.DirectoryHash.html">tes4::DirectoryHash</a></li><li><a href="tes4/struct.DirectoryKey.html">tes4::DirectoryKey</a></li><li><a href="tes4/struct.File.html">tes4::File</a></li><li><a href="tes4/struct.FileCompressionOptions.html">tes4::FileCompressionOptions</a></li><li><a href="tes4/struct.FileCompressionOptionsBuilder.html">tes4::FileCompressionOptionsBuilder</a></li><li><a href="tes4/struct.FileHash.html">tes4::FileHash</a></li><li><a href="tes4/struct.FileReadOptions.html">tes4::FileReadOptions</a></li><li><a href="tes4/struct.FileReadOptionsBuilder.html">tes4::FileReadOptionsBuilder</a></li><li><a href="tes4/struct.Hash.html">tes4::Hash</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="enum.CompressionResult.html">CompressionResult</a></li><li><a href="enum.FileFormat.html">FileFormat</a></li><li><a href="fo4/enum.CompressionFormat.html">fo4::CompressionFormat</a></li><li><a href="fo4/enum.CompressionLevel.html">fo4::CompressionLevel</a></li><li><a href="fo4/enum.Error.html">fo4::Error</a></li><li><a href="fo4/enum.FileHeader.html">fo4::FileHeader</a></li><li><a href="fo4/enum.Format.html">fo4::Format</a></li><li><a href="fo4/enum.Version.html">fo4::Version</a></li><li><a href="tes3/enum.Error.html">tes3::Error</a></li><li><a href="tes4/enum.CompressionCodec.html">tes4::CompressionCodec</a></li><li><a href="tes4/enum.Error.html">tes4::Error</a></li><li><a href="tes4/enum.Version.html">tes4::Version</a></li></ul><h3 id="traits">Traits</h3><ul class="all-items"><li><a href="trait.ByteSlice.html">ByteSlice</a></li><li><a href="trait.ByteVec.html">ByteVec</a></li><li><a href="trait.CompressableFrom.html">CompressableFrom</a></li><li><a href="trait.Reader.html">Reader</a></li><li><a href="trait.ReaderWithOptions.html">ReaderWithOptions</a></li></ul><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="fo4/fn.hash_file.html">fo4::hash_file</a></li><li><a href="fo4/fn.hash_file_in_place.html">fo4::hash_file_in_place</a></li><li><a href="fn.guess_format.html">guess_format</a></li><li><a href="tes3/fn.hash_file.html">tes3::hash_file</a></li><li><a href="tes3/fn.hash_file_in_place.html">tes3::hash_file_in_place</a></li><li><a href="tes4/fn.hash_directory.html">tes4::hash_directory</a></li><li><a href="tes4/fn.hash_directory_in_place.html">tes4::hash_directory_in_place</a></li><li><a href="tes4/fn.hash_file.html">tes4::hash_file</a></li><li><a href="tes4/fn.hash_file_in_place.html">tes4::hash_file_in_place</a></li></ul><h3 id="types">Type Aliases</h3><ul class="all-items"><li><a href="fo4/type.Result.html">fo4::Result</a></li><li><a href="tes3/type.Result.html">tes3::Result</a></li><li><a href="tes4/type.Result.html">tes4::Result</a></li></ul></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/enum.CompressionResult.html b/ba2/enum.CompressionResult.html new file mode 100644 index 0000000..a8c8a23 --- /dev/null +++ b/ba2/enum.CompressionResult.html @@ -0,0 +1,21 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Indicates whether the operation should finish by compressing the data or not."><title>CompressionResult in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">CompressionResult</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Compressed">Compressed</a></li><li><a href="#variant.Decompressed">Decompressed</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-CompressionResult">Clone</a></li><li><a href="#impl-Copy-for-CompressionResult">Copy</a></li><li><a href="#impl-Debug-for-CompressionResult">Debug</a></li><li><a href="#impl-Default-for-CompressionResult">Default</a></li><li><a href="#impl-Eq-for-CompressionResult">Eq</a></li><li><a href="#impl-PartialEq-for-CompressionResult">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-CompressionResult">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CompressionResult">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CompressionResult">Send</a></li><li><a href="#impl-Sync-for-CompressionResult">Sync</a></li><li><a href="#impl-Unpin-for-CompressionResult">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CompressionResult">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="index.html">ba2</a>::<wbr><a class="enum" href="#">CompressionResult</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/lib.rs.html#71-77">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub enum CompressionResult { + Compressed, + Decompressed, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Indicates whether the operation should finish by compressing the data or not.</p> +</div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Compressed" class="variant"><a href="#variant.Compressed" class="anchor">§</a><h3 class="code-header">Compressed</h3></section><div class="docblock"><p>The data will finish in a compressed state.</p> +</div><section id="variant.Decompressed" class="variant"><a href="#variant.Decompressed" class="anchor">§</a><h3 class="code-header">Decompressed</h3></section><div class="docblock"><p>The data will finish in a decompressed state.</p> +</div></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-CompressionResult" class="impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#impl-Clone-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CompressionResult" class="impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#impl-Debug-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-CompressionResult" class="impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#impl-Default-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-CompressionResult" class="impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#impl-PartialEq-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><section id="impl-Copy-for-CompressionResult" class="impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#impl-Copy-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section><section id="impl-Eq-for-CompressionResult" class="impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#impl-Eq-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section><section id="impl-StructuralPartialEq-for-CompressionResult" class="impl"><a class="src rightside" href="../src/ba2/lib.rs.html#70">source</a><a href="#impl-StructuralPartialEq-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CompressionResult" class="impl"><a href="#impl-RefUnwindSafe-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section><section id="impl-Send-for-CompressionResult" class="impl"><a href="#impl-Send-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section><section id="impl-Sync-for-CompressionResult" class="impl"><a href="#impl-Sync-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section><section id="impl-Unpin-for-CompressionResult" class="impl"><a href="#impl-Unpin-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section><section id="impl-UnwindSafe-for-CompressionResult" class="impl"><a href="#impl-UnwindSafe-for-CompressionResult" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/enum.FileFormat.html b/ba2/enum.FileFormat.html new file mode 100644 index 0000000..5526c9e --- /dev/null +++ b/ba2/enum.FileFormat.html @@ -0,0 +1,20 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The file format for a given archive."><title>FileFormat in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileFormat</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.FO4">FO4</a></li><li><a href="#variant.TES3">TES3</a></li><li><a href="#variant.TES4">TES4</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-FileFormat">Clone</a></li><li><a href="#impl-Copy-for-FileFormat">Copy</a></li><li><a href="#impl-Debug-for-FileFormat">Debug</a></li><li><a href="#impl-Eq-for-FileFormat">Eq</a></li><li><a href="#impl-PartialEq-for-FileFormat">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-FileFormat">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-FileFormat">RefUnwindSafe</a></li><li><a href="#impl-Send-for-FileFormat">Send</a></li><li><a href="#impl-Sync-for-FileFormat">Sync</a></li><li><a href="#impl-Unpin-for-FileFormat">Unpin</a></li><li><a href="#impl-UnwindSafe-for-FileFormat">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="index.html">ba2</a>::<wbr><a class="enum" href="#">FileFormat</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/guess.rs.html#7-11">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub enum FileFormat { + TES3, + TES4, + FO4, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The file format for a given archive.</p> +</div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.TES3" class="variant"><a href="#variant.TES3" class="anchor">§</a><h3 class="code-header">TES3</h3></section><section id="variant.TES4" class="variant"><a href="#variant.TES4" class="anchor">§</a><h3 class="code-header">TES4</h3></section><section id="variant.FO4" class="variant"><a href="#variant.FO4" class="anchor">§</a><h3 class="code-header">FO4</h3></section></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-FileFormat" class="impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#impl-Clone-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-FileFormat" class="impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#impl-Debug-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-FileFormat" class="impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#impl-PartialEq-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><section id="impl-Copy-for-FileFormat" class="impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#impl-Copy-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section><section id="impl-Eq-for-FileFormat" class="impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#impl-Eq-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section><section id="impl-StructuralPartialEq-for-FileFormat" class="impl"><a class="src rightside" href="../src/ba2/guess.rs.html#6">source</a><a href="#impl-StructuralPartialEq-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-FileFormat" class="impl"><a href="#impl-RefUnwindSafe-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section><section id="impl-Send-for-FileFormat" class="impl"><a href="#impl-Send-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section><section id="impl-Sync-for-FileFormat" class="impl"><a href="#impl-Sync-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section><section id="impl-Unpin-for-FileFormat" class="impl"><a href="#impl-Unpin-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section><section id="impl-UnwindSafe-for-FileFormat" class="impl"><a href="#impl-UnwindSafe-for-FileFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fn.guess_format.html b/ba2/fn.guess_format.html new file mode 100644 index 0000000..71b9ada --- /dev/null +++ b/ba2/fn.guess_format.html @@ -0,0 +1,5 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Guesses the archive format for a given source."><title>guess_format in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="index.html">ba2</a>::<wbr><a class="fn" href="#">guess_format</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/guess.rs.html#20-33">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn guess_format<In>(source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut In</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a>><div class="where">where + In: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html" title="trait std::io::Read">Read</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Guesses the archive format for a given source.</p> +<p>This function does not guarantee that the given source constitutes a well-formed archive of the deduced format. It merely remarks that if the file were a well-formed archive, it would be of the deduced format.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/archive/struct.Archive.html b/ba2/fo4/archive/struct.Archive.html new file mode 100644 index 0000000..2630c1d --- /dev/null +++ b/ba2/fo4/archive/struct.Archive.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.Archive.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.Archive.html">../../../ba2/fo4/struct.Archive.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.Archive.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/archive/struct.Key.html b/ba2/fo4/archive/struct.Key.html new file mode 100644 index 0000000..70bd1b0 --- /dev/null +++ b/ba2/fo4/archive/struct.Key.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.ArchiveKey.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.ArchiveKey.html">../../../ba2/fo4/struct.ArchiveKey.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.ArchiveKey.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/archive/struct.Options.html b/ba2/fo4/archive/struct.Options.html new file mode 100644 index 0000000..b61baf2 --- /dev/null +++ b/ba2/fo4/archive/struct.Options.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.ArchiveOptions.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.ArchiveOptions.html">../../../ba2/fo4/struct.ArchiveOptions.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.ArchiveOptions.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/archive/struct.OptionsBuilder.html b/ba2/fo4/archive/struct.OptionsBuilder.html new file mode 100644 index 0000000..e4f6aae --- /dev/null +++ b/ba2/fo4/archive/struct.OptionsBuilder.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.ArchiveOptionsBuilder.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.ArchiveOptionsBuilder.html">../../../ba2/fo4/struct.ArchiveOptionsBuilder.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.ArchiveOptionsBuilder.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/chunk/struct.Chunk.html b/ba2/fo4/chunk/struct.Chunk.html new file mode 100644 index 0000000..85610dd --- /dev/null +++ b/ba2/fo4/chunk/struct.Chunk.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.Chunk.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.Chunk.html">../../../ba2/fo4/struct.Chunk.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.Chunk.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/chunk/struct.CompressionOptions.html b/ba2/fo4/chunk/struct.CompressionOptions.html new file mode 100644 index 0000000..9c304d8 --- /dev/null +++ b/ba2/fo4/chunk/struct.CompressionOptions.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.ChunkCompressionOptions.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.ChunkCompressionOptions.html">../../../ba2/fo4/struct.ChunkCompressionOptions.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.ChunkCompressionOptions.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/chunk/struct.CompressionOptionsBuilder.html b/ba2/fo4/chunk/struct.CompressionOptionsBuilder.html new file mode 100644 index 0000000..8931e8f --- /dev/null +++ b/ba2/fo4/chunk/struct.CompressionOptionsBuilder.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.ChunkCompressionOptionsBuilder.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.ChunkCompressionOptionsBuilder.html">../../../ba2/fo4/struct.ChunkCompressionOptionsBuilder.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.ChunkCompressionOptionsBuilder.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/enum.CompressionFormat.html b/ba2/fo4/enum.CompressionFormat.html new file mode 100644 index 0000000..73c7d75 --- /dev/null +++ b/ba2/fo4/enum.CompressionFormat.html @@ -0,0 +1,22 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A list of all compression methods supported by the ba2 format."><title>CompressionFormat in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">CompressionFormat</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.LZ4">LZ4</a></li><li><a href="#variant.Zip">Zip</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-CompressionFormat">Clone</a></li><li><a href="#impl-Copy-for-CompressionFormat">Copy</a></li><li><a href="#impl-Debug-for-CompressionFormat">Debug</a></li><li><a href="#impl-Default-for-CompressionFormat">Default</a></li><li><a href="#impl-Eq-for-CompressionFormat">Eq</a></li><li><a href="#impl-PartialEq-for-CompressionFormat">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-CompressionFormat">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CompressionFormat">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CompressionFormat">Send</a></li><li><a href="#impl-Sync-for-CompressionFormat">Sync</a></li><li><a href="#impl-Unpin-for-CompressionFormat">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CompressionFormat">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="enum" href="#">CompressionFormat</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/mod.rs.html#136-145">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub enum CompressionFormat { + Zip, + LZ4, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A list of all compression methods supported by the ba2 format.</p> +</div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Zip" class="variant"><a href="#variant.Zip" class="anchor">§</a><h3 class="code-header">Zip</h3></section><div class="docblock"><p>The default compression format, compatible with all games that utilize the ba2 format.</p> +</div><section id="variant.LZ4" class="variant"><a href="#variant.LZ4" class="anchor">§</a><h3 class="code-header">LZ4</h3></section><div class="docblock"><p>A more specialized format leveraging lz4’s fast decompression to improve streaming time.</p> +<p>Only compatible with Starfield or later.</p> +</div></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-CompressionFormat" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#impl-Clone-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CompressionFormat" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#impl-Debug-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-CompressionFormat" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#impl-Default-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-CompressionFormat" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#impl-PartialEq-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><section id="impl-Copy-for-CompressionFormat" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#impl-Copy-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section><section id="impl-Eq-for-CompressionFormat" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#impl-Eq-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section><section id="impl-StructuralPartialEq-for-CompressionFormat" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#135">source</a><a href="#impl-StructuralPartialEq-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CompressionFormat" class="impl"><a href="#impl-RefUnwindSafe-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section><section id="impl-Send-for-CompressionFormat" class="impl"><a href="#impl-Send-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section><section id="impl-Sync-for-CompressionFormat" class="impl"><a href="#impl-Sync-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section><section id="impl-Unpin-for-CompressionFormat" class="impl"><a href="#impl-Unpin-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section><section id="impl-UnwindSafe-for-CompressionFormat" class="impl"><a href="#impl-UnwindSafe-for-CompressionFormat" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/enum.CompressionLevel.html b/ba2/fo4/enum.CompressionLevel.html new file mode 100644 index 0000000..9f61edd --- /dev/null +++ b/ba2/fo4/enum.CompressionLevel.html @@ -0,0 +1,27 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Specifies the compression level to use when compressing data."><title>CompressionLevel in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">CompressionLevel</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.FO4">FO4</a></li><li><a href="#variant.FO4Xbox">FO4Xbox</a></li><li><a href="#variant.SF">SF</a></li></ul><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.FO76">FO76</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-CompressionLevel">Clone</a></li><li><a href="#impl-Copy-for-CompressionLevel">Copy</a></li><li><a href="#impl-Debug-for-CompressionLevel">Debug</a></li><li><a href="#impl-Default-for-CompressionLevel">Default</a></li><li><a href="#impl-Eq-for-CompressionLevel">Eq</a></li><li><a href="#impl-PartialEq-for-CompressionLevel">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-CompressionLevel">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CompressionLevel">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CompressionLevel">Send</a></li><li><a href="#impl-Sync-for-CompressionLevel">Sync</a></li><li><a href="#impl-Unpin-for-CompressionLevel">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CompressionLevel">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="enum" href="#">CompressionLevel</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/mod.rs.html#151-165">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub enum CompressionLevel { + FO4, + FO4Xbox, + SF, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Specifies the compression level to use when compressing data.</p> +<p>Only compatible with <a href="enum.CompressionFormat.html#variant.Zip" title="variant ba2::fo4::CompressionFormat::Zip"><code>CompressionFormat::Zip</code></a>.</p> +</div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.FO4" class="variant"><a href="#variant.FO4" class="anchor">§</a><h3 class="code-header">FO4</h3></section><div class="docblock"><p>Fallout 4.</p> +</div><section id="variant.FO4Xbox" class="variant"><a href="#variant.FO4Xbox" class="anchor">§</a><h3 class="code-header">FO4Xbox</h3></section><div class="docblock"><p>Fallout 4 on the xbox.</p> +<p>Uses a smaller windows size, but higher a compression level to yield a higher compression ratio.</p> +</div><section id="variant.SF" class="variant"><a href="#variant.SF" class="anchor">§</a><h3 class="code-header">SF</h3></section><div class="docblock"><p>Starfield.</p> +<p>Uses a custom DEFLATE algorithm with zlib wrapper to obtain a good compression ratio.</p> +</div></div><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CompressionLevel" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#167-170">source</a><a href="#impl-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.FO76" class="associatedconstant"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#169">source</a><h4 class="code-header">pub const <a href="#associatedconstant.FO76" class="constant">FO76</a>: Self = Self::FO4</h4></section></summary><div class="docblock"><p>Fallout 76.</p> +</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-CompressionLevel" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#impl-Clone-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CompressionLevel" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#impl-Debug-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-CompressionLevel" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#impl-Default-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-CompressionLevel" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#impl-PartialEq-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><section id="impl-Copy-for-CompressionLevel" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#impl-Copy-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section><section id="impl-Eq-for-CompressionLevel" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#impl-Eq-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section><section id="impl-StructuralPartialEq-for-CompressionLevel" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#150">source</a><a href="#impl-StructuralPartialEq-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CompressionLevel" class="impl"><a href="#impl-RefUnwindSafe-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section><section id="impl-Send-for-CompressionLevel" class="impl"><a href="#impl-Send-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section><section id="impl-Sync-for-CompressionLevel" class="impl"><a href="#impl-Sync-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section><section id="impl-Unpin-for-CompressionLevel" class="impl"><a href="#impl-Unpin-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section><section id="impl-UnwindSafe-for-CompressionLevel" class="impl"><a href="#impl-UnwindSafe-for-CompressionLevel" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/enum.Error.html b/ba2/fo4/enum.Error.html new file mode 100644 index 0000000..30506ea --- /dev/null +++ b/ba2/fo4/enum.Error.html @@ -0,0 +1,32 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Error` enum in crate `ba2`."><title>Error in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Error</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.AlreadyCompressed">AlreadyCompressed</a></li><li><a href="#variant.AlreadyDecompressed">AlreadyDecompressed</a></li><li><a href="#variant.DX10">DX10</a></li><li><a href="#variant.DecompressionSizeMismatch">DecompressionSizeMismatch</a></li><li><a href="#variant.FormatMismatch">FormatMismatch</a></li><li><a href="#variant.IntegralOverflow">IntegralOverflow</a></li><li><a href="#variant.IntegralTruncation">IntegralTruncation</a></li><li><a href="#variant.InvalidChunkSentinel">InvalidChunkSentinel</a></li><li><a href="#variant.InvalidChunkSize">InvalidChunkSize</a></li><li><a href="#variant.InvalidFormat">InvalidFormat</a></li><li><a href="#variant.InvalidMagic">InvalidMagic</a></li><li><a href="#variant.InvalidVersion">InvalidVersion</a></li><li><a href="#variant.Io">Io</a></li><li><a href="#variant.LZ4">LZ4</a></li><li><a href="#variant.NotImplemented">NotImplemented</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-Error">Debug</a></li><li><a href="#impl-Display-for-Error">Display</a></li><li><a href="#impl-Error-for-Error">Error</a></li><li><a href="#impl-From%3CError%3E-for-Error">From<Error></a></li><li><a href="#impl-From%3CError%3E-for-Error-1">From<Error></a></li><li><a href="#impl-From%3CHResultError%3E-for-Error">From<HResultError></a></li><li><a href="#impl-From%3CTryFromIntError%3E-for-Error">From<TryFromIntError></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Error">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-Error">!UnwindSafe</a></li><li><a href="#impl-Send-for-Error">Send</a></li><li><a href="#impl-Sync-for-Error">Sync</a></li><li><a href="#impl-Unpin-for-Error">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToString-for-T">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="enum" href="#">Error</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/mod.rs.html#79-124">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code><div class="code-attribute">#[non_exhaustive]</div>pub enum Error { +<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 15 variants</span></summary> AlreadyCompressed, + AlreadyDecompressed, + DecompressionSizeMismatch { + expected: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + actual: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + }, + DX10(HResultError), + FormatMismatch, + IntegralOverflow, + IntegralTruncation, + InvalidChunkSentinel(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>), + InvalidChunkSize(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>), + InvalidFormat(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>), + InvalidMagic(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>), + InvalidVersion(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>), + Io(<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>), + LZ4(Error), + NotImplemented, +</details>}</code></pre><h2 id="variants" class="variants section-header">Variants (Non-exhaustive)<a href="#variants" class="anchor">§</a></h2><details class="toggle non-exhaustive"><summary class="hideme"><span>This enum is marked as non-exhaustive</span></summary><div class="docblock">Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.</div></details><div class="variants"><section id="variant.AlreadyCompressed" class="variant"><a href="#variant.AlreadyCompressed" class="anchor">§</a><h3 class="code-header">AlreadyCompressed</h3></section><section id="variant.AlreadyDecompressed" class="variant"><a href="#variant.AlreadyDecompressed" class="anchor">§</a><h3 class="code-header">AlreadyDecompressed</h3></section><section id="variant.DecompressionSizeMismatch" class="variant"><a href="#variant.DecompressionSizeMismatch" class="anchor">§</a><h3 class="code-header">DecompressionSizeMismatch</h3></section><div class="sub-variant" id="variant.DecompressionSizeMismatch.fields"><h4>Fields</h4><div class="sub-variant-field"><span id="variant.DecompressionSizeMismatch.field.expected" class="section-header"><a href="#variant.DecompressionSizeMismatch.field.expected" class="anchor field">§</a><code>expected: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></code></span></div><div class="sub-variant-field"><span id="variant.DecompressionSizeMismatch.field.actual" class="section-header"><a href="#variant.DecompressionSizeMismatch.field.actual" class="anchor field">§</a><code>actual: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></code></span></div></div><section id="variant.DX10" class="variant"><a href="#variant.DX10" class="anchor">§</a><h3 class="code-header">DX10(HResultError)</h3></section><section id="variant.FormatMismatch" class="variant"><a href="#variant.FormatMismatch" class="anchor">§</a><h3 class="code-header">FormatMismatch</h3></section><section id="variant.IntegralOverflow" class="variant"><a href="#variant.IntegralOverflow" class="anchor">§</a><h3 class="code-header">IntegralOverflow</h3></section><section id="variant.IntegralTruncation" class="variant"><a href="#variant.IntegralTruncation" class="anchor">§</a><h3 class="code-header">IntegralTruncation</h3></section><section id="variant.InvalidChunkSentinel" class="variant"><a href="#variant.InvalidChunkSentinel" class="anchor">§</a><h3 class="code-header">InvalidChunkSentinel(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>)</h3></section><section id="variant.InvalidChunkSize" class="variant"><a href="#variant.InvalidChunkSize" class="anchor">§</a><h3 class="code-header">InvalidChunkSize(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>)</h3></section><section id="variant.InvalidFormat" class="variant"><a href="#variant.InvalidFormat" class="anchor">§</a><h3 class="code-header">InvalidFormat(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>)</h3></section><section id="variant.InvalidMagic" class="variant"><a href="#variant.InvalidMagic" class="anchor">§</a><h3 class="code-header">InvalidMagic(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>)</h3></section><section id="variant.InvalidVersion" class="variant"><a href="#variant.InvalidVersion" class="anchor">§</a><h3 class="code-header">InvalidVersion(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>)</h3></section><section id="variant.Io" class="variant"><a href="#variant.Io" class="anchor">§</a><h3 class="code-header">Io(<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>)</h3></section><section id="variant.LZ4" class="variant"><a href="#variant.LZ4" class="anchor">§</a><h3 class="code-header">LZ4(Error)</h3></section><section id="variant.NotImplemented" class="variant"><a href="#variant.NotImplemented" class="anchor">§</a><h3 class="code-header">NotImplemented</h3></section></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#impl-Debug-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#impl-Display-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&self, __formatter: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Error-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#impl-Error-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.source" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#method.source" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.source" class="fn">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)></h4></section></summary><div class='docblock'>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.source">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.description" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#110">source</a></span><a href="#method.description" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.description" class="fn">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.42.0: use the Display impl or to_string()</span></div></span><div class='docblock'> <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.description">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.cause" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#120">source</a></span><a href="#method.cause" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.cause" class="fn">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.33.0: replaced by Error::source, which can support downcasting</span></div></span></details><details class="toggle method-toggle" open><summary><section id="method.provide" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#184">source</a><a href="#method.provide" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.provide" class="fn">provide</a><'a>(&'a self, request: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/error/struct.Request.html" title="struct core::error::Request">Request</a><'a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>error_generic_member_access</code>)</span></div></span><div class='docblock'>Provides type based access to context intended for error reports. <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.provide">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CError%3E-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#impl-From%3CError%3E-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(source: <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CError%3E-for-Error-1" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#impl-From%3CError%3E-for-Error-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><Error> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(source: Error) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHResultError%3E-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#impl-From%3CHResultError%3E-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><HResultError> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#78">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(source: HResultError) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CTryFromIntError%3E-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#126-130">source</a><a href="#impl-From%3CTryFromIntError%3E-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html" title="struct core::num::error::TryFromIntError">TryFromIntError</a>> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#127-129">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(_: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html" title="struct core::num::error::TryFromIntError">TryFromIntError</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Error" class="impl"><a href="#impl-RefUnwindSafe-for-Error" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section><section id="impl-Send-for-Error" class="impl"><a href="#impl-Send-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section><section id="impl-Sync-for-Error" class="impl"><a href="#impl-Sync-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section><section id="impl-Unpin-for-Error" class="impl"><a href="#impl-Unpin-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section><section id="impl-UnwindSafe-for-Error" class="impl"><a href="#impl-UnwindSafe-for-Error" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2600">source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2606">source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/enum.FileHeader.html b/ba2/fo4/enum.FileHeader.html new file mode 100644 index 0000000..647a8bf --- /dev/null +++ b/ba2/fo4/enum.FileHeader.html @@ -0,0 +1,21 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Optionally present file header."><title>FileHeader in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileHeader</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.DX10">DX10</a></li><li><a href="#variant.GNMF">GNMF</a></li><li><a href="#variant.GNRL">GNRL</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Header">Clone</a></li><li><a href="#impl-Debug-for-Header">Debug</a></li><li><a href="#impl-Default-for-Header">Default</a></li><li><a href="#impl-Eq-for-Header">Eq</a></li><li><a href="#impl-From%3CDX10%3E-for-Header">From<DX10></a></li><li><a href="#impl-From%3CGNMF%3E-for-Header">From<GNMF></a></li><li><a href="#impl-PartialEq-for-Header">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-Header">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Header">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Header">Send</a></li><li><a href="#impl-Sync-for-Header">Sync</a></li><li><a href="#impl-Unpin-for-Header">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Header">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="enum" href="#">FileHeader</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#896-901">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub enum FileHeader { + GNRL, + DX10(<a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a>), + GNMF(<a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>), +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Optionally present file header.</p> +<p>The header variant must match the archive <a href="enum.Format.html" title="enum ba2::fo4::Format"><code>Format</code></a> when writing.</p> +</div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.GNRL" class="variant"><a href="#variant.GNRL" class="anchor">§</a><h3 class="code-header">GNRL</h3></section><section id="variant.DX10" class="variant"><a href="#variant.DX10" class="anchor">§</a><h3 class="code-header">DX10(<a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a>)</h3></section><section id="variant.GNMF" class="variant"><a href="#variant.GNMF" class="anchor">§</a><h3 class="code-header">GNMF(<a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>)</h3></section></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#impl-Clone-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#impl-Debug-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#impl-Default-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CDX10%3E-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#903-907">source</a><a href="#impl-From%3CDX10%3E-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a>> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#904-906">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CGNMF%3E-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#909-913">source</a><a href="#impl-From%3CGNMF%3E-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#910-912">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#impl-PartialEq-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><section id="impl-Eq-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#impl-Eq-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section><section id="impl-StructuralPartialEq-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#895">source</a><a href="#impl-StructuralPartialEq-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Header" class="impl"><a href="#impl-RefUnwindSafe-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section><section id="impl-Send-for-Header" class="impl"><a href="#impl-Send-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section><section id="impl-Sync-for-Header" class="impl"><a href="#impl-Sync-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section><section id="impl-Unpin-for-Header" class="impl"><a href="#impl-Unpin-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section><section id="impl-UnwindSafe-for-Header" class="impl"><a href="#impl-UnwindSafe-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/enum.Format.html b/ba2/fo4/enum.Format.html new file mode 100644 index 0000000..8747506 --- /dev/null +++ b/ba2/fo4/enum.Format.html @@ -0,0 +1,23 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents the file format for an archive."><title>Format in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Format</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.DX10">DX10</a></li><li><a href="#variant.GNMF">GNMF</a></li><li><a href="#variant.GNRL">GNRL</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Format">Clone</a></li><li><a href="#impl-Copy-for-Format">Copy</a></li><li><a href="#impl-Debug-for-Format">Debug</a></li><li><a href="#impl-Default-for-Format">Default</a></li><li><a href="#impl-Eq-for-Format">Eq</a></li><li><a href="#impl-PartialEq-for-Format">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-Format">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Format">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Format">Send</a></li><li><a href="#impl-Sync-for-Format">Sync</a></li><li><a href="#impl-Unpin-for-Format">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Format">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="enum" href="#">Format</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/mod.rs.html#174-184">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub enum Format { + GNRL, + DX10, + GNMF, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents the file format for an archive.</p> +</div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.GNRL" class="variant"><a href="#variant.GNRL" class="anchor">§</a><h3 class="code-header">GNRL</h3></section><div class="docblock"><p>A GNRL archive can contain any kind of file.</p> +</div><section id="variant.DX10" class="variant"><a href="#variant.DX10" class="anchor">§</a><h3 class="code-header">DX10</h3></section><div class="docblock"><p>A DX10 archive can only contain .dds files (Microsoft DirectX).</p> +</div><section id="variant.GNMF" class="variant"><a href="#variant.GNMF" class="anchor">§</a><h3 class="code-header">GNMF</h3></section><div class="docblock"><p>A GNMF archive can only contain .gnf files (Sony GNM).</p> +</div></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Format" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#impl-Clone-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Format" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#impl-Debug-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Format" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#impl-Default-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Format" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#impl-PartialEq-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><section id="impl-Copy-for-Format" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#impl-Copy-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section><section id="impl-Eq-for-Format" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#impl-Eq-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section><section id="impl-StructuralPartialEq-for-Format" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#173">source</a><a href="#impl-StructuralPartialEq-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Format" class="impl"><a href="#impl-RefUnwindSafe-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section><section id="impl-Send-for-Format" class="impl"><a href="#impl-Send-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section><section id="impl-Sync-for-Format" class="impl"><a href="#impl-Sync-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section><section id="impl-Unpin-for-Format" class="impl"><a href="#impl-Unpin-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section><section id="impl-UnwindSafe-for-Format" class="impl"><a href="#impl-UnwindSafe-for-Format" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/enum.Version.html b/ba2/fo4/enum.Version.html new file mode 100644 index 0000000..17e2814 --- /dev/null +++ b/ba2/fo4/enum.Version.html @@ -0,0 +1,28 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Indicates the version of an archive."><title>Version in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Version</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.v1">v1</a></li><li><a href="#variant.v2">v2</a></li><li><a href="#variant.v3">v3</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Version">Clone</a></li><li><a href="#impl-Copy-for-Version">Copy</a></li><li><a href="#impl-Debug-for-Version">Debug</a></li><li><a href="#impl-Default-for-Version">Default</a></li><li><a href="#impl-Eq-for-Version">Eq</a></li><li><a href="#impl-Ord-for-Version">Ord</a></li><li><a href="#impl-PartialEq-for-Version">PartialEq</a></li><li><a href="#impl-PartialOrd-for-Version">PartialOrd</a></li><li><a href="#impl-StructuralPartialEq-for-Version">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Version">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Version">Send</a></li><li><a href="#impl-Sync-for-Version">Sync</a></li><li><a href="#impl-Unpin-for-Version">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Version">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="enum" href="#">Version</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/mod.rs.html#189-199">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub enum Version { + v1 = 1, + v2 = 2, + v3 = 3, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Indicates the version of an archive.</p> +</div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.v1" class="variant"><a href="#variant.v1" class="anchor">§</a><h3 class="code-header">v1 = 1</h3></section><div class="docblock"><p>Initial format introduced in Fallout 4.</p> +</div><section id="variant.v2" class="variant"><a href="#variant.v2" class="anchor">§</a><h3 class="code-header">v2 = 2</h3></section><div class="docblock"><p>Intoduced in Starfield.</p> +</div><section id="variant.v3" class="variant"><a href="#variant.v3" class="anchor">§</a><h3 class="code-header">v3 = 3</h3></section><div class="docblock"><p>Intoduced in Starfield.</p> +</div></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-Clone-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-Debug-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-Default-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-Ord-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-PartialEq-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-PartialOrd-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-Copy-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section><section id="impl-Eq-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-Eq-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section><section id="impl-StructuralPartialEq-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/fo4/mod.rs.html#188">source</a><a href="#impl-StructuralPartialEq-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Version" class="impl"><a href="#impl-RefUnwindSafe-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section><section id="impl-Send-for-Version" class="impl"><a href="#impl-Send-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section><section id="impl-Sync-for-Version" class="impl"><a href="#impl-Sync-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section><section id="impl-Unpin-for-Version" class="impl"><a href="#impl-Unpin-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section><section id="impl-UnwindSafe-for-Version" class="impl"><a href="#impl-UnwindSafe-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/file/enum.Header.html b/ba2/fo4/file/enum.Header.html new file mode 100644 index 0000000..194d15b --- /dev/null +++ b/ba2/fo4/file/enum.Header.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/enum.FileHeader.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/enum.FileHeader.html">../../../ba2/fo4/enum.FileHeader.html</a>...</p> + <script>location.replace("../../../ba2/fo4/enum.FileHeader.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/file/struct.CapacityError.html b/ba2/fo4/file/struct.CapacityError.html new file mode 100644 index 0000000..5d900c3 --- /dev/null +++ b/ba2/fo4/file/struct.CapacityError.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.FileCapacityError.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.FileCapacityError.html">../../../ba2/fo4/struct.FileCapacityError.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.FileCapacityError.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/file/struct.DX10.html b/ba2/fo4/file/struct.DX10.html new file mode 100644 index 0000000..b433ff4 --- /dev/null +++ b/ba2/fo4/file/struct.DX10.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.DX10Header.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.DX10Header.html">../../../ba2/fo4/struct.DX10Header.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.DX10Header.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/file/struct.File.html b/ba2/fo4/file/struct.File.html new file mode 100644 index 0000000..68cb322 --- /dev/null +++ b/ba2/fo4/file/struct.File.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.File.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.File.html">../../../ba2/fo4/struct.File.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.File.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/file/struct.GNMF.html b/ba2/fo4/file/struct.GNMF.html new file mode 100644 index 0000000..35d194a --- /dev/null +++ b/ba2/fo4/file/struct.GNMF.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.GNMFHeader.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.GNMFHeader.html">../../../ba2/fo4/struct.GNMFHeader.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.GNMFHeader.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/file/struct.ReadOptions.html b/ba2/fo4/file/struct.ReadOptions.html new file mode 100644 index 0000000..78aa95b --- /dev/null +++ b/ba2/fo4/file/struct.ReadOptions.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.FileReadOptions.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.FileReadOptions.html">../../../ba2/fo4/struct.FileReadOptions.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.FileReadOptions.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/file/struct.ReadOptionsBuilder.html b/ba2/fo4/file/struct.ReadOptionsBuilder.html new file mode 100644 index 0000000..fa16b51 --- /dev/null +++ b/ba2/fo4/file/struct.ReadOptionsBuilder.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.FileReadOptionsBuilder.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.FileReadOptionsBuilder.html">../../../ba2/fo4/struct.FileReadOptionsBuilder.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.FileReadOptionsBuilder.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/file/struct.WriteOptions.html b/ba2/fo4/file/struct.WriteOptions.html new file mode 100644 index 0000000..c9287c5 --- /dev/null +++ b/ba2/fo4/file/struct.WriteOptions.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.FileWriteOptions.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.FileWriteOptions.html">../../../ba2/fo4/struct.FileWriteOptions.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.FileWriteOptions.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/file/struct.WriteOptionsBuilder.html b/ba2/fo4/file/struct.WriteOptionsBuilder.html new file mode 100644 index 0000000..6d51cc5 --- /dev/null +++ b/ba2/fo4/file/struct.WriteOptionsBuilder.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.FileWriteOptionsBuilder.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.FileWriteOptionsBuilder.html">../../../ba2/fo4/struct.FileWriteOptionsBuilder.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.FileWriteOptionsBuilder.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/fn.hash_file.html b/ba2/fo4/fn.hash_file.html new file mode 100644 index 0000000..cbec589 --- /dev/null +++ b/ba2/fo4/fn.hash_file.html @@ -0,0 +1,3 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Produces a hash using the given path."><title>hash_file in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="fn" href="#">hash_file</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/hashing.rs.html#106-109">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn hash_file(path: &<a class="struct" href="../struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> (<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>, <a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Produces a hash using the given path.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/fn.hash_file_in_place.html b/ba2/fo4/fn.hash_file_in_place.html new file mode 100644 index 0000000..d414214 --- /dev/null +++ b/ba2/fo4/fn.hash_file_in_place.html @@ -0,0 +1,4 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Produces a hash using the given path."><title>hash_file_in_place in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="fn" href="#">hash_file_in_place</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/hashing.rs.html#115-133">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn hash_file_in_place(path: &mut <a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Produces a hash using the given path.</p> +<p>The path is normalized in place. After the function returns, the path contains the string that would be stored on disk.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/hashing/fn.hash_file.html b/ba2/fo4/hashing/fn.hash_file.html new file mode 100644 index 0000000..8f5f60a --- /dev/null +++ b/ba2/fo4/hashing/fn.hash_file.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/fn.hash_file.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/fn.hash_file.html">../../../ba2/fo4/fn.hash_file.html</a>...</p> + <script>location.replace("../../../ba2/fo4/fn.hash_file.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/hashing/fn.hash_file_in_place.html b/ba2/fo4/hashing/fn.hash_file_in_place.html new file mode 100644 index 0000000..b579a20 --- /dev/null +++ b/ba2/fo4/hashing/fn.hash_file_in_place.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/fn.hash_file_in_place.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/fn.hash_file_in_place.html">../../../ba2/fo4/fn.hash_file_in_place.html</a>...</p> + <script>location.replace("../../../ba2/fo4/fn.hash_file_in_place.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/hashing/struct.FileHash.html b/ba2/fo4/hashing/struct.FileHash.html new file mode 100644 index 0000000..a24152b --- /dev/null +++ b/ba2/fo4/hashing/struct.FileHash.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.FileHash.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.FileHash.html">../../../ba2/fo4/struct.FileHash.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.FileHash.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/hashing/struct.Hash.html b/ba2/fo4/hashing/struct.Hash.html new file mode 100644 index 0000000..22689c4 --- /dev/null +++ b/ba2/fo4/hashing/struct.Hash.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/fo4/struct.Hash.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/fo4/struct.Hash.html">../../../ba2/fo4/struct.Hash.html</a>...</p> + <script>location.replace("../../../ba2/fo4/struct.Hash.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/fo4/index.html b/ba2/fo4/index.html new file mode 100644 index 0000000..e2ebb78 --- /dev/null +++ b/ba2/fo4/index.html @@ -0,0 +1,39 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Fallout 4"><title>ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Module fo4</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Aliases</a></li></ul></section><h2><a href="../index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">ba2</a>::<wbr><a class="mod" href="#">fo4</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/mod.rs.html#1-199">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Fallout 4</p> +<p><em>“Good morning! Vault-Tec calling! … You can’t begin to know how happy I am to finally speak with you. I’ve been trying for days. It’s a matter of utmost urgency, I assure you.”</em></p> +<p>This format is the latest iteration, having debuted with Fallout 4. It primarily uses zlib for compression, but Starfield has introduced lz4 into the mix. Unlike previous formats, texture files are now split into chunks to enable streaming mips at a more granular level.</p> +<h2 id="reading"><a class="doc-anchor" href="#reading">§</a>Reading</h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::{ + fo4::{Archive, ArchiveKey, FileWriteOptions}, + prelude::<span class="kw-2">*</span>, +}; +<span class="kw">use </span>std::{fs, path::Path}; + +<span class="kw">fn </span>example() -> <span class="prelude-ty">Option</span><()> { + <span class="kw">let </span>path = Path::new(<span class="string">r"path/to/fallout4/Data/Fallout4 - Interface.ba2"</span>); + <span class="kw">let </span>(archive, meta) = Archive::read(path).ok()<span class="question-mark">?</span>; + <span class="kw">let </span>key: ArchiveKey = <span class="string">b"Interface/HUDMenu.swf"</span>.into(); + <span class="kw">let </span>file = archive.get(<span class="kw-2">&</span>key)<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>dst = fs::File::create(<span class="string">"HUDMenu.swf"</span>).ok()<span class="question-mark">?</span>; + <span class="kw">let </span>options: FileWriteOptions = meta.into(); + file.write(<span class="kw-2">&mut </span>dst, <span class="kw-2">&</span>options).ok()<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(()) +}</code></pre></div> +<h2 id="writing"><a class="doc-anchor" href="#writing">§</a>Writing</h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::{ + fo4::{Archive, ArchiveKey, ArchiveOptions, Chunk, File}, + prelude::<span class="kw-2">*</span>, +}; +<span class="kw">use </span>std::fs; + +<span class="kw">fn </span>example() -> <span class="prelude-ty">Option</span><()> { + <span class="kw">let </span>chunk = Chunk::from_decompressed(<span class="string">b"Hello world!\n"</span>); + <span class="kw">let </span>file: File = [chunk].into_iter().collect(); + <span class="kw">let </span>key: ArchiveKey = <span class="string">b"hello.txt"</span>.into(); + <span class="kw">let </span>archive: Archive = [(key, file)].into_iter().collect(); + <span class="kw">let </span><span class="kw-2">mut </span>dst = fs::File::create(<span class="string">"example.ba2"</span>).ok()<span class="question-mark">?</span>; + <span class="kw">let </span>options = ArchiveOptions::default(); + archive.write(<span class="kw-2">&mut </span>dst, <span class="kw-2">&</span>options).ok()<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(()) +}</code></pre></div> +</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a></div><div class="desc docblock-short">Represents the FO4 revision of the ba2 format.</div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">ArchiveKey</a></div><div class="desc docblock-short">A key for indexing into the relevant mapping.</div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a></div><div class="desc docblock-short">Info about the contents of the given archive.</div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">ArchiveOptionsBuilder</a></div><div class="desc docblock-short">See also <a href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions"><code>ArchiveOptions</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a></div><div class="desc docblock-short">Represents a chunk of a file within the FO4 virtual filesystem.</div></li><li><div class="item-name"><a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">ChunkCompressionOptions</a></div><div class="desc docblock-short">Common parameters to configure how chunks are compressed.</div></li><li><div class="item-name"><a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">ChunkCompressionOptionsBuilder</a></div><div class="desc docblock-short">See also <a href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions"><code>ChunkCompressionOptions</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10Header</a></div><div class="desc docblock-short">File header for DX10 archives.</div></li><li><div class="item-name"><a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a></div><div class="desc docblock-short">Represents a file within the FO4 virtual filesystem.</div></li><li><div class="item-name"><a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">FileCapacityError</a></div><div class="desc docblock-short">File is at chunk capacity.</div></li><li><div class="item-name"><a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></div><div class="desc docblock-short">See also <a href="struct.Hash.html" title="struct ba2::fo4::Hash"><code>Hash</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">FileReadOptions</a></div><div class="desc docblock-short">Common parameters to configure how files are read.</div></li><li><div class="item-name"><a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">FileReadOptionsBuilder</a></div><div class="desc docblock-short">See also <a href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions"><code>FileReadOptions</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a></div><div class="desc docblock-short">Common parameters to configure how files are written.</div></li><li><div class="item-name"><a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">FileWriteOptionsBuilder</a></div><div class="desc docblock-short">See also <a href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions"><code>FileWriteOptions</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMFHeader</a></div><div class="desc docblock-short">File header for GNMF archives.</div></li><li><div class="item-name"><a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></div><div class="desc docblock-short">The underlying hash object used to uniquely identify objects within the archive.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></div><div class="desc docblock-short">A list of all compression methods supported by the ba2 format.</div></li><li><div class="item-name"><a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></div><div class="desc docblock-short">Specifies the compression level to use when compressing data.</div></li><li><div class="item-name"><a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></div></li><li><div class="item-name"><a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">FileHeader</a></div><div class="desc docblock-short">Optionally present file header.</div></li><li><div class="item-name"><a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></div><div class="desc docblock-short">Represents the file format for an archive.</div></li><li><div class="item-name"><a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></div><div class="desc docblock-short">Indicates the version of an archive.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.hash_file.html" title="fn ba2::fo4::hash_file">hash_file</a></div><div class="desc docblock-short">Produces a hash using the given path.</div></li><li><div class="item-name"><a class="fn" href="fn.hash_file_in_place.html" title="fn ba2::fo4::hash_file_in_place">hash_file_in_place</a></div><div class="desc docblock-short">Produces a hash using the given path.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a></div></li></ul></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/sidebar-items.js b/ba2/fo4/sidebar-items.js new file mode 100644 index 0000000..5a122ee --- /dev/null +++ b/ba2/fo4/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["CompressionFormat","CompressionLevel","Error","FileHeader","Format","Version"],"fn":["hash_file","hash_file_in_place"],"struct":["Archive","ArchiveKey","ArchiveOptions","ArchiveOptionsBuilder","Chunk","ChunkCompressionOptions","ChunkCompressionOptionsBuilder","DX10Header","File","FileCapacityError","FileHash","FileReadOptions","FileReadOptionsBuilder","FileWriteOptions","FileWriteOptionsBuilder","GNMFHeader","Hash"],"type":["Result"]}; \ No newline at end of file diff --git a/ba2/fo4/struct.Archive.html b/ba2/fo4/struct.Archive.html new file mode 100644 index 0000000..7f4d6df --- /dev/null +++ b/ba2/fo4/struct.Archive.html @@ -0,0 +1,27 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents the FO4 revision of the ba2 format."><title>Archive in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Archive</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.clear">clear</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_key_value">get_key_value</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.keys">keys</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.remove_entry">remove_entry</a></li><li><a href="#method.values">values</a></li><li><a href="#method.values_mut">values_mut</a></li><li><a href="#method.write">write</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Archive%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-Archive%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Archive%3C'bytes%3E">Default</a></li><li><a href="#impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E">FromIterator<(Key<'bytes>, File<'bytes>)></a></li><li><a href="#impl-IntoIterator-for-%26Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E">Reader<&File></a></li><li><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E">Reader<&Path></a></li><li><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E">Reader<Borrowed<'bytes>></a></li><li><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E">Reader<Copied<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Archive%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Archive%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Archive%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Archive%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Archive%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">Archive</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Archive<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents the FO4 revision of the ba2 format.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.clear" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&mut self)</h4></section><section id="method.get" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a><K>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>>,</div></h4></section><section id="method.get_key_value" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.get_key_value" class="fn">get_key_value</a><K>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, &<a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>)><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>>,</div></h4></section><section id="method.get_mut" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a><K>(&mut self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>>,</div></h4></section><section id="method.insert" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a><K>(&mut self, key: K, value: <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>>,</div></h4></section><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.iter" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, &<a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>)></h4></section><section id="method.iter_mut" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>( + &mut self +) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, &mut <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>)></h4></section><section id="method.keys" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.keys" class="fn">keys</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>></h4></section><section id="method.len" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.remove" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a><K>(&mut self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>>,</div></h4></section><section id="method.remove_entry" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.remove_entry" class="fn">remove_entry</a><K>( + &mut self, + key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>)><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>>,</div></h4></section><section id="method.values" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.values" class="fn">values</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>></h4></section><section id="method.values_mut" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><h4 class="code-header">pub fn <a href="#method.values_mut" class="fn">values_mut</a>(&mut self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &mut <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Archive%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#209-572">source</a><a href="#impl-Archive%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.write" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#210-235">source</a><h4 class="code-header">pub fn <a href="#method.write" class="fn">write</a><Out>(&self, stream: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut Out</a>, options: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>><div class="where">where + Out: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,</div></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Clone-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Debug-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Default-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><(<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>)> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> Self<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = (<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>)>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-IntoIterator-for-%26Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this mut <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-4" class="associatedtype trait-impl"><a href="#associatedtype.Item-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.into_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-IntoIterator-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-6" class="associatedtype trait-impl"><a href="#associatedtype.Item-6" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-2" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.into_iter-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3C%26File%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static>, <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.read-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static>, <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.read-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-5" class="associatedtype trait-impl"><a href="#associatedtype.Item-5" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes>, <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.read-3" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static>, <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section><section id="impl-Send-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section><section id="impl-Sync-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section><section id="impl-Unpin-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.ArchiveKey.html b/ba2/fo4/struct.ArchiveKey.html new file mode 100644 index 0000000..9146e54 --- /dev/null +++ b/ba2/fo4/struct.ArchiveKey.html @@ -0,0 +1,22 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A key for indexing into the relevant mapping."><title>ArchiveKey in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveKey</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.hash">hash</a></li><li><a href="#method.name">name</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E">Borrow<FileHash></a></li><li><a href="#impl-Clone-for-Key%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-Key%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Key%3C'bytes%3E">Default</a></li><li><a href="#impl-Eq-for-Key%3C'bytes%3E">Eq</a></li><li><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E">From<FileHash></a></li><li><a href="#impl-From%3CT%3E-for-Key%3C'static%3E">From<T></a></li><li><a href="#impl-Ord-for-Key%3C'bytes%3E">Ord</a></li><li><a href="#impl-PartialEq-for-Key%3C'bytes%3E">PartialEq</a></li><li><a href="#impl-PartialOrd-for-Key%3C'bytes%3E">PartialOrd</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Key%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Key%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Key%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Key%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Key%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">ArchiveKey</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/archive.rs.html#193">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveKey<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A key for indexing into the relevant mapping.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.hash" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><h4 class="code-header">pub fn <a href="#method.hash" class="fn">hash</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h4></section><section id="method.name" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><h4 class="code-header">pub fn <a href="#method.name" class="fn">name</a>(&self) -> &<a class="struct" href="../struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-Clone-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-Debug-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-Default-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CT%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-From%3CT%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'static><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: T) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-Ord-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-PartialEq-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-PartialOrd-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Eq-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-Eq-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Key%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Send-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Sync-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Unpin-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Key%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.ArchiveOptions.html b/ba2/fo4/struct.ArchiveOptions.html new file mode 100644 index 0000000..f416984 --- /dev/null +++ b/ba2/fo4/struct.ArchiveOptions.html @@ -0,0 +1,44 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Info about the contents of the given archive."><title>ArchiveOptions in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveOptions</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.builder">builder</a></li><li><a href="#method.compression_format">compression_format</a></li><li><a href="#method.format">format</a></li><li><a href="#method.strings">strings</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Options">Clone</a></li><li><a href="#impl-Copy-for-Options">Copy</a></li><li><a href="#impl-Debug-for-Options">Debug</a></li><li><a href="#impl-Default-for-Options">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-CompressionOptions">From<&Options></a></li><li><a href="#impl-From%3C%26Options%3E-for-CompressionOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3C%26Options%3E-for-ReadOptions">From<&Options></a></li><li><a href="#impl-From%3C%26Options%3E-for-ReadOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3C%26Options%3E-for-WriteOptions">From<&Options></a></li><li><a href="#impl-From%3C%26Options%3E-for-WriteOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-CompressionOptions">From<Options></a></li><li><a href="#impl-From%3COptions%3E-for-CompressionOptionsBuilder">From<Options></a></li><li><a href="#impl-From%3COptions%3E-for-ReadOptions">From<Options></a></li><li><a href="#impl-From%3COptions%3E-for-ReadOptionsBuilder">From<Options></a></li><li><a href="#impl-From%3COptions%3E-for-WriteOptions">From<Options></a></li><li><a href="#impl-From%3COptions%3E-for-WriteOptionsBuilder">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Options">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Options">Send</a></li><li><a href="#impl-Sync-for-Options">Sync</a></li><li><a href="#impl-Unpin-for-Options">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Options">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">ArchiveOptions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/archive.rs.html#159-164">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveOptions { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Info about the contents of the given archive.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::fo4::{ArchiveOptions, CompressionFormat, Format, Version}; + +<span class="comment">// Write an archive for FO4/FO76, GNRL format +</span><span class="kw">let _ </span>= ArchiveOptions::builder() + .format(Format::GNRL) + .version(Version::v1) + .compression_format(CompressionFormat::Zip) + .build(); + +<span class="comment">// Write an archive for FO4/FO76, DX10 format +</span><span class="kw">let _ </span>= ArchiveOptions::builder() + .format(Format::DX10) + .version(Version::v1) + .compression_format(CompressionFormat::Zip) + .build(); + +<span class="comment">// Write an archive for SF, GNRL format +</span><span class="kw">let _ </span>= ArchiveOptions::builder() + .format(Format::GNRL) + .version(Version::v2) + .compression_format(CompressionFormat::Zip) + .build(); + +<span class="comment">// Write an archive for SF, DX10 format +</span><span class="kw">let _ </span>= ArchiveOptions::builder() + .format(Format::DX10) + .version(Version::v3) + .compression_format(CompressionFormat::LZ4) + .build();</code></pre></div> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Options" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#166-191">source</a><a href="#impl-Options" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section></summary><div class="impl-items"><section id="method.builder" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#168-170">source</a><h4 class="code-header">pub fn <a href="#method.builder" class="fn">builder</a>() -> <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h4></section><section id="method.compression_format" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#173-175">source</a><h4 class="code-header">pub fn <a href="#method.compression_format" class="fn">compression_format</a>(&self) -> <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h4></section><section id="method.format" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#178-180">source</a><h4 class="code-header">pub fn <a href="#method.format" class="fn">format</a>(&self) -> <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h4></section><section id="method.strings" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#183-185">source</a><h4 class="code-header">pub fn <a href="#method.strings" class="fn">strings</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.version" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#188-190">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(&self) -> <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Options" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#158">source</a><a href="#impl-Clone-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#158">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Options" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#158">source</a><a href="#impl-Debug-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#158">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Options" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#158">source</a><a href="#impl-Default-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#158">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#124-131">source</a><a href="#impl-From%3C%26Options%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#125-130">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#49-53">source</a><a href="#impl-From%3C%26Options%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#50-52">source</a><a href="#method.from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#238-246">source</a><a href="#impl-From%3C%26Options%3E-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#239-245">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#113-117">source</a><a href="#impl-From%3C%26Options%3E-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-8" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#114-116">source</a><a href="#method.from-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#326-332">source</a><a href="#impl-From%3C%26Options%3E-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#327-331">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-WriteOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#277-281">source</a><a href="#impl-From%3C%26Options%3E-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-9" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#278-280">source</a><a href="#method.from-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#118-122">source</a><a href="#impl-From%3COptions%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-7" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#119-121">source</a><a href="#method.from-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#43-47">source</a><a href="#impl-From%3COptions%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-11" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#44-46">source</a><a href="#method.from-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#232-236">source</a><a href="#impl-From%3COptions%3E-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#233-235">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#107-111">source</a><a href="#impl-From%3COptions%3E-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-10" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#108-110">source</a><a href="#method.from-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#320-324">source</a><a href="#impl-From%3COptions%3E-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#321-323">source</a><a href="#method.from-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-WriteOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#271-275">source</a><a href="#impl-From%3COptions%3E-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#272-274">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><section id="impl-Copy-for-Options" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#158">source</a><a href="#impl-Copy-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Options" class="impl"><a href="#impl-RefUnwindSafe-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section><section id="impl-Send-for-Options" class="impl"><a href="#impl-Send-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section><section id="impl-Sync-for-Options" class="impl"><a href="#impl-Sync-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section><section id="impl-Unpin-for-Options" class="impl"><a href="#impl-Unpin-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section><section id="impl-UnwindSafe-for-Options" class="impl"><a href="#impl-UnwindSafe-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-12" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.ArchiveOptionsBuilder.html b/ba2/fo4/struct.ArchiveOptionsBuilder.html new file mode 100644 index 0000000..a1ea376 --- /dev/null +++ b/ba2/fo4/struct.ArchiveOptionsBuilder.html @@ -0,0 +1,14 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `ArchiveOptions`."><title>ArchiveOptionsBuilder in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveOptionsBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.build">build</a></li><li><a href="#method.compression_format">compression_format</a></li><li><a href="#method.format">format</a></li><li><a href="#method.new">new</a></li><li><a href="#method.strings">strings</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-OptionsBuilder">Clone</a></li><li><a href="#impl-Copy-for-OptionsBuilder">Copy</a></li><li><a href="#impl-Debug-for-OptionsBuilder">Debug</a></li><li><a href="#impl-Default-for-OptionsBuilder">Default</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-OptionsBuilder">RefUnwindSafe</a></li><li><a href="#impl-Send-for-OptionsBuilder">Send</a></li><li><a href="#impl-Sync-for-OptionsBuilder">Sync</a></li><li><a href="#impl-Unpin-for-OptionsBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-OptionsBuilder">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">ArchiveOptionsBuilder</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/archive.rs.html#87">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveOptionsBuilder(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions"><code>ArchiveOptions</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-OptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#89-123">source</a><a href="#impl-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></summary><div class="impl-items"><section id="method.build" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#91-93">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) -> <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a></h4></section><section id="method.compression_format" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#96-99">source</a><h4 class="code-header">pub fn <a href="#method.compression_format" class="fn">compression_format</a>(self, compression_format: <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a>) -> Self</h4></section><section id="method.format" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#102-105">source</a><h4 class="code-header">pub fn <a href="#method.format" class="fn">format</a>(self, format: <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a>) -> Self</h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#108-110">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.strings" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#113-116">source</a><h4 class="code-header">pub fn <a href="#method.strings" class="fn">strings</a>(self, strings: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>) -> Self</h4></section><section id="method.version" class="method"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#119-122">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(self, version: <a class="enum" href="enum.Version.html" title="enum ba2::fo4::Version">Version</a>) -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-OptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#85">source</a><a href="#impl-Clone-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#85">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-OptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#85">source</a><a href="#impl-Debug-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#85">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-OptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#85">source</a><a href="#impl-Default-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#85">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><section id="impl-Copy-for-OptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#85">source</a><a href="#impl-Copy-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-OptionsBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section><section id="impl-Send-for-OptionsBuilder" class="impl"><a href="#impl-Send-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section><section id="impl-Sync-for-OptionsBuilder" class="impl"><a href="#impl-Sync-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section><section id="impl-Unpin-for-OptionsBuilder" class="impl"><a href="#impl-Unpin-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section><section id="impl-UnwindSafe-for-OptionsBuilder" class="impl"><a href="#impl-UnwindSafe-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::fo4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.Chunk.html b/ba2/fo4/struct.Chunk.html new file mode 100644 index 0000000..633f9cc --- /dev/null +++ b/ba2/fo4/struct.Chunk.html @@ -0,0 +1,31 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents a chunk of a file within the FO4 virtual filesystem."><title>Chunk in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Chunk</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.mips">mips</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.as_bytes">as_bytes</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.compress">compress</a></li><li><a href="#method.compress_into">compress_into</a></li><li><a href="#method.decompress">decompress</a></li><li><a href="#method.decompress_into">decompress_into</a></li><li><a href="#method.decompressed_len">decompressed_len</a></li><li><a href="#method.into_owned">into_owned</a></li><li><a href="#method.is_compressed">is_compressed</a></li><li><a href="#method.is_decompressed">is_decompressed</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.write">write</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Chunk%3C'bytes%3E">Clone</a></li><li><a href="#impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-Chunk%3C'bytes%3E">CompressableFrom<&'bytes [u8; N]></a></li><li><a href="#impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-Chunk%3C'bytes%3E">CompressableFrom<&'bytes [u8]></a></li><li><a href="#impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-Chunk%3C'static%3E">CompressableFrom<Box<[u8]>></a></li><li><a href="#impl-Debug-for-Chunk%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Chunk%3C'bytes%3E">Default</a></li><li><a href="#impl-FromIterator%3CChunk%3C'bytes%3E%3E-for-File%3C'bytes%3E">FromIterator<Chunk<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Chunk%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Chunk%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Chunk%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Chunk%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Chunk%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">Chunk</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/chunk.rs.html#150-153">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Chunk<'bytes> { + pub mips: <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>>>, + <span class="comment">/* private fields */</span> +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents a chunk of a file within the FO4 virtual filesystem.</p> +</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.mips" class="structfield section-header"><a href="#structfield.mips" class="anchor field">§</a><code>mips: <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>>></code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Chunk%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#impl-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.as_bytes" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.as_bytes" class="fn">as_bytes</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><section id="method.as_ptr" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const </a><a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></h4></section><section id="method.into_owned" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.into_owned" class="fn">into_owned</a>(self) -> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'static></h4></section><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.len" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Chunk%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#impl-Chunk%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.compress" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.compress" class="fn">compress</a>(&self, options: &<a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'static>></h4></section><section id="method.decompress" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.decompress" class="fn">decompress</a>(&self, options: &<a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'static>></h4></section><section id="method.decompressed_len" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.decompressed_len" class="fn">decompressed_len</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></h4></section><section id="method.is_compressed" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.is_compressed" class="fn">is_compressed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_decompressed" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.is_decompressed" class="fn">is_decompressed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.write" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><h4 class="code-header">pub fn <a href="#method.write" class="fn">write</a><Out>( + &self, + stream: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut Out</a>, + options: &<a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a> +) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>><div class="where">where + Out: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,</div></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Chunk%3C'bytes%3E-2" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#157-235">source</a><a href="#impl-Chunk%3C'bytes%3E-2" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.compress_into" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#158-175">source</a><h4 class="code-header">pub fn <a href="#method.compress_into" class="fn">compress_into</a>( + &self, + out: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>, + options: &<a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a> +) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>></h4></section><section id="method.decompress_into" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#177-196">source</a><h4 class="code-header">pub fn <a href="#method.decompress_into" class="fn">decompress_into</a>( + &self, + out: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>, + options: &<a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a> +) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Chunk%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#149">source</a><a href="#impl-Clone-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#149">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-Chunk%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_compressed-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#method.from_compressed-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_compressed" class="fn">from_compressed</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>], decompressed_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class='docblock'>Makes a compressed instance of <code>Self</code> using the given data.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_decompressed-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#method.from_decompressed-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_decompressed" class="fn">from_decompressed</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> Self</h4></section></summary><div class='docblock'>Makes a decompressed instance of <code>Self</code> using the given data.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-Chunk%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="../trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_compressed-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#method.from_compressed-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_compressed" class="fn">from_compressed</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>], decompressed_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class='docblock'>Makes a compressed instance of <code>Self</code> using the given data.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_decompressed-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#method.from_decompressed-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_decompressed" class="fn">from_decompressed</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]) -> Self</h4></section></summary><div class='docblock'>Makes a decompressed instance of <code>Self</code> using the given data.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-Chunk%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-Chunk%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_compressed" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#method.from_compressed" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_compressed" class="fn">from_compressed</a>(value: <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, decompressed_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class='docblock'>Makes a compressed instance of <code>Self</code> using the given data.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_decompressed" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#method.from_decompressed" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_decompressed" class="fn">from_decompressed</a>(value: <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>) -> Self</h4></section></summary><div class='docblock'>Makes a decompressed instance of <code>Self</code> using the given data.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Chunk%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#149">source</a><a href="#impl-Debug-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#149">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Chunk%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#149">source</a><a href="#impl-Default-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#149">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CChunk%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1485-1497">source</a><a href="#impl-FromIterator%3CChunk%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1486-1496">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> Self<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Chunk%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section><section id="impl-Send-for-Chunk%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section><section id="impl-Sync-for-Chunk%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section><section id="impl-Unpin-for-Chunk%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Chunk%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>"}</script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.ChunkCompressionOptions.html b/ba2/fo4/struct.ChunkCompressionOptions.html new file mode 100644 index 0000000..f06899b --- /dev/null +++ b/ba2/fo4/struct.ChunkCompressionOptions.html @@ -0,0 +1,39 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Common parameters to configure how chunks are compressed."><title>ChunkCompressionOptions in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ChunkCompressionOptions</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.builder">builder</a></li><li><a href="#method.compression_format">compression_format</a></li><li><a href="#method.compression_level">compression_level</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-CompressionOptions">Clone</a></li><li><a href="#impl-Copy-for-CompressionOptions">Copy</a></li><li><a href="#impl-Debug-for-CompressionOptions">Debug</a></li><li><a href="#impl-Default-for-CompressionOptions">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-CompressionOptions">From<&Options></a></li><li><a href="#impl-From%3C%26WriteOptions%3E-for-CompressionOptions">From<&WriteOptions></a></li><li><a href="#impl-From%3COptions%3E-for-CompressionOptions">From<Options></a></li><li><a href="#impl-From%3CWriteOptions%3E-for-CompressionOptions">From<WriteOptions></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CompressionOptions">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CompressionOptions">Send</a></li><li><a href="#impl-Sync-for-CompressionOptions">Sync</a></li><li><a href="#impl-Unpin-for-CompressionOptions">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CompressionOptions">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">ChunkCompressionOptions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/chunk.rs.html#96-99">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ChunkCompressionOptions { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Common parameters to configure how chunks are compressed.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::fo4::{ChunkCompressionOptions, CompressionFormat, CompressionLevel}; + +<span class="comment">// Configure for FO4/FO76 +</span><span class="kw">let _ </span>= ChunkCompressionOptions::builder() + .compression_format(CompressionFormat::Zip) + .compression_level(CompressionLevel::FO4) + .build(); + +<span class="comment">// Configure for FO4 on the xbox +</span><span class="kw">let _ </span>= ChunkCompressionOptions::builder() + .compression_format(CompressionFormat::Zip) + .compression_level(CompressionLevel::FO4Xbox) + .build(); + +<span class="comment">// Configure for SF, GNRL format +</span><span class="kw">let _ </span>= ChunkCompressionOptions::builder() + .compression_format(CompressionFormat::Zip) + .compression_level(CompressionLevel::SF) + .build(); + +<span class="comment">// Configure for SF, DX10 format +</span><span class="kw">let _ </span>= ChunkCompressionOptions::builder() + .compression_format(CompressionFormat::LZ4) + .build();</code></pre></div> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#101-116">source</a><a href="#impl-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><section id="method.builder" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#103-105">source</a><h4 class="code-header">pub fn <a href="#method.builder" class="fn">builder</a>() -> <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h4></section><section id="method.compression_format" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#108-110">source</a><h4 class="code-header">pub fn <a href="#method.compression_format" class="fn">compression_format</a>(&self) -> <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h4></section><section id="method.compression_level" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#113-115">source</a><h4 class="code-header">pub fn <a href="#method.compression_level" class="fn">compression_level</a>(&self) -> <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#95">source</a><a href="#impl-Clone-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#95">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#95">source</a><a href="#impl-Debug-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#95">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#95">source</a><a href="#impl-Default-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#95">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#124-131">source</a><a href="#impl-From%3C%26Options%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#125-130">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26WriteOptions%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#139-146">source</a><a href="#impl-From%3C%26WriteOptions%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#140-145">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#118-122">source</a><a href="#impl-From%3COptions%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#119-121">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CWriteOptions%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#133-137">source</a><a href="#impl-From%3CWriteOptions%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#134-136">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><section id="impl-Copy-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#95">source</a><a href="#impl-Copy-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CompressionOptions" class="impl"><a href="#impl-RefUnwindSafe-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section><section id="impl-Send-for-CompressionOptions" class="impl"><a href="#impl-Send-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section><section id="impl-Sync-for-CompressionOptions" class="impl"><a href="#impl-Sync-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section><section id="impl-Unpin-for-CompressionOptions" class="impl"><a href="#impl-Unpin-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section><section id="impl-UnwindSafe-for-CompressionOptions" class="impl"><a href="#impl-UnwindSafe-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.ChunkCompressionOptionsBuilder.html b/ba2/fo4/struct.ChunkCompressionOptionsBuilder.html new file mode 100644 index 0000000..178b361 --- /dev/null +++ b/ba2/fo4/struct.ChunkCompressionOptionsBuilder.html @@ -0,0 +1,13 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `ChunkCompressionOptions`."><title>ChunkCompressionOptionsBuilder in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ChunkCompressionOptionsBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.build">build</a></li><li><a href="#method.compression_format">compression_format</a></li><li><a href="#method.compression_level">compression_level</a></li><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-CompressionOptionsBuilder">Debug</a></li><li><a href="#impl-Default-for-CompressionOptionsBuilder">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-CompressionOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3C%26WriteOptions%3E-for-CompressionOptionsBuilder">From<&WriteOptions></a></li><li><a href="#impl-From%3COptions%3E-for-CompressionOptionsBuilder">From<Options></a></li><li><a href="#impl-From%3CWriteOptions%3E-for-CompressionOptionsBuilder">From<WriteOptions></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CompressionOptionsBuilder">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CompressionOptionsBuilder">Send</a></li><li><a href="#impl-Sync-for-CompressionOptionsBuilder">Sync</a></li><li><a href="#impl-Unpin-for-CompressionOptionsBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CompressionOptionsBuilder">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">ChunkCompressionOptionsBuilder</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/chunk.rs.html#17">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ChunkCompressionOptionsBuilder(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions"><code>ChunkCompressionOptions</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#19-41">source</a><a href="#impl-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><section id="method.build" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#21-23">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) -> <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h4></section><section id="method.compression_format" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#26-29">source</a><h4 class="code-header">pub fn <a href="#method.compression_format" class="fn">compression_format</a>(self, compression_format: <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a>) -> Self</h4></section><section id="method.compression_level" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#32-35">source</a><h4 class="code-header">pub fn <a href="#method.compression_level" class="fn">compression_level</a>(self, compression_level: <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a>) -> Self</h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#38-40">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#15">source</a><a href="#impl-Debug-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#15">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#15">source</a><a href="#impl-Default-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#15">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#49-53">source</a><a href="#impl-From%3C%26Options%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#50-52">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26WriteOptions%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#61-65">source</a><a href="#impl-From%3C%26WriteOptions%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#62-64">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#43-47">source</a><a href="#impl-From%3COptions%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#44-46">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CWriteOptions%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#55-59">source</a><a href="#impl-From%3CWriteOptions%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#56-58">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CompressionOptionsBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section><section id="impl-Send-for-CompressionOptionsBuilder" class="impl"><a href="#impl-Send-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section><section id="impl-Sync-for-CompressionOptionsBuilder" class="impl"><a href="#impl-Sync-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section><section id="impl-Unpin-for-CompressionOptionsBuilder" class="impl"><a href="#impl-Unpin-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section><section id="impl-UnwindSafe-for-CompressionOptionsBuilder" class="impl"><a href="#impl-UnwindSafe-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.DX10Header.html b/ba2/fo4/struct.DX10Header.html new file mode 100644 index 0000000..6b380f8 --- /dev/null +++ b/ba2/fo4/struct.DX10Header.html @@ -0,0 +1,23 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="File header for DX10 archives."><title>DX10Header in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">DX10Header</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.flags">flags</a></li><li><a href="#structfield.format">format</a></li><li><a href="#structfield.height">height</a></li><li><a href="#structfield.mip_count">mip_count</a></li><li><a href="#structfield.tile_mode">tile_mode</a></li><li><a href="#structfield.width">width</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-DX10">Clone</a></li><li><a href="#impl-Copy-for-DX10">Copy</a></li><li><a href="#impl-Debug-for-DX10">Debug</a></li><li><a href="#impl-Default-for-DX10">Default</a></li><li><a href="#impl-Eq-for-DX10">Eq</a></li><li><a href="#impl-From%3CDX10%3E-for-Header">From<DX10></a></li><li><a href="#impl-PartialEq-for-DX10">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-DX10">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-DX10">RefUnwindSafe</a></li><li><a href="#impl-Send-for-DX10">Send</a></li><li><a href="#impl-Sync-for-DX10">Sync</a></li><li><a href="#impl-Unpin-for-DX10">Unpin</a></li><li><a href="#impl-UnwindSafe-for-DX10">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">DX10Header</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#336-343">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct DX10Header { + pub height: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>, + pub width: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>, + pub mip_count: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>, + pub format: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>, + pub flags: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>, + pub tile_mode: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>File header for DX10 archives.</p> +</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.height" class="structfield section-header"><a href="#structfield.height" class="anchor field">§</a><code>height: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a></code></span><span id="structfield.width" class="structfield section-header"><a href="#structfield.width" class="anchor field">§</a><code>width: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a></code></span><span id="structfield.mip_count" class="structfield section-header"><a href="#structfield.mip_count" class="anchor field">§</a><code>mip_count: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></code></span><span id="structfield.format" class="structfield section-header"><a href="#structfield.format" class="anchor field">§</a><code>format: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></code></span><span id="structfield.flags" class="structfield section-header"><a href="#structfield.flags" class="anchor field">§</a><code>flags: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></code></span><span id="structfield.tile_mode" class="structfield section-header"><a href="#structfield.tile_mode" class="anchor field">§</a><code>tile_mode: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></code></span><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-DX10" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#impl-Clone-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-DX10" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#impl-Debug-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-DX10" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#impl-Default-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CDX10%3E-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#903-907">source</a><a href="#impl-From%3CDX10%3E-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a>> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#904-906">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-DX10" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#impl-PartialEq-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><section id="impl-Copy-for-DX10" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#impl-Copy-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section><section id="impl-Eq-for-DX10" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#impl-Eq-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section><section id="impl-StructuralPartialEq-for-DX10" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#335">source</a><a href="#impl-StructuralPartialEq-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-DX10" class="impl"><a href="#impl-RefUnwindSafe-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section><section id="impl-Send-for-DX10" class="impl"><a href="#impl-Send-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section><section id="impl-Sync-for-DX10" class="impl"><a href="#impl-Sync-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section><section id="impl-Unpin-for-DX10" class="impl"><a href="#impl-Unpin-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section><section id="impl-UnwindSafe-for-DX10" class="impl"><a href="#impl-UnwindSafe-for-DX10" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DX10Header.html" title="struct ba2::fo4::DX10Header">DX10</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.File.html b/ba2/fo4/struct.File.html new file mode 100644 index 0000000..21775ea --- /dev/null +++ b/ba2/fo4/struct.File.html @@ -0,0 +1,42 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents a file within the FO4 virtual filesystem."><title>File in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">File</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.header">header</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.as_mut_ptr">as_mut_ptr</a></li><li><a href="#method.as_mut_slice">as_mut_slice</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.as_slice">as_slice</a></li><li><a href="#method.clear">clear</a></li><li><a href="#method.drain">drain</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.is_full">is_full</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.pop">pop</a></li><li><a href="#method.push">push</a></li><li><a href="#method.remaining_capacity">remaining_capacity</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.retain_mut">retain_mut</a></li><li><a href="#method.swap_remove">swap_remove</a></li><li><a href="#method.truncate">truncate</a></li><li><a href="#method.try_insert">try_insert</a></li><li><a href="#method.try_push">try_push</a></li><li><a href="#method.try_swap_remove">try_swap_remove</a></li><li><a href="#method.write">write</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-File%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-File%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-File%3C'bytes%3E">Default</a></li><li><a href="#impl-FromIterator%3CChunk%3C'bytes%3E%3E-for-File%3C'bytes%3E">FromIterator<Chunk<'bytes>></a></li><li><a href="#impl-Index%3Cusize%3E-for-File%3C'bytes%3E">Index<usize></a></li><li><a href="#impl-IndexMut%3Cusize%3E-for-File%3C'bytes%3E">IndexMut<usize></a></li><li><a href="#impl-IntoIterator-for-%26File%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-%26mut+File%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-File%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E">ReaderWithOptions<&File></a></li><li><a href="#impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E">ReaderWithOptions<&Path></a></li><li><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E">ReaderWithOptions<Borrowed<'bytes>></a></li><li><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E">ReaderWithOptions<Copied<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-File%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-File%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-File%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-File%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-File%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">File</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#1015-1018">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct File<'bytes> { + pub header: <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a>, + <span class="comment">/* private fields */</span> +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents a file within the FO4 virtual filesystem.</p> +</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.header" class="structfield section-header"><a href="#structfield.header" class="anchor field">§</a><code>header: <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1025-1469">source</a><a href="#impl-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.as_mut_ptr" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1027-1029">source</a><h4 class="code-header">pub fn <a href="#method.as_mut_ptr" class="fn">as_mut_ptr</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*mut </a><a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h4></section><section id="method.as_mut_slice" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1032-1034">source</a><h4 class="code-header">pub fn <a href="#method.as_mut_slice" class="fn">as_mut_slice</a>(&mut self) -> &mut [<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>]</h4></section><section id="method.as_ptr" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1037-1039">source</a><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const </a><a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h4></section><section id="method.as_slice" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1042-1044">source</a><h4 class="code-header">pub fn <a href="#method.as_slice" class="fn">as_slice</a>(&self) -> &[<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>]</h4></section><section id="method.clear" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1046-1048">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&mut self)</h4></section><details class="toggle method-toggle" open><summary><section id="method.drain" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1053-1058">source</a><h4 class="code-header">pub fn <a href="#method.drain" class="fn">drain</a><R>(&mut self, range: R) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> + '_<div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>,</div></h4></section></summary><div class="docblock"><h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5> +<p>Panics if <a href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html#tymethod.start_bound" title="method core::ops::range::RangeBounds::start_bound"><code>start_bound</code></a> exceeds <a href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html#tymethod.end_bound" title="method core::ops::range::RangeBounds::end_bound"><code>end_bound</code></a>, or if <a href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html#tymethod.end_bound" title="method core::ops::range::RangeBounds::end_bound"><code>end_bound</code></a> exceeds <a href="struct.File.html#method.len" title="method ba2::fo4::File::len"><code>len</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.insert" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1063-1065">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, element: <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>)</h4></section></summary><div class="docblock"><h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5> +<p>Panics if <code>index</code> exceeds <a href="struct.File.html#method.len" title="method ba2::fo4::File::len"><code>len</code></a>, or <a href="struct.File.html#method.is_full" title="method ba2::fo4::File::is_full"><code>is_full</code></a>.</p> +</div></details><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1068-1070">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_full" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1073-1075">source</a><h4 class="code-header">pub fn <a href="#method.is_full" class="fn">is_full</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.iter" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1077-1079">source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>></h4></section><section id="method.iter_mut" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1081-1083">source</a><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>(&mut self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &mut <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>></h4></section><section id="method.len" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1086-1088">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1091-1093">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.pop" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1095-1097">source</a><h4 class="code-header">pub fn <a href="#method.pop" class="fn">pop</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>></h4></section><details class="toggle method-toggle" open><summary><section id="method.push" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1102-1104">source</a><h4 class="code-header">pub fn <a href="#method.push" class="fn">push</a>(&mut self, element: <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>)</h4></section></summary><div class="docblock"><h5 id="panics-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h5> +<p>Panics if <a href="struct.File.html#method.is_full" title="method ba2::fo4::File::is_full"><code>is_full</code></a>.</p> +</div></details><section id="method.remaining_capacity" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1107-1109">source</a><h4 class="code-header">pub fn <a href="#method.remaining_capacity" class="fn">remaining_capacity</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.remove" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1114-1116">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h4></section></summary><div class="docblock"><h5 id="panics-3"><a class="doc-anchor" href="#panics-3">§</a>Panics</h5> +<p>Panics if <code>index</code> exceeds <a href="struct.File.html#method.len" title="method ba2::fo4::File::len"><code>len</code></a>.</p> +</div></details><section id="method.retain_mut" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1118-1123">source</a><h4 class="code-header">pub fn <a href="#method.retain_mut" class="fn">retain_mut</a><F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&mut <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><details class="toggle method-toggle" open><summary><section id="method.swap_remove" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1128-1130">source</a><h4 class="code-header">pub fn <a href="#method.swap_remove" class="fn">swap_remove</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h4></section></summary><div class="docblock"><h5 id="panics-4"><a class="doc-anchor" href="#panics-4">§</a>Panics</h5> +<p>Panics if <code>index</code> exceeds <a href="struct.File.html#method.len" title="method ba2::fo4::File::len"><code>len</code></a>, or <a href="struct.File.html#method.is_empty" title="method ba2::fo4::File::is_empty"><code>is_empty</code></a>.</p> +</div></details><section id="method.truncate" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1132-1134">source</a><h4 class="code-header">pub fn <a href="#method.truncate" class="fn">truncate</a>(&mut self, len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.try_insert" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1139-1151">source</a><h4 class="code-header">pub fn <a href="#method.try_insert" class="fn">try_insert</a>( + &mut self, + index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + element: <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes>></h4></section></summary><div class="docblock"><h5 id="panics-5"><a class="doc-anchor" href="#panics-5">§</a>Panics</h5> +<p>Panics if <code>index</code> exceeds <a href="struct.File.html#method.len" title="method ba2::fo4::File::len"><code>len</code></a>.</p> +</div></details><section id="method.try_push" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1153-1164">source</a><h4 class="code-header">pub fn <a href="#method.try_push" class="fn">try_push</a>( + &mut self, + element: <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes>></h4></section><details class="toggle method-toggle" open><summary><section id="method.try_swap_remove" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1169-1175">source</a><h4 class="code-header">pub fn <a href="#method.try_swap_remove" class="fn">try_swap_remove</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>></h4></section></summary><div class="docblock"><h5 id="panics-6"><a class="doc-anchor" href="#panics-6">§</a>Panics</h5> +<p>Panics if <code>index</code> exceeds <a href="struct.File.html#method.len" title="method ba2::fo4::File::len"><code>len</code></a>.</p> +</div></details><section id="method.write" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1177-1186">source</a><h4 class="code-header">pub fn <a href="#method.write" class="fn">write</a><Out>(&self, stream: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut Out</a>, options: &<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>><div class="where">where + Out: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,</div></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1014">source</a><a href="#impl-Clone-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1014">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1014">source</a><a href="#impl-Debug-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1014">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1014">source</a><a href="#impl-Default-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1014">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CChunk%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1485-1497">source</a><a href="#impl-FromIterator%3CChunk%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1486-1496">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> Self<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3Cusize%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1471-1477">source</a><a href="#impl-Index%3Cusize%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1474-1476">source</a><a href="#method.index" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3Cusize%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1479-1483">source</a><a href="#impl-IndexMut%3Cusize%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1480-1482">source</a><a href="#method.index_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> &mut Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1508-1515">source</a><a href="#impl-IntoIterator-for-%26File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1512-1514">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26mut+File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1517-1524">source</a><a href="#impl-IntoIterator-for-%26mut+File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this mut <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1521-1523">source</a><a href="#method.into_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1499-1506">source</a><a href="#impl-IntoIterator-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-2" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1503-1505">source</a><a href="#method.into_iter-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-5" class="associatedtype trait-impl"><a href="#associatedtype.Item-5" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'static></h4></section><section id="associatedtype.Options-2" class="associatedtype trait-impl"><a href="#associatedtype.Options-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1023">source</a><a href="#method.read-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>, options: &Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-4" class="associatedtype trait-impl"><a href="#associatedtype.Item-4" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'static></h4></section><section id="associatedtype.Options-1" class="associatedtype trait-impl"><a href="#associatedtype.Options-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1023">source</a><a href="#method.read-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, options: &Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h4></section><section id="associatedtype.Options" class="associatedtype trait-impl"><a href="#associatedtype.Options" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1023">source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>, options: &Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-6" class="associatedtype trait-impl"><a href="#associatedtype.Item-6" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'static></h4></section><section id="associatedtype.Options-3" class="associatedtype trait-impl"><a href="#associatedtype.Options-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#1023">source</a><a href="#method.read-3" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>, options: &Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-File%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section><section id="impl-Send-for-File%3C'bytes%3E" class="impl"><a href="#impl-Send-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section><section id="impl-Sync-for-File%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section><section id="impl-Unpin-for-File%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section><section id="impl-UnwindSafe-for-File%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.FileCapacityError.html b/ba2/fo4/struct.FileCapacityError.html new file mode 100644 index 0000000..2e365d9 --- /dev/null +++ b/ba2/fo4/struct.FileCapacityError.html @@ -0,0 +1,14 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="File is at chunk capacity."><title>FileCapacityError in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileCapacityError</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.into_element">into_element</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-CapacityError%3C'bytes%3E">Debug</a></li><li><a href="#impl-Display-for-CapacityError%3C'bytes%3E">Display</a></li><li><a href="#impl-Error-for-CapacityError%3C'bytes%3E">Error</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CapacityError%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CapacityError%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-CapacityError%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-CapacityError%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CapacityError%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToString-for-T">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">FileCapacityError</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#28">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileCapacityError<'bytes>(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>File is at chunk capacity.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CapacityError%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#30-35">source</a><a href="#impl-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.into_element" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#32-34">source</a><h4 class="code-header">pub fn <a href="#method.into_element" class="fn">into_element</a>(self) -> <a class="struct" href="struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CapacityError%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#37-41">source</a><a href="#impl-Debug-for-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#38-40">source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-CapacityError%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#43-50">source</a><a href="#impl-Display-for-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#44-49">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Error-for-CapacityError%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#52">source</a><a href="#impl-Error-for-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> for <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.source" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#84">source</a></span><a href="#method.source" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.source" class="fn">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)></h4></section></summary><div class='docblock'>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.source">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.description" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#110">source</a></span><a href="#method.description" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.description" class="fn">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.42.0: use the Display impl or to_string()</span></div></span><div class='docblock'> <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.description">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.cause" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#120">source</a></span><a href="#method.cause" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.cause" class="fn">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.33.0: replaced by Error::source, which can support downcasting</span></div></span></details><details class="toggle method-toggle" open><summary><section id="method.provide" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#184">source</a><a href="#method.provide" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.provide" class="fn">provide</a><'a>(&'a self, request: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/error/struct.Request.html" title="struct core::error::Request">Request</a><'a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>error_generic_member_access</code>)</span></div></span><div class='docblock'>Provides type based access to context intended for error reports. <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.provide">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CapacityError%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section><section id="impl-Send-for-CapacityError%3C'bytes%3E" class="impl"><a href="#impl-Send-for-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section><section id="impl-Sync-for-CapacityError%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section><section id="impl-Unpin-for-CapacityError%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section><section id="impl-UnwindSafe-for-CapacityError%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-CapacityError%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileCapacityError.html" title="struct ba2::fo4::FileCapacityError">CapacityError</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2600">source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2606">source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.FileHash.html b/ba2/fo4/struct.FileHash.html new file mode 100644 index 0000000..5c0cb66 --- /dev/null +++ b/ba2/fo4/struct.FileHash.html @@ -0,0 +1,29 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `struct@Hash`."><title>FileHash in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileHash</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CHash%3E-for-FileHash">AsMut<Hash></a></li><li><a href="#impl-AsRef%3CHash%3E-for-FileHash">AsRef<Hash></a></li><li><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E">Borrow<FileHash></a></li><li><a href="#impl-Borrow%3CHash%3E-for-FileHash">Borrow<Hash></a></li><li><a href="#impl-BorrowMut%3CHash%3E-for-FileHash">BorrowMut<Hash></a></li><li><a href="#impl-Clone-for-FileHash">Clone</a></li><li><a href="#impl-Copy-for-FileHash">Copy</a></li><li><a href="#impl-Debug-for-FileHash">Debug</a></li><li><a href="#impl-Default-for-FileHash">Default</a></li><li><a href="#impl-Deref-for-FileHash">Deref</a></li><li><a href="#impl-DerefMut-for-FileHash">DerefMut</a></li><li><a href="#impl-Eq-for-FileHash">Eq</a></li><li><a href="#impl-From%3CFileHash%3E-for-Hash">From<FileHash></a></li><li><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E">From<FileHash></a></li><li><a href="#impl-From%3CHash%3E-for-FileHash">From<Hash></a></li><li><a href="#impl-Ord-for-FileHash">Ord</a></li><li><a href="#impl-PartialEq-for-FileHash">PartialEq</a></li><li><a href="#impl-PartialEq%3CFileHash%3E-for-Hash">PartialEq<FileHash></a></li><li><a href="#impl-PartialEq%3CHash%3E-for-FileHash">PartialEq<Hash></a></li><li><a href="#impl-PartialOrd-for-FileHash">PartialOrd</a></li><li><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash">PartialOrd<FileHash></a></li><li><a href="#impl-PartialOrd%3CHash%3E-for-FileHash">PartialOrd<Hash></a></li><li><a href="#impl-StructuralPartialEq-for-FileHash">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-FileHash">RefUnwindSafe</a></li><li><a href="#impl-Send-for-FileHash">Send</a></li><li><a href="#impl-Sync-for-FileHash">Sync</a></li><li><a href="#impl-Unpin-for-FileHash">Unpin</a></li><li><a href="#impl-UnwindSafe-for-FileHash">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">FileHash</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/hashing.rs.html#17">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileHash(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.Hash.html" title="struct ba2::fo4::Hash"><code>Hash</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-AsMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-AsRef%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Borrow%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-BorrowMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Clone-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Debug-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Default-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Deref-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&self) -> &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-DerefMut-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&mut self) -> &mut Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-From%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::fo4::ArchiveKey">Key</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/archive.rs.html#193">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-From%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Ord-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialEq%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialEq%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialEq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialOrd%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialOrd-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Copy-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section><section id="impl-Eq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Eq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section><section id="impl-StructuralPartialEq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-StructuralPartialEq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-FileHash" class="impl"><a href="#impl-RefUnwindSafe-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section><section id="impl-Send-for-FileHash" class="impl"><a href="#impl-Send-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section><section id="impl-Sync-for-FileHash" class="impl"><a href="#impl-Sync-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section><section id="impl-Unpin-for-FileHash" class="impl"><a href="#impl-Unpin-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section><section id="impl-UnwindSafe-for-FileHash" class="impl"><a href="#impl-UnwindSafe-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.FileReadOptions.html b/ba2/fo4/struct.FileReadOptions.html new file mode 100644 index 0000000..9628b53 --- /dev/null +++ b/ba2/fo4/struct.FileReadOptions.html @@ -0,0 +1,66 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Common parameters to configure how files are read."><title>FileReadOptions in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileReadOptions</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.builder">builder</a></li><li><a href="#method.compression_format">compression_format</a></li><li><a href="#method.compression_level">compression_level</a></li><li><a href="#method.compression_result">compression_result</a></li><li><a href="#method.format">format</a></li><li><a href="#method.mip_chunk_height">mip_chunk_height</a></li><li><a href="#method.mip_chunk_width">mip_chunk_width</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-ReadOptions">Clone</a></li><li><a href="#impl-Copy-for-ReadOptions">Copy</a></li><li><a href="#impl-Debug-for-ReadOptions">Debug</a></li><li><a href="#impl-Default-for-ReadOptions">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-ReadOptions">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-ReadOptions">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-ReadOptions">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ReadOptions">Send</a></li><li><a href="#impl-Sync-for-ReadOptions">Sync</a></li><li><a href="#impl-Unpin-for-ReadOptions">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ReadOptions">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">FileReadOptions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#175-181">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileReadOptions { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Common parameters to configure how files are read.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::{ + fo4::{CompressionFormat, CompressionLevel, FileReadOptions, Format}, + CompressionResult, +}; + +<span class="comment">// Read and compress a file for FO4/FO76, GNRL format +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .format(Format::GNRL) + .compression_format(CompressionFormat::Zip) + .compression_level(CompressionLevel::FO4) + .compression_result(CompressionResult::Compressed) + .build(); + +<span class="comment">// Read and compress a file for FO4/FO76, DX10 format +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .format(Format::DX10) + .compression_format(CompressionFormat::Zip) + .compression_level(CompressionLevel::FO4) + .compression_result(CompressionResult::Compressed) + .build(); + +<span class="comment">// Read and compress a file for FO4 on the xbox, GNRL format +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .format(Format::GNRL) + .compression_format(CompressionFormat::Zip) + .compression_level(CompressionLevel::FO4Xbox) + .compression_result(CompressionResult::Compressed) + .build(); + +<span class="comment">// Read and compress a file for FO4 on the xbox, DX10 format +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .format(Format::DX10) + .compression_format(CompressionFormat::Zip) + .compression_level(CompressionLevel::FO4Xbox) + .compression_result(CompressionResult::Compressed) + .build(); + +<span class="comment">// Read and compress a file for SF, GNRL format +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .format(Format::GNRL) + .compression_format(CompressionFormat::Zip) + .compression_level(CompressionLevel::SF) + .compression_result(CompressionResult::Compressed) + .build(); + +<span class="comment">// Read and compress a file for SF, DX10 format +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .format(Format::DX10) + .compression_format(CompressionFormat::LZ4) + .compression_result(CompressionResult::Compressed) + .build();</code></pre></div> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#183-218">source</a><a href="#impl-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><section id="method.builder" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#185-187">source</a><h4 class="code-header">pub fn <a href="#method.builder" class="fn">builder</a>() -> <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h4></section><section id="method.compression_format" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#190-192">source</a><h4 class="code-header">pub fn <a href="#method.compression_format" class="fn">compression_format</a>(&self) -> <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h4></section><section id="method.compression_level" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#195-197">source</a><h4 class="code-header">pub fn <a href="#method.compression_level" class="fn">compression_level</a>(&self) -> <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a></h4></section><section id="method.compression_result" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#200-202">source</a><h4 class="code-header">pub fn <a href="#method.compression_result" class="fn">compression_result</a>(&self) -> <a class="enum" href="../enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h4></section><section id="method.format" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#205-207">source</a><h4 class="code-header">pub fn <a href="#method.format" class="fn">format</a>(&self) -> <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a></h4></section><section id="method.mip_chunk_height" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#210-212">source</a><h4 class="code-header">pub fn <a href="#method.mip_chunk_height" class="fn">mip_chunk_height</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.mip_chunk_width" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#215-217">source</a><h4 class="code-header">pub fn <a href="#method.mip_chunk_width" class="fn">mip_chunk_width</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#174">source</a><a href="#impl-Clone-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#174">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#174">source</a><a href="#impl-Debug-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#174">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#220-230">source</a><a href="#impl-Default-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#221-229">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#238-246">source</a><a href="#impl-From%3C%26Options%3E-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#239-245">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#232-236">source</a><a href="#impl-From%3COptions%3E-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#233-235">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><section id="impl-Copy-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#174">source</a><a href="#impl-Copy-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ReadOptions" class="impl"><a href="#impl-RefUnwindSafe-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section><section id="impl-Send-for-ReadOptions" class="impl"><a href="#impl-Send-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section><section id="impl-Sync-for-ReadOptions" class="impl"><a href="#impl-Sync-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section><section id="impl-Unpin-for-ReadOptions" class="impl"><a href="#impl-Unpin-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section><section id="impl-UnwindSafe-for-ReadOptions" class="impl"><a href="#impl-UnwindSafe-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.FileReadOptionsBuilder.html b/ba2/fo4/struct.FileReadOptionsBuilder.html new file mode 100644 index 0000000..4eff4b7 --- /dev/null +++ b/ba2/fo4/struct.FileReadOptionsBuilder.html @@ -0,0 +1,13 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `FileReadOptions`."><title>FileReadOptionsBuilder in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileReadOptionsBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.build">build</a></li><li><a href="#method.compression_format">compression_format</a></li><li><a href="#method.compression_level">compression_level</a></li><li><a href="#method.compression_result">compression_result</a></li><li><a href="#method.format">format</a></li><li><a href="#method.mip_chunk_height">mip_chunk_height</a></li><li><a href="#method.mip_chunk_width">mip_chunk_width</a></li><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-ReadOptionsBuilder">Debug</a></li><li><a href="#impl-Default-for-ReadOptionsBuilder">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-ReadOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-ReadOptionsBuilder">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-ReadOptionsBuilder">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ReadOptionsBuilder">Send</a></li><li><a href="#impl-Sync-for-ReadOptionsBuilder">Sync</a></li><li><a href="#impl-Unpin-for-ReadOptionsBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ReadOptionsBuilder">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">FileReadOptionsBuilder</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#57">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileReadOptionsBuilder(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions"><code>FileReadOptions</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#59-105">source</a><a href="#impl-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><section id="method.build" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#61-63">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) -> <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section><section id="method.compression_format" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#66-69">source</a><h4 class="code-header">pub fn <a href="#method.compression_format" class="fn">compression_format</a>(self, compression_format: <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a>) -> Self</h4></section><section id="method.compression_level" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#72-75">source</a><h4 class="code-header">pub fn <a href="#method.compression_level" class="fn">compression_level</a>(self, compression_level: <a class="enum" href="enum.CompressionLevel.html" title="enum ba2::fo4::CompressionLevel">CompressionLevel</a>) -> Self</h4></section><section id="method.compression_result" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#78-81">source</a><h4 class="code-header">pub fn <a href="#method.compression_result" class="fn">compression_result</a>(self, compression_result: <a class="enum" href="../enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a>) -> Self</h4></section><section id="method.format" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#84-87">source</a><h4 class="code-header">pub fn <a href="#method.format" class="fn">format</a>(self, format: <a class="enum" href="enum.Format.html" title="enum ba2::fo4::Format">Format</a>) -> Self</h4></section><section id="method.mip_chunk_height" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#90-93">source</a><h4 class="code-header">pub fn <a href="#method.mip_chunk_height" class="fn">mip_chunk_height</a>(self, mip_chunk_height: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section><section id="method.mip_chunk_width" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#96-99">source</a><h4 class="code-header">pub fn <a href="#method.mip_chunk_width" class="fn">mip_chunk_width</a>(self, mip_chunk_width: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#102-104">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#55">source</a><a href="#impl-Debug-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#55">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#55">source</a><a href="#impl-Default-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#55">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#113-117">source</a><a href="#impl-From%3C%26Options%3E-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#114-116">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#107-111">source</a><a href="#impl-From%3COptions%3E-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#108-110">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ReadOptionsBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section><section id="impl-Send-for-ReadOptionsBuilder" class="impl"><a href="#impl-Send-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section><section id="impl-Sync-for-ReadOptionsBuilder" class="impl"><a href="#impl-Sync-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section><section id="impl-Unpin-for-ReadOptionsBuilder" class="impl"><a href="#impl-Unpin-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section><section id="impl-UnwindSafe-for-ReadOptionsBuilder" class="impl"><a href="#impl-UnwindSafe-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::fo4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.FileWriteOptions.html b/ba2/fo4/struct.FileWriteOptions.html new file mode 100644 index 0000000..600ebdc --- /dev/null +++ b/ba2/fo4/struct.FileWriteOptions.html @@ -0,0 +1,31 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Common parameters to configure how files are written."><title>FileWriteOptions in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileWriteOptions</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.builder">builder</a></li><li><a href="#method.compression_format">compression_format</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-WriteOptions">Clone</a></li><li><a href="#impl-Copy-for-WriteOptions">Copy</a></li><li><a href="#impl-Debug-for-WriteOptions">Debug</a></li><li><a href="#impl-Default-for-WriteOptions">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-WriteOptions">From<&Options></a></li><li><a href="#impl-From%3C%26WriteOptions%3E-for-CompressionOptions">From<&WriteOptions></a></li><li><a href="#impl-From%3C%26WriteOptions%3E-for-CompressionOptionsBuilder">From<&WriteOptions></a></li><li><a href="#impl-From%3COptions%3E-for-WriteOptions">From<Options></a></li><li><a href="#impl-From%3CWriteOptions%3E-for-CompressionOptions">From<WriteOptions></a></li><li><a href="#impl-From%3CWriteOptions%3E-for-CompressionOptionsBuilder">From<WriteOptions></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-WriteOptions">RefUnwindSafe</a></li><li><a href="#impl-Send-for-WriteOptions">Send</a></li><li><a href="#impl-Sync-for-WriteOptions">Sync</a></li><li><a href="#impl-Unpin-for-WriteOptions">Unpin</a></li><li><a href="#impl-UnwindSafe-for-WriteOptions">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">FileWriteOptions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#304-306">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileWriteOptions { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Common parameters to configure how files are written.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::fo4::{CompressionFormat, FileWriteOptions, Format}; + +<span class="comment">// Write a file for FO4/FO76 +</span><span class="kw">let _ </span>= FileWriteOptions::builder() + .compression_format(CompressionFormat::Zip) + .build(); + +<span class="comment">// Write a file for SF, GNRL format +</span><span class="kw">let _ </span>= FileWriteOptions::builder() + .compression_format(CompressionFormat::Zip) + .build(); + +<span class="comment">// Write a file for SF, DX10 format +</span><span class="kw">let _ </span>= FileWriteOptions::builder() + .compression_format(CompressionFormat::LZ4) + .build();</code></pre></div> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#308-318">source</a><a href="#impl-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></summary><div class="impl-items"><section id="method.builder" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#310-312">source</a><h4 class="code-header">pub fn <a href="#method.builder" class="fn">builder</a>() -> <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h4></section><section id="method.compression_format" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#315-317">source</a><h4 class="code-header">pub fn <a href="#method.compression_format" class="fn">compression_format</a>(&self) -> <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#303">source</a><a href="#impl-Clone-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#303">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#303">source</a><a href="#impl-Debug-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#303">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#303">source</a><a href="#impl-Default-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#303">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#326-332">source</a><a href="#impl-From%3C%26Options%3E-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#327-331">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26WriteOptions%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#139-146">source</a><a href="#impl-From%3C%26WriteOptions%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#140-145">source</a><a href="#method.from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26WriteOptions%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#61-65">source</a><a href="#impl-From%3C%26WriteOptions%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#62-64">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#320-324">source</a><a href="#impl-From%3COptions%3E-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#321-323">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CWriteOptions%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#133-137">source</a><a href="#impl-From%3CWriteOptions%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>> for <a class="struct" href="struct.ChunkCompressionOptions.html" title="struct ba2::fo4::ChunkCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#134-136">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CWriteOptions%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#55-59">source</a><a href="#impl-From%3CWriteOptions%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a>> for <a class="struct" href="struct.ChunkCompressionOptionsBuilder.html" title="struct ba2::fo4::ChunkCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/chunk.rs.html#56-58">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">FileWriteOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><section id="impl-Copy-for-WriteOptions" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#303">source</a><a href="#impl-Copy-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-WriteOptions" class="impl"><a href="#impl-RefUnwindSafe-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section><section id="impl-Send-for-WriteOptions" class="impl"><a href="#impl-Send-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section><section id="impl-Sync-for-WriteOptions" class="impl"><a href="#impl-Sync-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section><section id="impl-Unpin-for-WriteOptions" class="impl"><a href="#impl-Unpin-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section><section id="impl-UnwindSafe-for-WriteOptions" class="impl"><a href="#impl-UnwindSafe-for-WriteOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.FileWriteOptionsBuilder.html b/ba2/fo4/struct.FileWriteOptionsBuilder.html new file mode 100644 index 0000000..1590fdc --- /dev/null +++ b/ba2/fo4/struct.FileWriteOptionsBuilder.html @@ -0,0 +1,13 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `FileWriteOptions`."><title>FileWriteOptionsBuilder in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileWriteOptionsBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.build">build</a></li><li><a href="#method.compression_format">compression_format</a></li><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-WriteOptionsBuilder">Debug</a></li><li><a href="#impl-Default-for-WriteOptionsBuilder">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-WriteOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-WriteOptionsBuilder">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-WriteOptionsBuilder">RefUnwindSafe</a></li><li><a href="#impl-Send-for-WriteOptionsBuilder">Send</a></li><li><a href="#impl-Sync-for-WriteOptionsBuilder">Sync</a></li><li><a href="#impl-Unpin-for-WriteOptionsBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-WriteOptionsBuilder">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">FileWriteOptionsBuilder</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#251">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileWriteOptionsBuilder(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions"><code>FileWriteOptions</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-WriteOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#253-269">source</a><a href="#impl-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section></summary><div class="impl-items"><section id="method.build" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#255-257">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) -> <a class="struct" href="struct.FileWriteOptions.html" title="struct ba2::fo4::FileWriteOptions">WriteOptions</a></h4></section><section id="method.compression_format" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#260-263">source</a><h4 class="code-header">pub fn <a href="#method.compression_format" class="fn">compression_format</a>(self, compression_format: <a class="enum" href="enum.CompressionFormat.html" title="enum ba2::fo4::CompressionFormat">CompressionFormat</a>) -> Self</h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#266-268">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-WriteOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#249">source</a><a href="#impl-Debug-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#249">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-WriteOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#249">source</a><a href="#impl-Default-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#249">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-WriteOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#277-281">source</a><a href="#impl-From%3C%26Options%3E-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#278-280">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-WriteOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#271-275">source</a><a href="#impl-From%3COptions%3E-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#272-274">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-WriteOptionsBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section><section id="impl-Send-for-WriteOptionsBuilder" class="impl"><a href="#impl-Send-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section><section id="impl-Sync-for-WriteOptionsBuilder" class="impl"><a href="#impl-Sync-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section><section id="impl-Unpin-for-WriteOptionsBuilder" class="impl"><a href="#impl-Unpin-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section><section id="impl-UnwindSafe-for-WriteOptionsBuilder" class="impl"><a href="#impl-UnwindSafe-for-WriteOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileWriteOptionsBuilder.html" title="struct ba2::fo4::FileWriteOptionsBuilder">WriteOptionsBuilder</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.GNMFHeader.html b/ba2/fo4/struct.GNMFHeader.html new file mode 100644 index 0000000..c4921e0 --- /dev/null +++ b/ba2/fo4/struct.GNMFHeader.html @@ -0,0 +1,19 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="File header for GNMF archives."><title>GNMFHeader in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">GNMFHeader</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.metadata">metadata</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-GNMF">Clone</a></li><li><a href="#impl-Copy-for-GNMF">Copy</a></li><li><a href="#impl-Debug-for-GNMF">Debug</a></li><li><a href="#impl-Default-for-GNMF">Default</a></li><li><a href="#impl-Eq-for-GNMF">Eq</a></li><li><a href="#impl-From%3CGNMF%3E-for-Header">From<GNMF></a></li><li><a href="#impl-PartialEq-for-GNMF">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-GNMF">StructuralPartialEq</a></li><li><a href="#impl-TryFrom%3C%26GNMF%3E-for-TexMetadata">TryFrom<&GNMF></a></li><li><a href="#impl-TryFrom%3C%26TexMetadata%3E-for-GNMF">TryFrom<&TexMetadata></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-GNMF">RefUnwindSafe</a></li><li><a href="#impl-Send-for-GNMF">Send</a></li><li><a href="#impl-Sync-for-GNMF">Sync</a></li><li><a href="#impl-Unpin-for-GNMF">Unpin</a></li><li><a href="#impl-UnwindSafe-for-GNMF">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">GNMFHeader</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/file.rs.html#347-350">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct GNMFHeader { + pub metadata: [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">8</a>], +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>File header for GNMF archives.</p> +</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.metadata" class="structfield section-header"><a href="#structfield.metadata" class="anchor field">§</a><code>metadata: [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">8</a>]</code></span><div class="docblock"><p>See <a href="https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/GNFTexture.cs#L529-L536">here</a> for more info.</p> +</div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-GNMF" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#impl-Clone-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-GNMF" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#impl-Debug-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-GNMF" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#583-599">source</a><a href="#impl-Default-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#584-598">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CGNMF%3E-for-Header" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#909-913">source</a><a href="#impl-From%3CGNMF%3E-for-Header" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>> for <a class="enum" href="enum.FileHeader.html" title="enum ba2::fo4::FileHeader">Header</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#910-912">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-GNMF" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#impl-PartialEq-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3C%26GNMF%3E-for-TexMetadata" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#668-735">source</a><a href="#impl-TryFrom%3C%26GNMF%3E-for-TexMetadata" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&<a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>> for TexMetadata</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#671-734">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: &<a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a>) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3C%26TexMetadata%3E-for-GNMF" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#601-666">source</a><a href="#impl-TryFrom%3C%26TexMetadata%3E-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&TexMetadata> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#604-665">source</a><a href="#method.try_from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: &TexMetadata) -> <a class="type" href="type.Result.html" title="type ba2::fo4::Result">Result</a><Self></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Copy-for-GNMF" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#impl-Copy-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section><section id="impl-Eq-for-GNMF" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#impl-Eq-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section><section id="impl-StructuralPartialEq-for-GNMF" class="impl"><a class="src rightside" href="../../src/ba2/fo4/file.rs.html#346">source</a><a href="#impl-StructuralPartialEq-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-GNMF" class="impl"><a href="#impl-RefUnwindSafe-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section><section id="impl-Send-for-GNMF" class="impl"><a href="#impl-Send-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section><section id="impl-Sync-for-GNMF" class="impl"><a href="#impl-Sync-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section><section id="impl-Unpin-for-GNMF" class="impl"><a href="#impl-Unpin-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section><section id="impl-UnwindSafe-for-GNMF" class="impl"><a href="#impl-UnwindSafe-for-GNMF" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.GNMFHeader.html" title="struct ba2::fo4::GNMFHeader">GNMF</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/struct.Hash.html b/ba2/fo4/struct.Hash.html new file mode 100644 index 0000000..873d425 --- /dev/null +++ b/ba2/fo4/struct.Hash.html @@ -0,0 +1,36 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The underlying hash object used to uniquely identify objects within the archive."><title>Hash in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Hash</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.directory">directory</a></li><li><a href="#structfield.extension">extension</a></li><li><a href="#structfield.file">file</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CHash%3E-for-FileHash">AsMut<Hash></a></li><li><a href="#impl-AsRef%3CHash%3E-for-FileHash">AsRef<Hash></a></li><li><a href="#impl-Borrow%3CHash%3E-for-FileHash">Borrow<Hash></a></li><li><a href="#impl-BorrowMut%3CHash%3E-for-FileHash">BorrowMut<Hash></a></li><li><a href="#impl-Clone-for-Hash">Clone</a></li><li><a href="#impl-Copy-for-Hash">Copy</a></li><li><a href="#impl-Debug-for-Hash">Debug</a></li><li><a href="#impl-Default-for-Hash">Default</a></li><li><a href="#impl-Eq-for-Hash">Eq</a></li><li><a href="#impl-From%3CFileHash%3E-for-Hash">From<FileHash></a></li><li><a href="#impl-From%3CHash%3E-for-FileHash">From<Hash></a></li><li><a href="#impl-Ord-for-Hash">Ord</a></li><li><a href="#impl-PartialEq-for-Hash">PartialEq</a></li><li><a href="#impl-PartialEq%3CFileHash%3E-for-Hash">PartialEq<FileHash></a></li><li><a href="#impl-PartialEq%3CHash%3E-for-FileHash">PartialEq<Hash></a></li><li><a href="#impl-PartialOrd-for-Hash">PartialOrd</a></li><li><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash">PartialOrd<FileHash></a></li><li><a href="#impl-PartialOrd%3CHash%3E-for-FileHash">PartialOrd<Hash></a></li><li><a href="#impl-StructuralPartialEq-for-Hash">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Hash">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Hash">Send</a></li><li><a href="#impl-Sync-for-Hash">Sync</a></li><li><a href="#impl-Unpin-for-Hash">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Hash">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="struct" href="#">Hash</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/hashing.rs.html#8-15">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code><div class="code-attribute">#[repr(C)]</div>pub struct Hash { + pub file: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>, + pub extension: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>, + pub directory: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The underlying hash object used to uniquely identify objects within the archive.</p> +</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.file" class="structfield section-header"><a href="#structfield.file" class="anchor field">§</a><code>file: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>The file’s stem crc.</p> +</div><span id="structfield.extension" class="structfield section-header"><a href="#structfield.extension" class="anchor field">§</a><code>extension: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>The first 4 bytes of the file’s extension.</p> +</div><span id="structfield.directory" class="structfield section-header"><a href="#structfield.directory" class="anchor field">§</a><code>directory: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></code></span><div class="docblock"><p>The file’s parent path crc.</p> +</div><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#19-24">source</a><a href="#impl-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#21-23">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-AsMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-AsRef%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-Borrow%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-BorrowMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-Clone-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-Debug-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-Default-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-From%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-From%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-Ord-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialEq%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialEq%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-PartialEq-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#impl-PartialOrd%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::fo4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#17">source</a><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-PartialOrd-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-Copy-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section><section id="impl-Eq-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-Eq-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section><section id="impl-StructuralPartialEq-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/fo4/hashing.rs.html#6">source</a><a href="#impl-StructuralPartialEq-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Hash" class="impl"><a href="#impl-RefUnwindSafe-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section><section id="impl-Send-for-Hash" class="impl"><a href="#impl-Send-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section><section id="impl-Sync-for-Hash" class="impl"><a href="#impl-Sync-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section><section id="impl-Unpin-for-Hash" class="impl"><a href="#impl-Unpin-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section><section id="impl-UnwindSafe-for-Hash" class="impl"><a href="#impl-UnwindSafe-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::fo4::Hash">Hash</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/fo4/type.Result.html b/ba2/fo4/type.Result.html new file mode 100644 index 0000000..0ec8489 --- /dev/null +++ b/ba2/fo4/type.Result.html @@ -0,0 +1,7 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Result` type in crate `ba2`."><title>Result in ba2::fo4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Result</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Err">Err</a></li><li><a href="#variant.Ok">Ok</a></li></ul></section><h2><a href="index.html">In ba2::fo4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../index.html">ba2</a>::<wbr><a href="index.html">fo4</a>::<wbr><a class="type" href="#">Result</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/fo4/mod.rs.html#132">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub type Result<T> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a>>;</code></pre><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>enum Result<T> { + Ok(T), + Err(<a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a>), +}</code></pre><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Ok" class="variant"><a href="#variant.Ok" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Ok(T)</h3></section><div class="docblock"><p>Contains the success value</p> +</div><section id="variant.Err" class="variant"><a href="#variant.Err" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Err(<a class="enum" href="enum.Error.html" title="enum ba2::fo4::Error">Error</a>)</h3></section><div class="docblock"><p>Contains the error value</p> +</div></div><script src="../../type.impl/core/result/enum.Result.js" data-self-path="ba2::fo4::Result" async></script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/guess/enum.FileFormat.html b/ba2/guess/enum.FileFormat.html new file mode 100644 index 0000000..c0ad916 --- /dev/null +++ b/ba2/guess/enum.FileFormat.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../ba2/enum.FileFormat.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../ba2/enum.FileFormat.html">../../ba2/enum.FileFormat.html</a>...</p> + <script>location.replace("../../ba2/enum.FileFormat.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/guess/fn.guess_format.html b/ba2/guess/fn.guess_format.html new file mode 100644 index 0000000..d598212 --- /dev/null +++ b/ba2/guess/fn.guess_format.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../ba2/fn.guess_format.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../ba2/fn.guess_format.html">../../ba2/fn.guess_format.html</a>...</p> + <script>location.replace("../../ba2/fn.guess_format.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/index.html b/ba2/index.html new file mode 100644 index 0000000..c4a8368 --- /dev/null +++ b/ba2/index.html @@ -0,0 +1,8 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Archives come in various flavors, and the specific variant you’ll need to use depends on which game you’re working with. Learn more by choosing one of `tes3`, `tes4`, or `fo4`."><title>ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><ul class="block"> + <li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Crate <a class="mod" href="#">ba2</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/lib.rs.html#1-94">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Archives come in various flavors, and the specific variant you’ll need to use depends on which game you’re working with. Learn more by choosing one of <a href="tes3/index.html" title="mod ba2::tes3"><code>tes3</code></a>, <a href="tes4/index.html" title="mod ba2::tes4"><code>tes4</code></a>, or <a href="fo4/index.html" title="mod ba2::fo4"><code>fo4</code></a>.</p> +<p>If you are uncertain of the origins of your archive, then you may use <a href="fn.guess_format.html" title="fn ba2::guess_format"><code>guess_format</code></a> to find a starting point.</p> +<h2 id="a-note-on-strings"><a class="doc-anchor" href="#a-note-on-strings">§</a>A note on strings</h2> +<p>The Creation Engine absolutely does not handle unicode correctly, and even has some nasty, extant bugs which exist related to characters that utilize the extended ascii range. As such, all strings are marked as binary strings, without encoding (see also <a href="struct.BStr.html" title="struct ba2::BStr"><code>BStr</code></a> or <a href="struct.BString.html" title="struct ba2::BString"><code>BString</code></a>). If you must re-encode strings, then, generally speaking, they are encoded using the system code page of whatever computer happened to write the archive. That means English copies of the game are encoded using Windows-1252, Russian copies using Windows-1251, etc. However, this is not a guarantee and is the source of much consternation when writing internationalized applications for the Creation Engine games.</p> +</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="fo4/index.html" title="mod ba2::fo4">fo4</a></div><div class="desc docblock-short">Fallout 4</div></li><li><div class="item-name"><a class="mod" href="prelude/index.html" title="mod ba2::prelude">prelude</a></div><div class="desc docblock-short">Convenience using statements for traits that are needed to work with the library.</div></li><li><div class="item-name"><a class="mod" href="tes3/index.html" title="mod ba2::tes3">tes3</a></div><div class="desc docblock-short">TES III: Morrowind</div></li><li><div class="item-name"><a class="mod" href="tes4/index.html" title="mod ba2::tes4">tes4</a></div><div class="desc docblock-short">TES IV: Oblivion</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></div><div class="desc docblock-short">A wrapper for <code>&[u8]</code> that provides convenient string oriented trait impls.</div></li><li><div class="item-name"><a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></div><div class="desc docblock-short">A wrapper for <code>Vec<u8></code> that provides convenient string oriented trait +impls.</div></li><li><div class="item-name"><a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a></div><div class="desc docblock-short">Makes a shallow copy of the input.</div></li><li><div class="item-name"><a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a></div><div class="desc docblock-short">Makes a deep copy of the input.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></div><div class="desc docblock-short">Indicates whether the operation should finish by compressing the data or not.</div></li><li><div class="item-name"><a class="enum" href="enum.FileFormat.html" title="enum ba2::FileFormat">FileFormat</a></div><div class="desc docblock-short">The file format for a given archive.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.ByteSlice.html" title="trait ba2::ByteSlice">ByteSlice</a></div><div class="desc docblock-short">A trait that extends <code>&[u8]</code> with string oriented methods.</div></li><li><div class="item-name"><a class="trait" href="trait.ByteVec.html" title="trait ba2::ByteVec">ByteVec</a></div><div class="desc docblock-short">A trait that extends <code>Vec<u8></code> with string oriented methods.</div></li><li><div class="item-name"><a class="trait" href="trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a></div><div class="desc docblock-short">A trait that creates an optionally compressed container using the given value.</div></li><li><div class="item-name"><a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a></div><div class="desc docblock-short">A trait that enables reading from various sources.</div></li><li><div class="item-name"><a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a></div><div class="desc docblock-short">A trait that enables reading from various sources, with configuration options.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.guess_format.html" title="fn ba2::guess_format">guess_format</a></div><div class="desc docblock-short">Guesses the archive format for a given source.</div></li></ul></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/prelude/index.html b/ba2/prelude/index.html new file mode 100644 index 0000000..a21bf3d --- /dev/null +++ b/ba2/prelude/index.html @@ -0,0 +1,3 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Convenience using statements for traits that are needed to work with the library."><title>ba2::prelude - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Module prelude</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#reexports">Re-exports</a></li></ul></section><h2><a href="../index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">ba2</a>::<wbr><a class="mod" href="#">prelude</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/lib.rs.html#92">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Convenience using statements for traits that are needed to work with the library.</p> +</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport._"><code>pub use crate::<a class="trait" href="../trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a> as _;</code></div></li><li><div class="item-name" id="reexport._-1"><code>pub use crate::<a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a> as _;</code></div></li><li><div class="item-name" id="reexport._-2"><code>pub use crate::<a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a> as _;</code></div></li></ul></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/prelude/sidebar-items.js b/ba2/prelude/sidebar-items.js new file mode 100644 index 0000000..5244ce0 --- /dev/null +++ b/ba2/prelude/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/ba2/sidebar-items.js b/ba2/sidebar-items.js new file mode 100644 index 0000000..98923f3 --- /dev/null +++ b/ba2/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["CompressionResult","FileFormat"],"fn":["guess_format"],"mod":["fo4","prelude","tes3","tes4"],"struct":["BStr","BString","Borrowed","Copied"],"trait":["ByteSlice","ByteVec","CompressableFrom","Reader","ReaderWithOptions"]}; \ No newline at end of file diff --git a/ba2/struct.BStr.html b/ba2/struct.BStr.html new file mode 100644 index 0000000..8470998 --- /dev/null +++ b/ba2/struct.BStr.html @@ -0,0 +1,2473 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A wrapper for `&[u8]` that provides convenient string oriented trait impls."><title>BStr in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">BStr</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li></ul><h3><a href="#deref-methods-%5Bu8%5D">Methods from Deref<Target=[u8]></a></h3><ul class="block deref-methods"><li><a href="#method.align_to">align_to</a></li><li><a href="#method.align_to_mut">align_to_mut</a></li><li><a href="#method.array_chunks">array_chunks</a></li><li><a href="#method.array_chunks_mut">array_chunks_mut</a></li><li><a href="#method.array_windows">array_windows</a></li><li><a href="#method.as_ascii">as_ascii</a></li><li><a href="#method.as_ascii_unchecked">as_ascii_unchecked</a></li><li><a href="#method.as_bytes">as_bytes</a></li><li><a href="#method.as_chunks">as_chunks</a></li><li><a href="#method.as_chunks_mut">as_chunks_mut</a></li><li><a href="#method.as_chunks_unchecked">as_chunks_unchecked</a></li><li><a href="#method.as_chunks_unchecked_mut">as_chunks_unchecked_mut</a></li><li><a href="#method.as_mut_ptr">as_mut_ptr</a></li><li><a href="#method.as_mut_ptr_range">as_mut_ptr_range</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.as_ptr_range">as_ptr_range</a></li><li><a href="#method.as_rchunks">as_rchunks</a></li><li><a href="#method.as_rchunks_mut">as_rchunks_mut</a></li><li><a href="#method.as_simd">as_simd</a></li><li><a href="#method.as_simd_mut">as_simd_mut</a></li><li><a href="#method.as_str">as_str</a></li><li><a href="#method.binary_search">binary_search</a></li><li><a href="#method.binary_search_by">binary_search_by</a></li><li><a href="#method.binary_search_by_key">binary_search_by_key</a></li><li><a href="#method.chunk_by">chunk_by</a></li><li><a href="#method.chunk_by_mut">chunk_by_mut</a></li><li><a href="#method.chunks">chunks</a></li><li><a href="#method.chunks_exact">chunks_exact</a></li><li><a href="#method.chunks_exact_mut">chunks_exact_mut</a></li><li><a href="#method.chunks_mut">chunks_mut</a></li><li><a href="#method.clone_from_slice">clone_from_slice</a></li><li><a href="#method.concat">concat</a></li><li><a href="#method.connect">connect</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.copy_from_slice">copy_from_slice</a></li><li><a href="#method.copy_within">copy_within</a></li><li><a href="#method.ends_with">ends_with</a></li><li><a href="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a></li><li><a href="#method.escape_ascii">escape_ascii</a></li><li><a href="#method.fill">fill</a></li><li><a href="#method.fill_with">fill_with</a></li><li><a href="#method.first">first</a></li><li><a href="#method.first_chunk">first_chunk</a></li><li><a href="#method.first_chunk_mut">first_chunk_mut</a></li><li><a href="#method.first_mut">first_mut</a></li><li><a href="#method.flatten">flatten</a></li><li><a href="#method.flatten_mut">flatten_mut</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_many_mut">get_many_mut</a></li><li><a href="#method.get_many_unchecked_mut">get_many_unchecked_mut</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_unchecked">get_unchecked</a></li><li><a href="#method.get_unchecked_mut">get_unchecked_mut</a></li><li><a href="#method.is_ascii">is_ascii</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.is_sorted">is_sorted</a></li><li><a href="#method.is_sorted_by">is_sorted_by</a></li><li><a href="#method.is_sorted_by_key">is_sorted_by_key</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.join">join</a></li><li><a href="#method.last">last</a></li><li><a href="#method.last_chunk">last_chunk</a></li><li><a href="#method.last_chunk_mut">last_chunk_mut</a></li><li><a href="#method.last_mut">last_mut</a></li><li><a href="#method.len">len</a></li><li><a href="#method.make_ascii_lowercase">make_ascii_lowercase</a></li><li><a href="#method.make_ascii_uppercase">make_ascii_uppercase</a></li><li><a href="#method.partition_dedup">partition_dedup</a></li><li><a href="#method.partition_dedup_by">partition_dedup_by</a></li><li><a href="#method.partition_dedup_by_key">partition_dedup_by_key</a></li><li><a href="#method.partition_point">partition_point</a></li><li><a href="#method.rchunks">rchunks</a></li><li><a href="#method.rchunks_exact">rchunks_exact</a></li><li><a href="#method.rchunks_exact_mut">rchunks_exact_mut</a></li><li><a href="#method.rchunks_mut">rchunks_mut</a></li><li><a href="#method.repeat">repeat</a></li><li><a href="#method.reverse">reverse</a></li><li><a href="#method.rotate_left">rotate_left</a></li><li><a href="#method.rotate_right">rotate_right</a></li><li><a href="#method.rsplit">rsplit</a></li><li><a href="#method.rsplit_mut">rsplit_mut</a></li><li><a href="#method.rsplit_once">rsplit_once</a></li><li><a href="#method.rsplitn">rsplitn</a></li><li><a href="#method.rsplitn_mut">rsplitn_mut</a></li><li><a href="#method.select_nth_unstable">select_nth_unstable</a></li><li><a href="#method.select_nth_unstable_by">select_nth_unstable_by</a></li><li><a href="#method.select_nth_unstable_by_key">select_nth_unstable_by_key</a></li><li><a href="#method.sort">sort</a></li><li><a href="#method.sort_by">sort_by</a></li><li><a href="#method.sort_by_cached_key">sort_by_cached_key</a></li><li><a href="#method.sort_by_key">sort_by_key</a></li><li><a href="#method.sort_floats">sort_floats</a></li><li><a href="#method.sort_floats-1">sort_floats</a></li><li><a href="#method.sort_unstable">sort_unstable</a></li><li><a href="#method.sort_unstable_by">sort_unstable_by</a></li><li><a href="#method.sort_unstable_by_key">sort_unstable_by_key</a></li><li><a href="#method.split">split</a></li><li><a href="#method.split_at">split_at</a></li><li><a href="#method.split_at_checked">split_at_checked</a></li><li><a href="#method.split_at_mut">split_at_mut</a></li><li><a href="#method.split_at_mut_checked">split_at_mut_checked</a></li><li><a href="#method.split_at_mut_unchecked">split_at_mut_unchecked</a></li><li><a href="#method.split_at_unchecked">split_at_unchecked</a></li><li><a href="#method.split_first">split_first</a></li><li><a href="#method.split_first_chunk">split_first_chunk</a></li><li><a href="#method.split_first_chunk_mut">split_first_chunk_mut</a></li><li><a href="#method.split_first_mut">split_first_mut</a></li><li><a href="#method.split_inclusive">split_inclusive</a></li><li><a href="#method.split_inclusive_mut">split_inclusive_mut</a></li><li><a href="#method.split_last">split_last</a></li><li><a href="#method.split_last_chunk">split_last_chunk</a></li><li><a href="#method.split_last_chunk_mut">split_last_chunk_mut</a></li><li><a href="#method.split_last_mut">split_last_mut</a></li><li><a href="#method.split_mut">split_mut</a></li><li><a href="#method.split_once">split_once</a></li><li><a href="#method.splitn">splitn</a></li><li><a href="#method.splitn_mut">splitn_mut</a></li><li><a href="#method.starts_with">starts_with</a></li><li><a href="#method.strip_prefix">strip_prefix</a></li><li><a href="#method.strip_suffix">strip_suffix</a></li><li><a href="#method.swap">swap</a></li><li><a href="#method.swap_unchecked">swap_unchecked</a></li><li><a href="#method.swap_with_slice">swap_with_slice</a></li><li><a href="#method.take">take</a></li><li><a href="#method.take_first">take_first</a></li><li><a href="#method.take_first_mut">take_first_mut</a></li><li><a href="#method.take_last">take_last</a></li><li><a href="#method.take_last_mut">take_last_mut</a></li><li><a href="#method.take_mut">take_mut</a></li><li><a href="#method.to_ascii_lowercase">to_ascii_lowercase</a></li><li><a href="#method.to_ascii_uppercase">to_ascii_uppercase</a></li><li><a href="#method.to_vec">to_vec</a></li><li><a href="#method.to_vec_in">to_vec_in</a></li><li><a href="#method.trim_ascii">trim_ascii</a></li><li><a href="#method.trim_ascii_end">trim_ascii_end</a></li><li><a href="#method.trim_ascii_start">trim_ascii_start</a></li><li><a href="#method.windows">windows</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CBStr%3E-for-%5Bu8%5D">AsMut<BStr></a></li><li><a href="#impl-AsMut%3CBStr%3E-for-BString">AsMut<BStr></a></li><li><a href="#impl-AsMut%3C%5Bu8%5D%3E-for-BStr">AsMut<[u8]></a></li><li><a href="#impl-AsRef%3CBStr%3E-for-%5Bu8%5D">AsRef<BStr></a></li><li><a href="#impl-AsRef%3CBStr%3E-for-BStr">AsRef<BStr></a></li><li><a href="#impl-AsRef%3CBStr%3E-for-BString">AsRef<BStr></a></li><li><a href="#impl-AsRef%3CBStr%3E-for-str">AsRef<BStr></a></li><li><a href="#impl-AsRef%3C%5Bu8%5D%3E-for-BStr">AsRef<[u8]></a></li><li><a href="#impl-Borrow%3CBStr%3E-for-%5Bu8%5D">Borrow<BStr></a></li><li><a href="#impl-Borrow%3CBStr%3E-for-BString">Borrow<BStr></a></li><li><a href="#impl-Borrow%3CBStr%3E-for-Vec%3Cu8%3E">Borrow<BStr></a></li><li><a href="#impl-Borrow%3CBStr%3E-for-str">Borrow<BStr></a></li><li><a href="#impl-Borrow%3C%5Bu8%5D%3E-for-BStr">Borrow<[u8]></a></li><li><a href="#impl-BorrowMut%3CBStr%3E-for-%5Bu8%5D">BorrowMut<BStr></a></li><li><a href="#impl-BorrowMut%3CBStr%3E-for-BString">BorrowMut<BStr></a></li><li><a href="#impl-BorrowMut%3CBStr%3E-for-Vec%3Cu8%3E">BorrowMut<BStr></a></li><li><a href="#impl-BorrowMut%3C%5Bu8%5D%3E-for-BStr">BorrowMut<[u8]></a></li><li><a href="#impl-Debug-for-BStr">Debug</a></li><li><a href="#impl-Default-for-%26BStr">Default</a></li><li><a href="#impl-Default-for-%26mut+BStr">Default</a></li><li><a href="#impl-Deref-for-BStr">Deref</a></li><li><a href="#impl-DerefMut-for-BStr">DerefMut</a></li><li><a href="#impl-Display-for-BStr">Display</a></li><li><a href="#impl-Eq-for-BStr">Eq</a></li><li><a href="#impl-From%3C%26BStr%3E-for-%26%5Bu8%5D">From<&'a BStr></a></li><li><a href="#impl-From%3C%26BStr%3E-for-BString">From<&'a BStr></a></li><li><a href="#impl-From%3C%26%5Bu8;+N%5D%3E-for-%26BStr">From<&'a [u8; N]></a></li><li><a href="#impl-From%3C%26%5Bu8%5D%3E-for-%26BStr">From<&'a [u8]></a></li><li><a href="#impl-From%3C%26str%3E-for-%26BStr">From<&'a str></a></li><li><a href="#impl-FromIterator%3C%26BStr%3E-for-BString">FromIterator<&'a BStr></a></li><li><a href="#impl-Hash-for-BStr">Hash</a></li><li><a href="#impl-Index%3CRange%3Cusize%3E%3E-for-BStr">Index<Range<usize>></a></li><li><a href="#impl-Index%3CRangeFrom%3Cusize%3E%3E-for-BStr">Index<RangeFrom<usize>></a></li><li><a href="#impl-Index%3CRangeFull%3E-for-BStr">Index<RangeFull></a></li><li><a href="#impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-BStr">Index<RangeInclusive<usize>></a></li><li><a href="#impl-Index%3CRangeTo%3Cusize%3E%3E-for-BStr">Index<RangeTo<usize>></a></li><li><a href="#impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-BStr">Index<RangeToInclusive<usize>></a></li><li><a href="#impl-Index%3Cusize%3E-for-BStr">Index<usize></a></li><li><a href="#impl-IndexMut%3CRange%3Cusize%3E%3E-for-BStr">IndexMut<Range<usize>></a></li><li><a href="#impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-BStr">IndexMut<RangeFrom<usize>></a></li><li><a href="#impl-IndexMut%3CRangeFull%3E-for-BStr">IndexMut<RangeFull></a></li><li><a href="#impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-BStr">IndexMut<RangeInclusive<usize>></a></li><li><a href="#impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-BStr">IndexMut<RangeTo<usize>></a></li><li><a href="#impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-BStr">IndexMut<RangeToInclusive<usize>></a></li><li><a href="#impl-IndexMut%3Cusize%3E-for-BStr">IndexMut<usize></a></li><li><a href="#impl-Ord-for-BStr">Ord</a></li><li><a href="#impl-PartialEq-for-BStr">PartialEq</a></li><li><a href="#impl-PartialEq%3C%26BStr%3E-for-BString">PartialEq<&'a BStr></a></li><li><a href="#impl-PartialEq%3C%26BStr%3E-for-Vec%3Cu8%3E">PartialEq<&'a BStr></a></li><li><a href="#impl-PartialEq%3C%26%5Bu8%5D%3E-for-BStr">PartialEq<&'a [u8]></a></li><li><a href="#impl-PartialEq%3C%26str%3E-for-BStr">PartialEq<&'a str></a></li><li><a href="#impl-PartialEq%3CBStr%3E-for-%26%5Bu8%5D">PartialEq<BStr></a></li><li><a href="#impl-PartialEq%3CBStr%3E-for-%26str">PartialEq<BStr></a></li><li><a href="#impl-PartialEq%3CBStr%3E-for-%5Bu8%5D">PartialEq<BStr></a></li><li><a href="#impl-PartialEq%3CBStr%3E-for-BString">PartialEq<BStr></a></li><li><a href="#impl-PartialEq%3CBStr%3E-for-Vec%3Cu8%3E">PartialEq<BStr></a></li><li><a href="#impl-PartialEq%3CBStr%3E-for-str">PartialEq<BStr></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-%26BStr">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-BStr">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CCow%3C'a,+BStr%3E%3E-for-%26BStr">PartialEq<Cow<'a, BStr>></a></li><li><a href="#impl-PartialEq%3CCow%3C'a,+%5Bu8%5D%3E%3E-for-%26BStr">PartialEq<Cow<'a, [u8]>></a></li><li><a href="#impl-PartialEq%3CCow%3C'a,+str%3E%3E-for-%26BStr">PartialEq<Cow<'a, str>></a></li><li><a href="#impl-PartialEq%3CString%3E-for-%26BStr">PartialEq<String></a></li><li><a href="#impl-PartialEq%3CString%3E-for-BStr">PartialEq<String></a></li><li><a href="#impl-PartialEq%3CVec%3Cu8%3E%3E-for-%26BStr">PartialEq<Vec<u8>></a></li><li><a href="#impl-PartialEq%3CVec%3Cu8%3E%3E-for-BStr">PartialEq<Vec<u8>></a></li><li><a href="#impl-PartialEq%3C%5Bu8%5D%3E-for-BStr">PartialEq<[u8]></a></li><li><a href="#impl-PartialEq%3Cstr%3E-for-BStr">PartialEq<str></a></li><li><a href="#impl-PartialOrd-for-BStr">PartialOrd</a></li><li><a href="#impl-PartialOrd%3C%26BStr%3E-for-BString">PartialOrd<&'a BStr></a></li><li><a href="#impl-PartialOrd%3C%26BStr%3E-for-Vec%3Cu8%3E">PartialOrd<&'a BStr></a></li><li><a href="#impl-PartialOrd%3C%26%5Bu8%5D%3E-for-BStr">PartialOrd<&'a [u8]></a></li><li><a href="#impl-PartialOrd%3C%26str%3E-for-BStr">PartialOrd<&'a str></a></li><li><a href="#impl-PartialOrd%3CBStr%3E-for-%26%5Bu8%5D">PartialOrd<BStr></a></li><li><a href="#impl-PartialOrd%3CBStr%3E-for-%26str">PartialOrd<BStr></a></li><li><a href="#impl-PartialOrd%3CBStr%3E-for-%5Bu8%5D">PartialOrd<BStr></a></li><li><a href="#impl-PartialOrd%3CBStr%3E-for-BString">PartialOrd<BStr></a></li><li><a href="#impl-PartialOrd%3CBStr%3E-for-Vec%3Cu8%3E">PartialOrd<BStr></a></li><li><a href="#impl-PartialOrd%3CBStr%3E-for-str">PartialOrd<BStr></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-%26BStr">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-BStr">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CString%3E-for-%26BStr">PartialOrd<String></a></li><li><a href="#impl-PartialOrd%3CString%3E-for-BStr">PartialOrd<String></a></li><li><a href="#impl-PartialOrd%3CVec%3Cu8%3E%3E-for-%26BStr">PartialOrd<Vec<u8>></a></li><li><a href="#impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BStr">PartialOrd<Vec<u8>></a></li><li><a href="#impl-PartialOrd%3C%5Bu8%5D%3E-for-BStr">PartialOrd<[u8]></a></li><li><a href="#impl-PartialOrd%3Cstr%3E-for-BStr">PartialOrd<str></a></li><li><a href="#impl-ToOwned-for-BStr">ToOwned</a></li><li><a href="#impl-TryFrom%3C%26BStr%3E-for-%26str">TryFrom<&'a BStr></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Sized-for-BStr">!Sized</a></li><li><a href="#impl-RefUnwindSafe-for-BStr">RefUnwindSafe</a></li><li><a href="#impl-Send-for-BStr">Send</a></li><li><a href="#impl-Sync-for-BStr">Sync</a></li><li><a href="#impl-Unpin-for-BStr">Unpin</a></li><li><a href="#impl-UnwindSafe-for-BStr">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-ToString-for-T">ToString</a></li></ul></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">ba2</a>::<wbr><a class="struct" href="#">BStr</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct BStr { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A wrapper for <code>&[u8]</code> that provides convenient string oriented trait impls.</p> +<p>If you need ownership or a growable byte string buffer, then use +<a href="struct.BString.html"><code>BString</code></a>.</p> +<p>Using a <code>&BStr</code> is just like using a <code>&[u8]</code>, since <code>BStr</code> +implements <code>Deref</code> to <code>[u8]</code>. So all methods available on <code>[u8]</code> +are also available on <code>BStr</code>.</p> +<h2 id="representation"><a class="doc-anchor" href="#representation">§</a>Representation</h2> +<p>A <code>&BStr</code> has the same representation as a <code>&str</code>. That is, a <code>&BStr</code> is +a fat pointer which consists of a pointer to some bytes and a length.</p> +<h2 id="trait-implementations-1"><a class="doc-anchor" href="#trait-implementations-1">§</a>Trait implementations</h2> +<p>The <code>BStr</code> type has a number of trait implementations, and in particular, +defines equality and ordinal comparisons between <code>&BStr</code>, <code>&str</code> and +<code>&[u8]</code> for convenience.</p> +<p>The <code>Debug</code> implementation for <code>BStr</code> shows its bytes as a normal string. +For invalid UTF-8, hex escape sequences are used.</p> +<p>The <code>Display</code> implementation behaves as if <code>BStr</code> were first lossily +converted to a <code>str</code>. Invalid UTF-8 bytes are substituted with the Unicode +replacement codepoint, which looks like this: �.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-BStr" class="impl"><a href="#impl-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a><B, 'a>(bytes: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a B</a>) -> &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Directly creates a <code>BStr</code> slice from anything that can be converted +to a byte slice.</p> +<p>This is very similar to the <a href="crate::B"><code>B</code></a> function, except this +returns a <code>&BStr</code> instead of a <code>&[u8]</code>.</p> +<p>This is a cost-free conversion.</p> +<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5> +<p>You can create <code>BStr</code>’s from byte arrays, byte slices or even string +slices:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::BStr; + +<span class="kw">let </span>a = BStr::new(<span class="string">b"abc"</span>); +<span class="kw">let </span>b = BStr::new(<span class="kw-2">&</span><span class="string">b"abc"</span>[..]); +<span class="kw">let </span>c = BStr::new(<span class="string">"abc"</span>); + +<span class="macro">assert_eq!</span>(a, b); +<span class="macro">assert_eq!</span>(a, c);</code></pre></div> +</div></details></div></details></div><h2 id="deref-methods-%5Bu8%5D" class="section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span><a href="#deref-methods-%5Bu8%5D" class="anchor">§</a></h2><div id="deref-methods-%5Bu8%5D-1" class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.len" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#138">source</a></span><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of elements in the slice.</p> +<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="macro">assert_eq!</span>(a.len(), <span class="number">3</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#154">source</a></span><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice has a length of 0.</p> +<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="macro">assert!</span>(!a.is_empty());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.first" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#173">source</a></span><h4 class="code-header">pub fn <a href="#method.first" class="fn">first</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>></h4></section></summary><div class="docblock"><p>Returns the first element of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>), v.first()); + +<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.first());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.first_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#193">source</a></span><h4 class="code-header">pub fn <a href="#method.first_mut" class="fn">first_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>></h4></section></summary><div class="docblock"><p>Returns a mutable pointer to the first element of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(first) = x.first_mut() { + <span class="kw-2">*</span>first = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">5</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_first" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#213">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first" class="fn">split_first</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first() { + <span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="number">0</span>); + <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_first_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#235">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first_mut" class="fn">split_first_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first_mut() { + <span class="kw-2">*</span>first = <span class="number">3</span>; + elements[<span class="number">0</span>] = <span class="number">4</span>; + elements[<span class="number">1</span>] = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_last" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#255">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last" class="fn">split_last</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-6"><a class="doc-anchor" href="#examples-6">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last() { + <span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="number">2</span>); + <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>]); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_last_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#277">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last_mut" class="fn">split_last_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-7"><a class="doc-anchor" href="#examples-7">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last_mut() { + <span class="kw-2">*</span>last = <span class="number">3</span>; + elements[<span class="number">0</span>] = <span class="number">4</span>; + elements[<span class="number">1</span>] = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#296">source</a></span><h4 class="code-header">pub fn <a href="#method.last" class="fn">last</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>></h4></section></summary><div class="docblock"><p>Returns the last element of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-8"><a class="doc-anchor" href="#examples-8">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">30</span>), v.last()); + +<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.last());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#316">source</a></span><h4 class="code-header">pub fn <a href="#method.last_mut" class="fn">last_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the last item in the slice.</p> +<h5 id="examples-9"><a class="doc-anchor" href="#examples-9">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(last) = x.last_mut() { + <span class="kw-2">*</span>last = <span class="number">10</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">10</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.first_chunk" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#339">source</a></span><h4 class="code-header">pub fn <a href="#method.first_chunk" class="fn">first_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>></h4></section></summary><div class="docblock"><p>Return an array reference to the first <code>N</code> items in the slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-10"><a class="doc-anchor" href="#examples-10">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>u = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]), u.first_chunk::<<span class="number">2</span>>()); + +<span class="kw">let </span>v: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[<span class="number">10</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.first_chunk::<<span class="number">2</span>>()); + +<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[]), w.first_chunk::<<span class="number">0</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.first_chunk_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#369">source</a></span><h4 class="code-header">pub fn <a href="#method.first_chunk_mut" class="fn">first_chunk_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>></h4></section></summary><div class="docblock"><p>Return a mutable array reference to the first <code>N</code> items in the slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-11"><a class="doc-anchor" href="#examples-11">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(first) = x.first_chunk_mut::<<span class="number">2</span>>() { + first[<span class="number">0</span>] = <span class="number">5</span>; + first[<span class="number">1</span>] = <span class="number">4</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">5</span>, <span class="number">4</span>, <span class="number">2</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.first_chunk_mut::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_first_chunk" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#399">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first_chunk" class="fn">split_first_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Return an array reference to the first <code>N</code> items in the slice and the remaining slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-12"><a class="doc-anchor" href="#examples-12">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first_chunk::<<span class="number">2</span>>() { + <span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>]); + <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">2</span>]); +} + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.split_first_chunk::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_first_chunk_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#434-436">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first_chunk_mut" class="fn">split_first_chunk_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Return a mutable array reference to the first <code>N</code> items in the slice and the remaining +slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-13"><a class="doc-anchor" href="#examples-13">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first_chunk_mut::<<span class="number">2</span>>() { + first[<span class="number">0</span>] = <span class="number">3</span>; + first[<span class="number">1</span>] = <span class="number">4</span>; + elements[<span class="number">0</span>] = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.split_first_chunk_mut::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_last_chunk" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#469">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last_chunk" class="fn">split_last_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>)></h4></section></summary><div class="docblock"><p>Return an array reference to the last <code>N</code> items in the slice and the remaining slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-14"><a class="doc-anchor" href="#examples-14">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((elements, last)) = x.split_last_chunk::<<span class="number">2</span>>() { + <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">0</span>]); + <span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]); +} + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.split_last_chunk::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_last_chunk_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#504-506">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last_chunk_mut" class="fn">split_last_chunk_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>)></h4></section></summary><div class="docblock"><p>Return a mutable array reference to the last <code>N</code> items in the slice and the remaining +slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-15"><a class="doc-anchor" href="#examples-15">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((elements, last)) = x.split_last_chunk_mut::<<span class="number">2</span>>() { + last[<span class="number">0</span>] = <span class="number">3</span>; + last[<span class="number">1</span>] = <span class="number">4</span>; + elements[<span class="number">0</span>] = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.split_last_chunk_mut::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last_chunk" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#539">source</a></span><h4 class="code-header">pub fn <a href="#method.last_chunk" class="fn">last_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>></h4></section></summary><div class="docblock"><p>Return an array reference to the last <code>N</code> items in the slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-16"><a class="doc-anchor" href="#examples-16">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>u = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>]), u.last_chunk::<<span class="number">2</span>>()); + +<span class="kw">let </span>v: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[<span class="number">10</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.last_chunk::<<span class="number">2</span>>()); + +<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[]), w.last_chunk::<<span class="number">0</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last_chunk_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#573">source</a></span><h4 class="code-header">pub fn <a href="#method.last_chunk_mut" class="fn">last_chunk_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>></h4></section></summary><div class="docblock"><p>Return a mutable array reference to the last <code>N</code> items in the slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-17"><a class="doc-anchor" href="#examples-17">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(last) = x.last_chunk_mut::<<span class="number">2</span>>() { + last[<span class="number">0</span>] = <span class="number">10</span>; + last[<span class="number">1</span>] = <span class="number">20</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">10</span>, <span class="number">20</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.last_chunk_mut::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#608-610">source</a></span><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a><I>(&self, index: I) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>><div class="where">where + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>,</div></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice depending on the type of +index.</p> +<ul> +<li>If given a position, returns a reference to the element at that +position or <code>None</code> if out of bounds.</li> +<li>If given a range, returns the subslice corresponding to that range, +or <code>None</code> if out of bounds.</li> +</ul> +<h5 id="examples-18"><a class="doc-anchor" href="#examples-18">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">40</span>), v.get(<span class="number">1</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>][..]), v.get(<span class="number">0</span>..<span class="number">2</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">3</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">0</span>..<span class="number">4</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#633-635">source</a></span><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a><I>( + &mut self, + index: I +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>><div class="where">where + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>,</div></h4></section></summary><div class="docblock"><p>Returns a mutable reference to an element or subslice depending on the +type of index (see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.get" title="method slice::get"><code>get</code></a>) or <code>None</code> if the index is out of bounds.</p> +<h5 id="examples-19"><a class="doc-anchor" href="#examples-19">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(elem) = x.get_mut(<span class="number">1</span>) { + <span class="kw-2">*</span>elem = <span class="number">42</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">42</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_unchecked" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#670-672">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked" class="fn">get_unchecked</a><I>( + &self, + index: I +) -> &<I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><div class="where">where + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>,</div></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice, without doing bounds +checking.</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.get" title="method slice::get"><code>get</code></a>.</p> +<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting reference is not used.</p> +<p>You can think of this like <code>.get(index).unwrap_unchecked()</code>. It’s UB +to call <code>.get_unchecked(len)</code>, even if you immediately convert to a +pointer. And it’s UB to call <code>.get_unchecked(..len + 1)</code>, +<code>.get_unchecked(..=len)</code>, or similar.</p> +<h5 id="examples-20"><a class="doc-anchor" href="#examples-20">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; + +<span class="kw">unsafe </span>{ + <span class="macro">assert_eq!</span>(x.get_unchecked(<span class="number">1</span>), <span class="kw-2">&</span><span class="number">2</span>); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_unchecked_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#712-714">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked_mut" class="fn">get_unchecked_mut</a><I>( + &mut self, + index: I +) -> &mut <I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><div class="where">where + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>,</div></h4></section></summary><div class="docblock"><p>Returns a mutable reference to an element or subslice, without doing +bounds checking.</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.get_mut" title="method slice::get_mut"><code>get_mut</code></a>.</p> +<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting reference is not used.</p> +<p>You can think of this like <code>.get_mut(index).unwrap_unchecked()</code>. It’s +UB to call <code>.get_unchecked_mut(len)</code>, even if you immediately convert +to a pointer. And it’s UB to call <code>.get_unchecked_mut(..len + 1)</code>, +<code>.get_unchecked_mut(..=len)</code>, or similar.</p> +<h5 id="examples-21"><a class="doc-anchor" href="#examples-21">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>elem = x.get_unchecked_mut(<span class="number">1</span>); + <span class="kw-2">*</span>elem = <span class="number">13</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">13</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ptr" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#753">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const T</a></h4></section></summary><div class="docblock"><p>Returns a raw pointer to the slice’s buffer.</p> +<p>The caller must ensure that the slice outlives the pointer this +function returns, or else it will end up pointing to garbage.</p> +<p>The caller must also ensure that the memory the pointer (non-transitively) points to +is never written to (except inside an <code>UnsafeCell</code>) using this pointer or any pointer +derived from it. If you need to mutate the contents of the slice, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.as_mut_ptr" title="method slice::as_mut_ptr"><code>as_mut_ptr</code></a>.</p> +<p>Modifying the container referenced by this slice may cause its buffer +to be reallocated, which would also make any pointers to it invalid.</p> +<h5 id="examples-22"><a class="doc-anchor" href="#examples-22">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">let </span>x_ptr = x.as_ptr(); + +<span class="kw">unsafe </span>{ + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() { + <span class="macro">assert_eq!</span>(x.get_unchecked(i), <span class="kw-2">&*</span>x_ptr.add(i)); + } +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_ptr" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#784">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr" class="fn">as_mut_ptr</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*mut T</a></h4></section></summary><div class="docblock"><p>Returns an unsafe mutable pointer to the slice’s buffer.</p> +<p>The caller must ensure that the slice outlives the pointer this +function returns, or else it will end up pointing to garbage.</p> +<p>Modifying the container referenced by this slice may cause its buffer +to be reallocated, which would also make any pointers to it invalid.</p> +<h5 id="examples-23"><a class="doc-anchor" href="#examples-23">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">let </span>x_ptr = x.as_mut_ptr(); + +<span class="kw">unsafe </span>{ + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() { + <span class="kw-2">*</span>x_ptr.add(i) += <span class="number">2</span>; + } +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ptr_range" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#820">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr_range" class="fn">as_ptr_range</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const T</a>></h4></section></summary><div class="docblock"><p>Returns the two raw pointers spanning the slice.</p> +<p>The returned range is half-open, which means that the end pointer +points <em>one past</em> the last element of the slice. This way, an empty +slice is represented by two equal pointers, and the difference between +the two pointers represents the size of the slice.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.as_ptr" title="method slice::as_ptr"><code>as_ptr</code></a> for warnings on using these pointers. The end pointer +requires extra caution, as it does not point to a valid element in the +slice.</p> +<p>This function is useful for interacting with foreign interfaces which +use two pointers to refer to a range of elements in memory, as is +common in C++.</p> +<p>It can also be useful to check if a pointer to an element refers to an +element of this slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span>x = <span class="kw-2">&</span>a[<span class="number">1</span>] <span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>; +<span class="kw">let </span>y = <span class="kw-2">&</span><span class="number">5 </span><span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>; + +<span class="macro">assert!</span>(a.as_ptr_range().contains(<span class="kw-2">&</span>x)); +<span class="macro">assert!</span>(!a.as_ptr_range().contains(<span class="kw-2">&</span>y));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_ptr_range" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#864">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr_range" class="fn">as_mut_ptr_range</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*mut T</a>></h4></section></summary><div class="docblock"><p>Returns the two unsafe mutable pointers spanning the slice.</p> +<p>The returned range is half-open, which means that the end pointer +points <em>one past</em> the last element of the slice. This way, an empty +slice is represented by two equal pointers, and the difference between +the two pointers represents the size of the slice.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.as_mut_ptr" title="method slice::as_mut_ptr"><code>as_mut_ptr</code></a> for warnings on using these pointers. The end +pointer requires extra caution, as it does not point to a valid element +in the slice.</p> +<p>This function is useful for interacting with foreign interfaces which +use two pointers to refer to a range of elements in memory, as is +common in C++.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.swap" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#895">source</a></span><h4 class="code-header">pub fn <a href="#method.swap" class="fn">swap</a>(&mut self, a: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Swaps two elements in the slice.</p> +<p>If <code>a</code> equals to <code>b</code>, it’s guaranteed that elements won’t change value.</p> +<h5 id="arguments"><a class="doc-anchor" href="#arguments">§</a>Arguments</h5> +<ul> +<li>a - The index of the first element</li> +<li>b - The index of the second element</li> +</ul> +<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5> +<p>Panics if <code>a</code> or <code>b</code> are out of bounds.</p> +<h5 id="examples-24"><a class="doc-anchor" href="#examples-24">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>, <span class="string">"d"</span>, <span class="string">"e"</span>]; +v.swap(<span class="number">2</span>, <span class="number">4</span>); +<span class="macro">assert!</span>(v == [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"e"</span>, <span class="string">"d"</span>, <span class="string">"c"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.swap_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#938">source</a><h4 class="code-header">pub unsafe fn <a href="#method.swap_unchecked" class="fn">swap_unchecked</a>(&mut self, a: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_swap_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Swaps two elements in the slice, without doing bounds checking.</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.swap" title="method slice::swap"><code>swap</code></a>.</p> +<h5 id="arguments-1"><a class="doc-anchor" href="#arguments-1">§</a>Arguments</h5> +<ul> +<li>a - The index of the first element</li> +<li>b - The index of the second element</li> +</ul> +<h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>. +The caller has to ensure that <code>a < self.len()</code> and <code>b < self.len()</code>.</p> +<h5 id="examples-25"><a class="doc-anchor" href="#examples-25">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_swap_unchecked)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>, <span class="string">"d"</span>]; +<span class="comment">// SAFETY: we know that 1 and 3 are both indices of the slice +</span><span class="kw">unsafe </span>{ v.swap_unchecked(<span class="number">1</span>, <span class="number">3</span>) }; +<span class="macro">assert!</span>(v == [<span class="string">"a"</span>, <span class="string">"d"</span>, <span class="string">"c"</span>, <span class="string">"b"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.reverse" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#962">source</a></span><h4 class="code-header">pub fn <a href="#method.reverse" class="fn">reverse</a>(&mut self)</h4></section></summary><div class="docblock"><p>Reverses the order of elements in the slice, in place.</p> +<h5 id="examples-26"><a class="doc-anchor" href="#examples-26">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +v.reverse(); +<span class="macro">assert!</span>(v == [<span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.iter" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1020">source</a></span><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over the slice.</p> +<p>The iterator yields all items from start to end.</p> +<h5 id="examples-27"><a class="doc-anchor" href="#examples-27">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iterator = x.iter(); + +<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">1</span>)); +<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">2</span>)); +<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">4</span>)); +<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.iter_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1039">source</a></span><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.IterMut.html" title="struct core::slice::iter::IterMut">IterMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator that allows modifying each value.</p> +<p>The iterator yields all items from start to end.</p> +<h5 id="examples-28"><a class="doc-anchor" href="#examples-28">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">for </span>elem <span class="kw">in </span>x.iter_mut() { + <span class="kw-2">*</span>elem += <span class="number">2</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.windows" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1088">source</a></span><h4 class="code-header">pub fn <a href="#method.windows" class="fn">windows</a>(&self, size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Windows.html" title="struct core::slice::iter::Windows">Windows</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over all contiguous windows of length +<code>size</code>. The windows overlap. If the slice is shorter than +<code>size</code>, the iterator returns no values.</p> +<h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5> +<p>Panics if <code>size</code> is 0.</p> +<h5 id="examples-29"><a class="doc-anchor" href="#examples-29">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">3</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>If the slice is shorter than <code>size</code>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'f'</span>, <span class="string">'o'</span>, <span class="string">'o'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">4</span>); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>There’s no <code>windows_mut</code>, as that existing would let safe code violate the +“only one <code>&mut</code> at a time to the same thing” rule. However, you can sometimes +use <a href="https://doc.rust-lang.org/1.77.0/core/cell/struct.Cell.html#method.as_slice_of_cells" title="method core::cell::Cell::as_slice_of_cells"><code>Cell::as_slice_of_cells</code></a> in +conjunction with <code>windows</code> to accomplish something similar:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::cell::Cell; + +<span class="kw">let </span><span class="kw-2">mut </span>array = [<span class="string">'R'</span>, <span class="string">'u'</span>, <span class="string">'s'</span>, <span class="string">'t'</span>, <span class="string">' '</span>, <span class="string">'2'</span>, <span class="string">'0'</span>, <span class="string">'1'</span>, <span class="string">'5'</span>]; +<span class="kw">let </span>slice = <span class="kw-2">&mut </span>array[..]; +<span class="kw">let </span>slice_of_cells: <span class="kw-2">&</span>[Cell<char>] = Cell::from_mut(slice).as_slice_of_cells(); +<span class="kw">for </span>w <span class="kw">in </span>slice_of_cells.windows(<span class="number">3</span>) { + Cell::swap(<span class="kw-2">&</span>w[<span class="number">0</span>], <span class="kw-2">&</span>w[<span class="number">2</span>]); +} +<span class="macro">assert_eq!</span>(array, [<span class="string">'s'</span>, <span class="string">'t'</span>, <span class="string">' '</span>, <span class="string">'2'</span>, <span class="string">'0'</span>, <span class="string">'1'</span>, <span class="string">'5'</span>, <span class="string">'u'</span>, <span class="string">'R'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunks" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1123">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks" class="fn">chunks</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Chunks.html" title="struct core::slice::iter::Chunks">Chunks</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the +slice, then the last chunk will not have length <code>chunk_size</code>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact" title="method slice::chunks_exact"><code>chunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly +<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks" title="method slice::rchunks"><code>rchunks</code></a> for the same iterator but starting at the end of the +slice.</p> +<h5 id="panics-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-30"><a class="doc-anchor" href="#examples-30">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'m'</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1162">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_mut" class="fn">chunks_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksMut.html" title="struct core::slice::iter::ChunksMut">ChunksMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the +length of the slice, then the last chunk will not have length <code>chunk_size</code>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact_mut" title="method slice::chunks_exact_mut"><code>chunks_exact_mut</code></a> for a variant of this iterator that returns chunks of always +exactly <code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_mut" title="method slice::rchunks_mut"><code>rchunks_mut</code></a> for the same iterator but starting at +the end of the slice.</p> +<h5 id="panics-3"><a class="doc-anchor" href="#panics-3">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-31"><a class="doc-anchor" href="#examples-31">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.chunks_mut(<span class="number">2</span>) { + <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() { + <span class="kw-2">*</span>elem += count; + } + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_exact" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1200">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact" class="fn">chunks_exact</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksExact.html" title="struct core::slice::iter::ChunksExact">ChunksExact</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the +slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved +from the <code>remainder</code> function of the iterator.</p> +<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the +resulting code better than in the case of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks" title="method slice::chunks"><code>chunks</code></a>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks" title="method slice::chunks"><code>chunks</code></a> for a variant of this iterator that also returns the remainder as a smaller +chunk, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_exact" title="method slice::rchunks_exact"><code>rchunks_exact</code></a> for the same iterator but starting at the end of the slice.</p> +<h5 id="panics-4"><a class="doc-anchor" href="#panics-4">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-32"><a class="doc-anchor" href="#examples-32">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks_exact(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]); +<span class="macro">assert!</span>(iter.next().is_none()); +<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_exact_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1243">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact_mut" class="fn">chunks_exact_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksExactMut.html" title="struct core::slice::iter::ChunksExactMut">ChunksExactMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the +length of the slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be +retrieved from the <code>into_remainder</code> function of the iterator.</p> +<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the +resulting code better than in the case of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_mut" title="method slice::chunks_mut"><code>chunks_mut</code></a>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_mut" title="method slice::chunks_mut"><code>chunks_mut</code></a> for a variant of this iterator that also returns the remainder as a +smaller chunk, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_exact_mut" title="method slice::rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for the same iterator but starting at the end of +the slice.</p> +<h5 id="panics-5"><a class="doc-anchor" href="#panics-5">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-33"><a class="doc-anchor" href="#examples-33">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.chunks_exact_mut(<span class="number">2</span>) { + <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() { + <span class="kw-2">*</span>elem += count; + } + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">0</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_chunks_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1278">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked" class="fn">as_chunks_unchecked</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +assuming that there’s no remainder.</p> +<h5 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h5> +<p>This may only be called when</p> +<ul> +<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li> +<li><code>N != 0</code>.</li> +</ul> +<h5 id="examples-34"><a class="doc-anchor" href="#examples-34">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice: <span class="kw-2">&</span>[char] = <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>]; +<span class="kw">let </span>chunks: <span class="kw-2">&</span>[[char; <span class="number">1</span>]] = + <span class="comment">// SAFETY: 1-element chunks never have remainder + </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() }; +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>], [<span class="string">'o'</span>], [<span class="string">'r'</span>], [<span class="string">'e'</span>], [<span class="string">'m'</span>], [<span class="string">'!'</span>]]); +<span class="kw">let </span>chunks: <span class="kw-2">&</span>[[char; <span class="number">3</span>]] = + <span class="comment">// SAFETY: The slice length (6) is a multiple of 3 + </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() }; +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>], [<span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>]]); + +<span class="comment">// These would be unsound: +// let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5 +// let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed</span></code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_chunks" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1323">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks" class="fn">as_chunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> (&[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>], &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +starting at the beginning of the slice, +and a remainder slice with length strictly less than <code>N</code>.</p> +<h5 id="panics-6"><a class="doc-anchor" href="#panics-6">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-35"><a class="doc-anchor" href="#examples-35">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span>(chunks, remainder) = slice.as_chunks(); +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>, <span class="string">'o'</span>], [<span class="string">'r'</span>, <span class="string">'e'</span>]]); +<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div> +<p>If you expect the slice to be an exact multiple, you can combine +<code>let</code>-<code>else</code> with an empty slice pattern:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice = [<span class="string">'R'</span>, <span class="string">'u'</span>, <span class="string">'s'</span>, <span class="string">'t'</span>]; +<span class="kw">let </span>(chunks, []) = slice.as_chunks::<<span class="number">2</span>>() <span class="kw">else </span>{ + <span class="macro">panic!</span>(<span class="string">"slice didn't have even length"</span>) +}; +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'R'</span>, <span class="string">'u'</span>], [<span class="string">'s'</span>, <span class="string">'t'</span>]]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_rchunks" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1355">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks" class="fn">as_rchunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +starting at the end of the slice, +and a remainder slice with length strictly less than <code>N</code>.</p> +<h5 id="panics-7"><a class="doc-anchor" href="#panics-7">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-36"><a class="doc-anchor" href="#examples-36">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span>(remainder, chunks) = slice.as_rchunks(); +<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&</span>[<span class="string">'l'</span>]); +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'o'</span>, <span class="string">'r'</span>], [<span class="string">'e'</span>, <span class="string">'m'</span>]]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.array_chunks" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1395">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks" class="fn">array_chunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayChunks.html" title="struct core::slice::iter::ArrayChunks">ArrayChunks</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are array references and do not overlap. If <code>N</code> does not divide the +length of the slice, then the last up to <code>N-1</code> elements will be omitted and can be +retrieved from the <code>remainder</code> function of the iterator.</p> +<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact" title="method slice::chunks_exact"><code>chunks_exact</code></a>.</p> +<h5 id="panics-8"><a class="doc-anchor" href="#panics-8">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-37"><a class="doc-anchor" href="#examples-37">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)] +</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_chunks(); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]); +<span class="macro">assert!</span>(iter.next().is_none()); +<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_chunks_unchecked_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1432">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked_mut" class="fn">as_chunks_unchecked_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self +) -> &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +assuming that there’s no remainder.</p> +<h5 id="safety-4"><a class="doc-anchor" href="#safety-4">§</a>Safety</h5> +<p>This may only be called when</p> +<ul> +<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li> +<li><code>N != 0</code>.</li> +</ul> +<h5 id="examples-38"><a class="doc-anchor" href="#examples-38">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice: <span class="kw-2">&mut </span>[char] = <span class="kw-2">&mut </span>[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>]; +<span class="kw">let </span>chunks: <span class="kw-2">&mut </span>[[char; <span class="number">1</span>]] = + <span class="comment">// SAFETY: 1-element chunks never have remainder + </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked_mut() }; +chunks[<span class="number">0</span>] = [<span class="string">'L'</span>]; +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'L'</span>], [<span class="string">'o'</span>], [<span class="string">'r'</span>], [<span class="string">'e'</span>], [<span class="string">'m'</span>], [<span class="string">'!'</span>]]); +<span class="kw">let </span>chunks: <span class="kw-2">&mut </span>[[char; <span class="number">3</span>]] = + <span class="comment">// SAFETY: The slice length (6) is a multiple of 3 + </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked_mut() }; +chunks[<span class="number">1</span>] = [<span class="string">'a'</span>, <span class="string">'x'</span>, <span class="string">'?'</span>]; +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'L'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'a'</span>, <span class="string">'x'</span>, <span class="string">'?'</span>]); + +<span class="comment">// These would be unsound: +// let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5 +// let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed</span></code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_chunks_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1472">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks_mut" class="fn">as_chunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> (&mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>], &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +starting at the beginning of the slice, +and a remainder slice with length strictly less than <code>N</code>.</p> +<h5 id="panics-9"><a class="doc-anchor" href="#panics-9">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-39"><a class="doc-anchor" href="#examples-39">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">let </span>(chunks, remainder) = v.as_chunks_mut(); +remainder[<span class="number">0</span>] = <span class="number">9</span>; +<span class="kw">for </span>chunk <span class="kw">in </span>chunks { + <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>]; + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_rchunks_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1510">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks_mut" class="fn">as_rchunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +starting at the end of the slice, +and a remainder slice with length strictly less than <code>N</code>.</p> +<h5 id="panics-10"><a class="doc-anchor" href="#panics-10">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-40"><a class="doc-anchor" href="#examples-40">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">let </span>(remainder, chunks) = v.as_rchunks_mut(); +remainder[<span class="number">0</span>] = <span class="number">9</span>; +<span class="kw">for </span>chunk <span class="kw">in </span>chunks { + <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>]; + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">9</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.array_chunks_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1552">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks_mut" class="fn">array_chunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayChunksMut.html" title="struct core::slice::iter::ArrayChunksMut">ArrayChunksMut</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are mutable array references and do not overlap. If <code>N</code> does not divide +the length of the slice, then the last up to <code>N-1</code> elements will be omitted and +can be retrieved from the <code>into_remainder</code> function of the iterator.</p> +<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact_mut" title="method slice::chunks_exact_mut"><code>chunks_exact_mut</code></a>.</p> +<h5 id="panics-11"><a class="doc-anchor" href="#panics-11">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-41"><a class="doc-anchor" href="#examples-41">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)] +</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.array_chunks_mut() { + <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>]; + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">0</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.array_windows" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1585">source</a><h4 class="code-header">pub fn <a href="#method.array_windows" class="fn">array_windows</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayWindows.html" title="struct core::slice::iter::ArrayWindows">ArrayWindows</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_windows</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over overlapping windows of <code>N</code> elements of a slice, +starting at the beginning of the slice.</p> +<p>This is the const generic equivalent of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.windows" title="method slice::windows"><code>windows</code></a>.</p> +<p>If <code>N</code> is greater than the size of the slice, it will return no windows.</p> +<h5 id="panics-12"><a class="doc-anchor" href="#panics-12">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-42"><a class="doc-anchor" href="#examples-42">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_windows)] +</span><span class="kw">let </span>slice = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_windows(); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1620">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks" class="fn">rchunks</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunks.html" title="struct core::slice::iter::RChunks">RChunks</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end +of the slice.</p> +<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the +slice, then the last chunk will not have length <code>chunk_size</code>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_exact" title="method slice::rchunks_exact"><code>rchunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly +<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks" title="method slice::chunks"><code>chunks</code></a> for the same iterator but starting at the beginning +of the slice.</p> +<h5 id="panics-13"><a class="doc-anchor" href="#panics-13">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-43"><a class="doc-anchor" href="#examples-43">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'e'</span>, <span class="string">'m'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'o'</span>, <span class="string">'r'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1659">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_mut" class="fn">rchunks_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksMut.html" title="struct core::slice::iter::RChunksMut">RChunksMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end +of the slice.</p> +<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the +length of the slice, then the last chunk will not have length <code>chunk_size</code>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_exact_mut" title="method slice::rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for a variant of this iterator that returns chunks of always +exactly <code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_mut" title="method slice::chunks_mut"><code>chunks_mut</code></a> for the same iterator but starting at the +beginning of the slice.</p> +<h5 id="panics-14"><a class="doc-anchor" href="#panics-14">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-44"><a class="doc-anchor" href="#examples-44">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.rchunks_mut(<span class="number">2</span>) { + <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() { + <span class="kw-2">*</span>elem += count; + } + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_exact" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1699">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact" class="fn">rchunks_exact</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksExact.html" title="struct core::slice::iter::RChunksExact">RChunksExact</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +end of the slice.</p> +<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the +slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved +from the <code>remainder</code> function of the iterator.</p> +<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the +resulting code better than in the case of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks" title="method slice::rchunks"><code>rchunks</code></a>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks" title="method slice::rchunks"><code>rchunks</code></a> for a variant of this iterator that also returns the remainder as a smaller +chunk, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact" title="method slice::chunks_exact"><code>chunks_exact</code></a> for the same iterator but starting at the beginning of the +slice.</p> +<h5 id="panics-15"><a class="doc-anchor" href="#panics-15">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-45"><a class="doc-anchor" href="#examples-45">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks_exact(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'e'</span>, <span class="string">'m'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'o'</span>, <span class="string">'r'</span>]); +<span class="macro">assert!</span>(iter.next().is_none()); +<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'l'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_exact_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1743">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact_mut" class="fn">rchunks_exact_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksExactMut.html" title="struct core::slice::iter::RChunksExactMut">RChunksExactMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end +of the slice.</p> +<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the +length of the slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be +retrieved from the <code>into_remainder</code> function of the iterator.</p> +<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the +resulting code better than in the case of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_mut" title="method slice::chunks_mut"><code>chunks_mut</code></a>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_mut" title="method slice::rchunks_mut"><code>rchunks_mut</code></a> for a variant of this iterator that also returns the remainder as a +smaller chunk, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact_mut" title="method slice::chunks_exact_mut"><code>chunks_exact_mut</code></a> for the same iterator but starting at the beginning +of the slice.</p> +<h5 id="panics-16"><a class="doc-anchor" href="#panics-16">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-46"><a class="doc-anchor" href="#examples-46">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.rchunks_exact_mut(<span class="number">2</span>) { + <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() { + <span class="kw-2">*</span>elem += count; + } + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunk_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1782-1784">source</a></span><h4 class="code-header">pub fn <a href="#method.chunk_by" class="fn">chunk_by</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunkBy.html" title="struct core::slice::iter::ChunkBy">ChunkBy</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping runs +of elements using the predicate to separate them.</p> +<p>The predicate is called for every pair of consecutive elements, +meaning that it is called on <code>slice[0]</code> and <code>slice[1]</code>, +followed by <code>slice[1]</code> and <code>slice[2]</code>, and so on.</p> +<h5 id="examples-47"><a class="doc-anchor" href="#examples-47">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunk_by(|a, b| a == b); + +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +<p>This method can be used to extract the sorted subslices:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunk_by(|a, b| a <= b); + +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunk_by_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1823-1825">source</a></span><h4 class="code-header">pub fn <a href="#method.chunk_by_mut" class="fn">chunk_by_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunkByMut.html" title="struct core::slice::iter::ChunkByMut">ChunkByMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping mutable +runs of elements using the predicate to separate them.</p> +<p>The predicate is called for every pair of consecutive elements, +meaning that it is called on <code>slice[0]</code> and <code>slice[1]</code>, +followed by <code>slice[1]</code> and <code>slice[2]</code>, and so on.</p> +<h5 id="examples-48"><a class="doc-anchor" href="#examples-48">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunk_by_mut(|a, b| a == b); + +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">3</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +<p>This method can be used to extract the sorted subslices:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunk_by_mut(|a, b| a <= b); + +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1870">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at" class="fn">split_at</a>(&self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one slice into two at an index.</p> +<p>The first will contain all indices from <code>[0, mid)</code> (excluding +the index <code>mid</code> itself) and the second will contain all +indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p> +<h5 id="panics-17"><a class="doc-anchor" href="#panics-17">§</a>Panics</h5> +<p>Panics if <code>mid > len</code>. For a non-panicking alternative see +<a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_checked" title="method slice::split_at_checked"><code>split_at_checked</code></a>.</p> +<h5 id="examples-49"><a class="doc-anchor" href="#examples-49">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]; + +{ + <span class="kw">let </span>(left, right) = v.split_at(<span class="number">0</span>); + <span class="macro">assert_eq!</span>(left, []); + <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +} + +{ + <span class="kw">let </span>(left, right) = v.split_at(<span class="number">2</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +} + +{ + <span class="kw">let </span>(left, right) = v.split_at(<span class="number">6</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); + <span class="macro">assert_eq!</span>(right, []); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1904">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at_mut" class="fn">split_at_mut</a>(&mut self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one mutable slice into two at an index.</p> +<p>The first will contain all indices from <code>[0, mid)</code> (excluding +the index <code>mid</code> itself) and the second will contain all +indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p> +<h5 id="panics-18"><a class="doc-anchor" href="#panics-18">§</a>Panics</h5> +<p>Panics if <code>mid > len</code>. For a non-panicking alternative see +<a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut_checked" title="method slice::split_at_mut_checked"><code>split_at_mut_checked</code></a>.</p> +<h5 id="examples-50"><a class="doc-anchor" href="#examples-50">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]; +<span class="kw">let </span>(left, right) = v.split_at_mut(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]); +<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]); +left[<span class="number">1</span>] = <span class="number">2</span>; +right[<span class="number">1</span>] = <span class="number">4</span>; +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1960">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_unchecked" class="fn">split_at_unchecked</a>(&self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into two at an index, without doing bounds checking.</p> +<p>The first will contain all indices from <code>[0, mid)</code> (excluding +the index <code>mid</code> itself) and the second will contain all +indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at" title="method slice::split_at"><code>split_at</code></a>.</p> +<h5 id="safety-5"><a class="doc-anchor" href="#safety-5">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting reference is not used. The caller has to ensure that +<code>0 <= mid <= self.len()</code>.</p> +<h5 id="examples-51"><a class="doc-anchor" href="#examples-51">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)] + +</span><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]; + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">0</span>); + <span class="macro">assert_eq!</span>(left, []); + <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +} + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">2</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +} + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">6</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); + <span class="macro">assert_eq!</span>(right, []); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_mut_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2014">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_mut_unchecked" class="fn">split_at_mut_unchecked</a>( + &mut self, + mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a> +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into two at an index, without doing bounds checking.</p> +<p>The first will contain all indices from <code>[0, mid)</code> (excluding +the index <code>mid</code> itself) and the second will contain all +indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut" title="method slice::split_at_mut"><code>split_at_mut</code></a>.</p> +<h5 id="safety-6"><a class="doc-anchor" href="#safety-6">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting reference is not used. The caller has to ensure that +<code>0 <= mid <= self.len()</code>.</p> +<h5 id="examples-52"><a class="doc-anchor" href="#examples-52">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]; +<span class="comment">// scoped to restrict the lifetime of the borrows +</span><span class="kw">unsafe </span>{ + <span class="kw">let </span>(left, right) = v.split_at_mut_unchecked(<span class="number">2</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]); + left[<span class="number">1</span>] = <span class="number">2</span>; + right[<span class="number">1</span>] = <span class="number">4</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_checked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2071">source</a><h4 class="code-header">pub fn <a href="#method.split_at_checked" class="fn">split_at_checked</a>(&self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_at_checked</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into two at an index, returning <code>None</code> if the slice is +too short.</p> +<p>If <code>mid ≤ len</code> returns a pair of slices where the first will contain all +indices from <code>[0, mid)</code> (excluding the index <code>mid</code> itself) and the +second will contain all indices from <code>[mid, len)</code> (excluding the index +<code>len</code> itself).</p> +<p>Otherwise, if <code>mid > len</code>, returns <code>None</code>.</p> +<h5 id="examples-53"><a class="doc-anchor" href="#examples-53">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_at_checked)] + +</span><span class="kw">let </span>v = [<span class="number">1</span>, -<span class="number">2</span>, <span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>, -<span class="number">6</span>]; + +{ + <span class="kw">let </span>(left, right) = v.split_at_checked(<span class="number">0</span>).unwrap(); + <span class="macro">assert_eq!</span>(left, []); + <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, -<span class="number">2</span>, <span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>, -<span class="number">6</span>]); +} + +{ + <span class="kw">let </span>(left, right) = v.split_at_checked(<span class="number">2</span>).unwrap(); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, -<span class="number">2</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>, -<span class="number">6</span>]); +} + +{ + <span class="kw">let </span>(left, right) = v.split_at_checked(<span class="number">6</span>).unwrap(); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, -<span class="number">2</span>, <span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>, -<span class="number">6</span>]); + <span class="macro">assert_eq!</span>(right, []); +} + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.split_at_checked(<span class="number">7</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_mut_checked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2112">source</a><h4 class="code-header">pub fn <a href="#method.split_at_mut_checked" class="fn">split_at_mut_checked</a>( + &mut self, + mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_at_checked</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into two at an index, returning <code>None</code> if the +slice is too short.</p> +<p>If <code>mid ≤ len</code> returns a pair of slices where the first will contain all +indices from <code>[0, mid)</code> (excluding the index <code>mid</code> itself) and the +second will contain all indices from <code>[mid, len)</code> (excluding the index +<code>len</code> itself).</p> +<p>Otherwise, if <code>mid > len</code>, returns <code>None</code>.</p> +<h5 id="examples-54"><a class="doc-anchor" href="#examples-54">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_at_checked)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((left, right)) = v.split_at_mut_checked(<span class="number">2</span>) { + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]); + left[<span class="number">1</span>] = <span class="number">2</span>; + right[<span class="number">1</span>] = <span class="number">4</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.split_at_mut_checked(<span class="number">7</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2164-2166">source</a></span><h4 class="code-header">pub fn <a href="#method.split" class="fn">split</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Split.html" title="struct core::slice::iter::Split">Split</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code>. The matched element is not contained in the subslices.</p> +<h5 id="examples-55"><a class="doc-anchor" href="#examples-55">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>If the first element is matched, an empty slice will be the first item +returned by the iterator. Similarly, if the last element in the slice +is matched, an empty slice will be the last item returned by the +iterator:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>If two matched elements are directly adjacent, an empty slice will be +present between them:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">6</span>, <span class="number">33</span>, <span class="number">20</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2186-2188">source</a></span><h4 class="code-header">pub fn <a href="#method.split_mut" class="fn">split_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitMut.html" title="struct core::slice::iter::SplitMut">SplitMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that +match <code>pred</code>. The matched element is not contained in the subslices.</p> +<h5 id="examples-56"><a class="doc-anchor" href="#examples-56">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.split_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + group[<span class="number">0</span>] = <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">1</span>, <span class="number">60</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_inclusive" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2222-2224">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive" class="fn">split_inclusive</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitInclusive.html" title="struct core::slice::iter::SplitInclusive">SplitInclusive</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code>. The matched element is contained in the end of the previous +subslice as a terminator.</p> +<h5 id="examples-57"><a class="doc-anchor" href="#examples-57">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>If the last element of the slice is matched, +that element will be considered the terminator of the preceding slice. +That slice will be the last item returned by the iterator.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">3</span>, <span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">3</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_inclusive_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2246-2248">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive_mut" class="fn">split_inclusive_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitInclusiveMut.html" title="struct core::slice::iter::SplitInclusiveMut">SplitInclusiveMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that +match <code>pred</code>. The matched element is contained in the previous +subslice as a terminator.</p> +<h5 id="examples-58"><a class="doc-anchor" href="#examples-58">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.split_inclusive_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + <span class="kw">let </span>terminator_idx = group.len()-<span class="number">1</span>; + group[terminator_idx] = <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">10</span>, <span class="number">40</span>, <span class="number">1</span>, <span class="number">20</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2282-2284">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit" class="fn">rsplit</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplit.html" title="struct core::slice::iter::RSplit">RSplit</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code>, starting at the end of the slice and working backwards. +The matched element is not contained in the subslices.</p> +<h5 id="examples-59"><a class="doc-anchor" href="#examples-59">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>, <span class="number">0</span>, <span class="number">44</span>, <span class="number">55</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rsplit(|num| <span class="kw-2">*</span>num == <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">44</span>, <span class="number">55</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>]); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +<p>As with <code>split()</code>, if the first or last element is matched, an empty +slice will be the first (or last) item returned by the iterator.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>it = v.rsplit(|n| <span class="kw-2">*</span>n % <span class="number">2 </span>== <span class="number">0</span>); +<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[]); +<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">5</span>]); +<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>]); +<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[]); +<span class="macro">assert_eq!</span>(it.next(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2308-2310">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit_mut" class="fn">rsplit_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitMut.html" title="struct core::slice::iter::RSplitMut">RSplitMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that +match <code>pred</code>, starting at the end of the slice and working +backwards. The matched element is not contained in the subslices.</p> +<h5 id="examples-60"><a class="doc-anchor" href="#examples-60">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">100</span>, <span class="number">400</span>, <span class="number">300</span>, <span class="number">200</span>, <span class="number">600</span>, <span class="number">500</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">0</span>; +<span class="kw">for </span>group <span class="kw">in </span>v.rsplit_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + count += <span class="number">1</span>; + group[<span class="number">0</span>] = count; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">3</span>, <span class="number">400</span>, <span class="number">300</span>, <span class="number">2</span>, <span class="number">600</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.splitn" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2336-2338">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn" class="fn">splitn</a><F>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitN.html" title="struct core::slice::iter::SplitN">SplitN</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is +not contained in the subslices.</p> +<p>The last element returned, if any, will contain the remainder of the +slice.</p> +<h5 id="examples-61"><a class="doc-anchor" href="#examples-61">§</a>Examples</h5> +<p>Print the slice split once by numbers divisible by 3 (i.e., <code>[10, 40]</code>, +<code>[20, 60, 50]</code>):</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.splitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + <span class="macro">println!</span>(<span class="string">"{group:?}"</span>); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.splitn_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2362-2364">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn_mut" class="fn">splitn_mut</a><F>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitNMut.html" title="struct core::slice::iter::SplitNMut">SplitNMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that match +<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is +not contained in the subslices.</p> +<p>The last element returned, if any, will contain the remainder of the +slice.</p> +<h5 id="examples-62"><a class="doc-anchor" href="#examples-62">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.splitn_mut(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + group[<span class="number">0</span>] = <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">1</span>, <span class="number">60</span>, <span class="number">50</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplitn" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2391-2393">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn" class="fn">rsplitn</a><F>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitN.html" title="struct core::slice::iter::RSplitN">RSplitN</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of +the slice and works backwards. The matched element is not contained in +the subslices.</p> +<p>The last element returned, if any, will contain the remainder of the +slice.</p> +<h5 id="examples-63"><a class="doc-anchor" href="#examples-63">§</a>Examples</h5> +<p>Print the slice split once, starting from the end, by numbers divisible +by 3 (i.e., <code>[50]</code>, <code>[10, 40, 30, 20]</code>):</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.rsplitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + <span class="macro">println!</span>(<span class="string">"{group:?}"</span>); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplitn_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2418-2420">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn_mut" class="fn">rsplitn_mut</a><F>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitNMut.html" title="struct core::slice::iter::RSplitNMut">RSplitNMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of +the slice and works backwards. The matched element is not contained in +the subslices.</p> +<p>The last element returned, if any, will contain the remainder of the +slice.</p> +<h5 id="examples-64"><a class="doc-anchor" href="#examples-64">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>s.rsplitn_mut(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + group[<span class="number">0</span>] = <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(s, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_once" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2445-2447">source</a><h4 class="code-header">pub fn <a href="#method.split_once" class="fn">split_once</a><F>(&self, pred: F) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_once</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice on the first element that matches the specified +predicate.</p> +<p>If any matching elements are present in the slice, returns the prefix +before the match and suffix after. The matching element itself is not +included. If no elements match, returns <code>None</code>.</p> +<h5 id="examples-65"><a class="doc-anchor" href="#examples-65">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_once)] +</span><span class="kw">let </span>s = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="macro">assert_eq!</span>(s.split_once(|<span class="kw-2">&</span>x| x == <span class="number">2</span>), <span class="prelude-val">Some</span>(( + <span class="kw-2">&</span>[<span class="number">1</span>][..], + <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>][..] +))); +<span class="macro">assert_eq!</span>(s.split_once(|<span class="kw-2">&</span>x| x == <span class="number">0</span>), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit_once" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2473-2475">source</a><h4 class="code-header">pub fn <a href="#method.rsplit_once" class="fn">rsplit_once</a><F>(&self, pred: F) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_once</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice on the last element that matches the specified +predicate.</p> +<p>If any matching elements are present in the slice, returns the prefix +before the match and suffix after. The matching element itself is not +included. If no elements match, returns <code>None</code>.</p> +<h5 id="examples-66"><a class="doc-anchor" href="#examples-66">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_once)] +</span><span class="kw">let </span>s = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="macro">assert_eq!</span>(s.rsplit_once(|<span class="kw-2">&</span>x| x == <span class="number">2</span>), <span class="prelude-val">Some</span>(( + <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..], + <span class="kw-2">&</span>[<span class="number">4</span>][..] +))); +<span class="macro">assert_eq!</span>(s.rsplit_once(|<span class="kw-2">&</span>x| x == <span class="number">0</span>), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.contains" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2509-2511">source</a></span><h4 class="code-header">pub fn <a href="#method.contains" class="fn">contains</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice contains an element with the given value.</p> +<p>This operation is <em>O</em>(<em>n</em>).</p> +<p>Note that if you have a sorted slice, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search" title="method slice::binary_search"><code>binary_search</code></a> may be faster.</p> +<h5 id="examples-67"><a class="doc-anchor" href="#examples-67">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.contains(<span class="kw-2">&</span><span class="number">30</span>)); +<span class="macro">assert!</span>(!v.contains(<span class="kw-2">&</span><span class="number">50</span>));</code></pre></div> +<p>If you do not have a <code>&T</code>, but some other value that you can compare +with one (for example, <code>String</code> implements <code>PartialEq<str></code>), you can +use <code>iter().any</code>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [String::from(<span class="string">"hello"</span>), String::from(<span class="string">"world"</span>)]; <span class="comment">// slice of `String` +</span><span class="macro">assert!</span>(v.iter().any(|e| e == <span class="string">"hello"</span>)); <span class="comment">// search with `&str` +</span><span class="macro">assert!</span>(!v.iter().any(|e| e == <span class="string">"hi"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.starts_with" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2538-2540">source</a></span><h4 class="code-header">pub fn <a href="#method.starts_with" class="fn">starts_with</a>(&self, needle: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a prefix of the slice.</p> +<h5 id="examples-68"><a class="doc-anchor" href="#examples-68">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>])); +<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>])); +<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&</span>[<span class="number">50</span>])); +<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">50</span>]));</code></pre></div> +<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[])); +<span class="kw">let </span>v: <span class="kw-2">&</span>[u8] = <span class="kw-2">&</span>[]; +<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[]));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.ends_with" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2568-2570">source</a></span><h4 class="code-header">pub fn <a href="#method.ends_with" class="fn">ends_with</a>(&self, needle: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a suffix of the slice.</p> +<h5 id="examples-69"><a class="doc-anchor" href="#examples-69">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[<span class="number">30</span>])); +<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>])); +<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&</span>[<span class="number">50</span>])); +<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&</span>[<span class="number">50</span>, <span class="number">30</span>]));</code></pre></div> +<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[])); +<span class="kw">let </span>v: <span class="kw-2">&</span>[u8] = <span class="kw-2">&</span>[]; +<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[]));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.strip_prefix" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2598-2600">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_prefix" class="fn">strip_prefix</a><P>(&self, prefix: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&P</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>><div class="where">where + P: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a><Item = T> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns a subslice with the prefix removed.</p> +<p>If the slice starts with <code>prefix</code>, returns the subslice after the prefix, wrapped in <code>Some</code>. +If <code>prefix</code> is empty, simply returns the original slice.</p> +<p>If the slice does not start with <code>prefix</code>, returns <code>None</code>.</p> +<h5 id="examples-70"><a class="doc-anchor" href="#examples-70">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>][..])); +<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">30</span>][..])); +<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>); +<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">50</span>]), <span class="prelude-val">None</span>); + +<span class="kw">let </span>prefix : <span class="kw-2">&</span>str = <span class="string">"he"</span>; +<span class="macro">assert_eq!</span>(<span class="string">b"hello"</span>.strip_prefix(prefix.as_bytes()), + <span class="prelude-val">Some</span>(<span class="string">b"llo"</span>.as_ref()));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.strip_suffix" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2632-2634">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_suffix" class="fn">strip_suffix</a><P>(&self, suffix: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&P</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>><div class="where">where + P: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a><Item = T> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns a subslice with the suffix removed.</p> +<p>If the slice ends with <code>suffix</code>, returns the subslice before the suffix, wrapped in <code>Some</code>. +If <code>suffix</code> is empty, simply returns the original slice.</p> +<p>If the slice does not end with <code>suffix</code>, returns <code>None</code>.</p> +<h5 id="examples-71"><a class="doc-anchor" href="#examples-71">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>][..])); +<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>][..])); +<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>); +<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">50</span>, <span class="number">30</span>]), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.binary_search" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2716-2718">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search" class="fn">binary_search</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Binary searches this slice for a given element. +If the slice is not sorted, the returned result is unspecified and +meaningless.</p> +<p>If the value is found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok" title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.</p> +<p>See also <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by" title="method slice::binary_search_by"><code>binary_search_by</code></a>, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by_key" title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>.</p> +<h5 id="examples-72"><a class="doc-anchor" href="#examples-72">§</a>Examples</h5> +<p>Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in <code>[1, 4]</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; + +<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">13</span>), <span class="prelude-val">Ok</span>(<span class="number">9</span>)); +<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">4</span>), <span class="prelude-val">Err</span>(<span class="number">7</span>)); +<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">100</span>), <span class="prelude-val">Err</span>(<span class="number">13</span>)); +<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&</span><span class="number">1</span>); +<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div> +<p>If you want to find that whole <em>range</em> of matching items, rather than +an arbitrary matching one, that can be done using <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; + +<span class="kw">let </span>low = s.partition_point(|x| x < <span class="kw-2">&</span><span class="number">1</span>); +<span class="macro">assert_eq!</span>(low, <span class="number">1</span>); +<span class="kw">let </span>high = s.partition_point(|x| x <= <span class="kw-2">&</span><span class="number">1</span>); +<span class="macro">assert_eq!</span>(high, <span class="number">5</span>); +<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&</span><span class="number">1</span>); +<span class="macro">assert!</span>((low..high).contains(<span class="kw-2">&</span>r.unwrap())); + +<span class="macro">assert!</span>(s[..low].iter().all(|<span class="kw-2">&</span>x| x < <span class="number">1</span>)); +<span class="macro">assert!</span>(s[low..high].iter().all(|<span class="kw-2">&</span>x| x == <span class="number">1</span>)); +<span class="macro">assert!</span>(s[high..].iter().all(|<span class="kw-2">&</span>x| x > <span class="number">1</span>)); + +<span class="comment">// For something not found, the "range" of equal items is empty +</span><span class="macro">assert_eq!</span>(s.partition_point(|x| x < <span class="kw-2">&</span><span class="number">11</span>), <span class="number">9</span>); +<span class="macro">assert_eq!</span>(s.partition_point(|x| x <= <span class="kw-2">&</span><span class="number">11</span>), <span class="number">9</span>); +<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">11</span>), <span class="prelude-val">Err</span>(<span class="number">9</span>));</code></pre></div> +<p>If you want to insert an item to a sorted vector, while maintaining +sort order, consider using <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; +<span class="kw">let </span>num = <span class="number">42</span>; +<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&</span>x| x < num); +<span class="comment">// The above is equivalent to `let idx = s.binary_search(&num).unwrap_or_else(|x| x);` +</span>s.insert(idx, num); +<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.binary_search_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2767-2769">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by" class="fn">binary_search_by</a><'a, F>(&'a self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class="docblock"><p>Binary searches this slice with a comparator function.</p> +<p>The comparator function should return an order code that indicates +whether its argument is <code>Less</code>, <code>Equal</code> or <code>Greater</code> the desired +target. +If the slice is not sorted or if the comparator function does not +implement an order consistent with the sort order of the underlying +slice, the returned result is unspecified and meaningless.</p> +<p>If the value is found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok" title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.</p> +<p>See also <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search" title="method slice::binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by_key" title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>.</p> +<h5 id="examples-73"><a class="doc-anchor" href="#examples-73">§</a>Examples</h5> +<p>Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in <code>[1, 4]</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; + +<span class="kw">let </span>seek = <span class="number">13</span>; +<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Ok</span>(<span class="number">9</span>)); +<span class="kw">let </span>seek = <span class="number">4</span>; +<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Err</span>(<span class="number">7</span>)); +<span class="kw">let </span>seek = <span class="number">100</span>; +<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Err</span>(<span class="number">13</span>)); +<span class="kw">let </span>seek = <span class="number">1</span>; +<span class="kw">let </span>r = s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)); +<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.binary_search_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.10.0">1.10.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2855-2858">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by_key" class="fn">binary_search_by_key</a><'a, B, F>( + &'a self, + b: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&B</a>, + f: F +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>) -> B, + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Binary searches this slice with a key extraction function.</p> +<p>Assumes that the slice is sorted by the key, for instance with +<a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_by_key" title="method slice::sort_by_key"><code>sort_by_key</code></a> using the same key extraction function. +If the slice is not sorted by the key, the returned result is +unspecified and meaningless.</p> +<p>If the value is found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok" title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.</p> +<p>See also <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search" title="method slice::binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by" title="method slice::binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>.</p> +<h5 id="examples-74"><a class="doc-anchor" href="#examples-74">§</a>Examples</h5> +<p>Looks up a series of four elements in a slice of pairs sorted by +their second elements. The first is found, with a uniquely +determined position; the second and third are not found; the +fourth could match any position in <code>[1, 4]</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [(<span class="number">0</span>, <span class="number">0</span>), (<span class="number">2</span>, <span class="number">1</span>), (<span class="number">4</span>, <span class="number">1</span>), (<span class="number">5</span>, <span class="number">1</span>), (<span class="number">3</span>, <span class="number">1</span>), + (<span class="number">1</span>, <span class="number">2</span>), (<span class="number">2</span>, <span class="number">3</span>), (<span class="number">4</span>, <span class="number">5</span>), (<span class="number">5</span>, <span class="number">8</span>), (<span class="number">3</span>, <span class="number">13</span>), + (<span class="number">1</span>, <span class="number">21</span>), (<span class="number">2</span>, <span class="number">34</span>), (<span class="number">4</span>, <span class="number">55</span>)]; + +<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">13</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Ok</span>(<span class="number">9</span>)); +<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">4</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">7</span>)); +<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">100</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">13</span>)); +<span class="kw">let </span>r = s.binary_search_by_key(<span class="kw-2">&</span><span class="number">1</span>, |<span class="kw-2">&</span>(a, b)| b); +<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_unstable" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2891-2893">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable" class="fn">sort_unstable</a>(&mut self)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice, but might not preserve the order of equal elements.</p> +<p>This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p> +<h5 id="current-implementation"><a class="doc-anchor" href="#current-implementation">§</a>Current implementation</h5> +<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.</p> +<p>It is typically faster than stable sorting, except in a few special cases, e.g., when the +slice consists of several concatenated sorted sequences.</p> +<h5 id="examples-75"><a class="doc-anchor" href="#examples-75">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort_unstable(); +<span class="macro">assert!</span>(v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_unstable_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2946-2948">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable_by" class="fn">sort_unstable_by</a><F>(&mut self, compare: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a comparator function, but might not preserve the order of equal +elements.</p> +<p>This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p> +<p>The comparator function must define a total ordering for the elements in the slice. If +the ordering is not total, the order of the elements is unspecified. An order is a +total order if it is (for all <code>a</code>, <code>b</code> and <code>c</code>):</p> +<ul> +<li>total and antisymmetric: exactly one of <code>a < b</code>, <code>a == b</code> or <code>a > b</code> is true, and</li> +<li>transitive, <code>a < b</code> and <code>b < c</code> implies <code>a < c</code>. The same must hold for both <code>==</code> and <code>></code>.</li> +</ul> +<p>For example, while <a href="https://doc.rust-lang.org/1.77.0/std/primitive.f64.html" title="primitive f64"><code>f64</code></a> doesn’t implement <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use +<code>partial_cmp</code> as our sort function when we know the slice doesn’t contain a <code>NaN</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>floats = [<span class="number">5f64</span>, <span class="number">4.0</span>, <span class="number">1.0</span>, <span class="number">3.0</span>, <span class="number">2.0</span>]; +floats.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap()); +<span class="macro">assert_eq!</span>(floats, [<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>, <span class="number">4.0</span>, <span class="number">5.0</span>]);</code></pre></div> +<h5 id="current-implementation-1"><a class="doc-anchor" href="#current-implementation-1">§</a>Current implementation</h5> +<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.</p> +<p>It is typically faster than stable sorting, except in a few special cases, e.g., when the +slice consists of several concatenated sorted sequences.</p> +<h5 id="examples-76"><a class="doc-anchor" href="#examples-76">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>]; +v.sort_unstable_by(|a, b| a.cmp(b)); +<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]); + +<span class="comment">// reverse sorting +</span>v.sort_unstable_by(|a, b| b.cmp(a)); +<span class="macro">assert!</span>(v == [<span class="number">5</span>, <span class="number">4</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_unstable_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2984-2987">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable_by_key" class="fn">sort_unstable_by_key</a><K, F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function, but might not preserve the order of equal +elements.</p> +<p>This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and <em>O</em>(<em>m</em> * <em>n</em> * log(<em>n</em>)) worst-case, where the key function is +<em>O</em>(<em>m</em>).</p> +<h5 id="current-implementation-2"><a class="doc-anchor" href="#current-implementation-2">§</a>Current implementation</h5> +<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.</p> +<p>Due to its key calling strategy, <a href="#method.sort_unstable_by_key"><code>sort_unstable_by_key</code></a> +is likely to be slower than <a href="#method.sort_by_cached_key"><code>sort_by_cached_key</code></a> in +cases where the key function is expensive.</p> +<h5 id="examples-77"><a class="doc-anchor" href="#examples-77">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort_unstable_by_key(|k| k.abs()); +<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.select_nth_unstable" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3034-3036">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable" class="fn">select_nth_unstable</a>( + &mut self, + index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a> +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Reorder the slice such that the element at <code>index</code> is at its final sorted position.</p> +<p>This reordering has the additional property that any value at position <code>i < index</code> will be +less than or equal to any value at a position <code>j > index</code>. Additionally, this reordering is +unstable (i.e. any number of equal elements may end up at position <code>index</code>), in-place +(i.e. does not allocate), and runs in <em>O</em>(<em>n</em>) time. +This function is also known as “kth element” in other libraries.</p> +<p>It returns a triplet of the following from the reordered slice: +the subslice prior to <code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; +accordingly, the values in those two subslices will respectively all be less-than-or-equal-to +and greater-than-or-equal-to the value of the element at <code>index</code>.</p> +<h5 id="current-implementation-3"><a class="doc-anchor" href="#current-implementation-3">§</a>Current implementation</h5> +<p>The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable" title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.</p> +<h5 id="panics-19"><a class="doc-anchor" href="#panics-19">§</a>Panics</h5> +<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p> +<h5 id="examples-78"><a class="doc-anchor" href="#examples-78">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +<span class="comment">// Find the median +</span>v.select_nth_unstable(<span class="number">2</span>); + +<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort +// about the specified index. +</span><span class="macro">assert!</span>(v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>] || + v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>] || + v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>] || + v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.select_nth_unstable_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3085-3091">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable_by" class="fn">select_nth_unstable_by</a><F>( + &mut self, + index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + compare: F +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class="docblock"><p>Reorder the slice with a comparator function such that the element at <code>index</code> is at its +final sorted position.</p> +<p>This reordering has the additional property that any value at position <code>i < index</code> will be +less than or equal to any value at a position <code>j > index</code> using the comparator function. +Additionally, this reordering is unstable (i.e. any number of equal elements may end up at +position <code>index</code>), in-place (i.e. does not allocate), and runs in <em>O</em>(<em>n</em>) time. +This function is also known as “kth element” in other libraries.</p> +<p>It returns a triplet of the following from +the slice reordered according to the provided comparator function: the subslice prior to +<code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; accordingly, the values in +those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to +the value of the element at <code>index</code>.</p> +<h5 id="current-implementation-4"><a class="doc-anchor" href="#current-implementation-4">§</a>Current implementation</h5> +<p>The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable" title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.</p> +<h5 id="panics-20"><a class="doc-anchor" href="#panics-20">§</a>Panics</h5> +<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p> +<h5 id="examples-79"><a class="doc-anchor" href="#examples-79">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +<span class="comment">// Find the median as if the slice were sorted in descending order. +</span>v.select_nth_unstable_by(<span class="number">2</span>, |a, b| b.cmp(a)); + +<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort +// about the specified index. +</span><span class="macro">assert!</span>(v == [<span class="number">2</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">5</span>, -<span class="number">3</span>] || + v == [<span class="number">2</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>] || + v == [<span class="number">4</span>, <span class="number">2</span>, <span class="number">1</span>, -<span class="number">5</span>, -<span class="number">3</span>] || + v == [<span class="number">4</span>, <span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.select_nth_unstable_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3140-3147">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable_by_key" class="fn">select_nth_unstable_by_key</a><K, F>( + &mut self, + index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + f: F +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Reorder the slice with a key extraction function such that the element at <code>index</code> is at its +final sorted position.</p> +<p>This reordering has the additional property that any value at position <code>i < index</code> will be +less than or equal to any value at a position <code>j > index</code> using the key extraction function. +Additionally, this reordering is unstable (i.e. any number of equal elements may end up at +position <code>index</code>), in-place (i.e. does not allocate), and runs in <em>O</em>(<em>n</em>) time. +This function is also known as “kth element” in other libraries.</p> +<p>It returns a triplet of the following from +the slice reordered according to the provided key extraction function: the subslice prior to +<code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; accordingly, the values in +those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to +the value of the element at <code>index</code>.</p> +<h5 id="current-implementation-5"><a class="doc-anchor" href="#current-implementation-5">§</a>Current implementation</h5> +<p>The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable" title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.</p> +<h5 id="panics-21"><a class="doc-anchor" href="#panics-21">§</a>Panics</h5> +<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p> +<h5 id="examples-80"><a class="doc-anchor" href="#examples-80">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +<span class="comment">// Return the median as if the array were sorted according to absolute value. +</span>v.select_nth_unstable_by_key(<span class="number">2</span>, |a| a.abs()); + +<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort +// about the specified index. +</span><span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>] || + v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, -<span class="number">5</span>, <span class="number">4</span>] || + v == [<span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>] || + v == [<span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.partition_dedup" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3174-3176">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup" class="fn">partition_dedup</a>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all consecutive repeated elements to the end of the slice according to the +<a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq"><code>PartialEq</code></a> trait implementation.</p> +<p>Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.</p> +<p>If the slice is sorted, the first returned slice contains no duplicates.</p> +<h5 id="examples-81"><a class="doc-anchor" href="#examples-81">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]; + +<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup(); + +<span class="macro">assert_eq!</span>(dedup, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]); +<span class="macro">assert_eq!</span>(duplicates, [<span class="number">2</span>, <span class="number">3</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.partition_dedup_by" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3208-3210">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup_by" class="fn">partition_dedup_by</a><F>(&mut self, same_bucket: F) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all but the first of consecutive elements to the end of the slice satisfying +a given equality relation.</p> +<p>Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.</p> +<p>The <code>same_bucket</code> function is passed references to two elements from the slice and +must determine if the elements compare equal. The elements are passed in opposite order +from their order in the slice, so if <code>same_bucket(a, b)</code> returns <code>true</code>, <code>a</code> is moved +at the end of the slice.</p> +<p>If the slice is sorted, the first returned slice contains no duplicates.</p> +<h5 id="examples-82"><a class="doc-anchor" href="#examples-82">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="string">"foo"</span>, <span class="string">"Foo"</span>, <span class="string">"BAZ"</span>, <span class="string">"Bar"</span>, <span class="string">"bar"</span>, <span class="string">"baz"</span>, <span class="string">"BAZ"</span>]; + +<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup_by(|a, b| a.eq_ignore_ascii_case(b)); + +<span class="macro">assert_eq!</span>(dedup, [<span class="string">"foo"</span>, <span class="string">"BAZ"</span>, <span class="string">"Bar"</span>, <span class="string">"baz"</span>]); +<span class="macro">assert_eq!</span>(duplicates, [<span class="string">"bar"</span>, <span class="string">"Foo"</span>, <span class="string">"BAZ"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.partition_dedup_by_key" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3334-3337">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup_by_key" class="fn">partition_dedup_by_key</a><K, F>(&mut self, key: F) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all but the first of consecutive elements to the end of the slice that resolve +to the same key.</p> +<p>Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.</p> +<p>If the slice is sorted, the first returned slice contains no duplicates.</p> +<h5 id="examples-83"><a class="doc-anchor" href="#examples-83">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">10</span>, <span class="number">20</span>, <span class="number">21</span>, <span class="number">30</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">11</span>, <span class="number">13</span>]; + +<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup_by_key(|i| <span class="kw-2">*</span>i / <span class="number">10</span>); + +<span class="macro">assert_eq!</span>(dedup, [<span class="number">10</span>, <span class="number">20</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">11</span>]); +<span class="macro">assert_eq!</span>(duplicates, [<span class="number">21</span>, <span class="number">30</span>, <span class="number">13</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rotate_left" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.26.0">1.26.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3373">source</a></span><h4 class="code-header">pub fn <a href="#method.rotate_left" class="fn">rotate_left</a>(&mut self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the slice in-place such that the first <code>mid</code> elements of the +slice move to the end while the last <code>self.len() - mid</code> elements move to +the front. After calling <code>rotate_left</code>, the element previously at index +<code>mid</code> will become the first element in the slice.</p> +<h5 id="panics-22"><a class="doc-anchor" href="#panics-22">§</a>Panics</h5> +<p>This function will panic if <code>mid</code> is greater than the length of the +slice. Note that <code>mid == self.len()</code> does <em>not</em> panic and is a no-op +rotation.</p> +<h5 id="complexity"><a class="doc-anchor" href="#complexity">§</a>Complexity</h5> +<p>Takes linear (in <code>self.len()</code>) time.</p> +<h5 id="examples-84"><a class="doc-anchor" href="#examples-84">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>]; +a.rotate_left(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(a, [<span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>, <span class="string">'a'</span>, <span class="string">'b'</span>]);</code></pre></div> +<p>Rotating a subslice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>]; +a[<span class="number">1</span>..<span class="number">5</span>].rotate_left(<span class="number">1</span>); +<span class="macro">assert_eq!</span>(a, [<span class="string">'a'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'b'</span>, <span class="string">'f'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rotate_right" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.26.0">1.26.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3416">source</a></span><h4 class="code-header">pub fn <a href="#method.rotate_right" class="fn">rotate_right</a>(&mut self, k: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the slice in-place such that the first <code>self.len() - k</code> +elements of the slice move to the end while the last <code>k</code> elements move +to the front. After calling <code>rotate_right</code>, the element previously at +index <code>self.len() - k</code> will become the first element in the slice.</p> +<h5 id="panics-23"><a class="doc-anchor" href="#panics-23">§</a>Panics</h5> +<p>This function will panic if <code>k</code> is greater than the length of the +slice. Note that <code>k == self.len()</code> does <em>not</em> panic and is a no-op +rotation.</p> +<h5 id="complexity-1"><a class="doc-anchor" href="#complexity-1">§</a>Complexity</h5> +<p>Takes linear (in <code>self.len()</code>) time.</p> +<h5 id="examples-85"><a class="doc-anchor" href="#examples-85">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>]; +a.rotate_right(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(a, [<span class="string">'e'</span>, <span class="string">'f'</span>, <span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div> +<p>Rotating a subslice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>]; +a[<span class="number">1</span>..<span class="number">5</span>].rotate_right(<span class="number">1</span>); +<span class="macro">assert_eq!</span>(a, [<span class="string">'a'</span>, <span class="string">'e'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'f'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.fill" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3439-3441">source</a></span><h4 class="code-header">pub fn <a href="#method.fill" class="fn">fill</a>(&mut self, value: T)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Fills <code>self</code> with elements by cloning <code>value</code>.</p> +<h5 id="examples-86"><a class="doc-anchor" href="#examples-86">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">10</span>]; +buf.fill(<span class="number">1</span>); +<span class="macro">assert_eq!</span>(buf, <span class="macro">vec!</span>[<span class="number">1</span>; <span class="number">10</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.fill_with" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3463-3465">source</a></span><h4 class="code-header">pub fn <a href="#method.fill_with" class="fn">fill_with</a><F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> T,</div></h4></section></summary><div class="docblock"><p>Fills <code>self</code> with elements returned by calling a closure repeatedly.</p> +<p>This method uses a closure to create new values. If you’d rather +<a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> a given value, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.fill" title="method slice::fill"><code>fill</code></a>. If you want to use the <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default"><code>Default</code></a> +trait to generate values, you can pass <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" title="associated function core::default::Default::default"><code>Default::default</code></a> as the +argument.</p> +<h5 id="examples-87"><a class="doc-anchor" href="#examples-87">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[<span class="number">1</span>; <span class="number">10</span>]; +buf.fill_with(Default::default); +<span class="macro">assert_eq!</span>(buf, <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">10</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3526-3528">source</a></span><h4 class="code-header">pub fn <a href="#method.clone_from_slice" class="fn">clone_from_slice</a>(&mut self, src: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Copies the elements from <code>src</code> into <code>self</code>.</p> +<p>The length of <code>src</code> must be the same as <code>self</code>.</p> +<h5 id="panics-24"><a class="doc-anchor" href="#panics-24">§</a>Panics</h5> +<p>This function will panic if the two slices have different lengths.</p> +<h5 id="examples-88"><a class="doc-anchor" href="#examples-88">§</a>Examples</h5> +<p>Cloning two elements from a slice into another:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>src = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>, <span class="number">0</span>]; + +<span class="comment">// Because the slices have to be the same length, +// we slice the source slice from four elements +// to two. It will panic if we don't do this. +</span>dst.clone_from_slice(<span class="kw-2">&</span>src[<span class="number">2</span>..]); + +<span class="macro">assert_eq!</span>(src, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>(dst, [<span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +<p>Rust enforces that there can only be one mutable reference with no +immutable references to a particular piece of data in a particular +scope. Because of this, attempting to use <code>clone_from_slice</code> on a +single slice will result in a compile failure:</p> + +<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +slice[..<span class="number">2</span>].clone_from_slice(<span class="kw-2">&</span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div> +<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut" title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct +sub-slices from a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +{ + <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>); + left.clone_from_slice(<span class="kw-2">&</span>right[<span class="number">1</span>..]); +} + +<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_from_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.9.0">1.9.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3590-3592">source</a></span><h4 class="code-header">pub fn <a href="#method.copy_from_slice" class="fn">copy_from_slice</a>(&mut self, src: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><div class="docblock"><p>Copies all elements from <code>src</code> into <code>self</code>, using a memcpy.</p> +<p>The length of <code>src</code> must be the same as <code>self</code>.</p> +<p>If <code>T</code> does not implement <code>Copy</code>, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.clone_from_slice" title="method slice::clone_from_slice"><code>clone_from_slice</code></a>.</p> +<h5 id="panics-25"><a class="doc-anchor" href="#panics-25">§</a>Panics</h5> +<p>This function will panic if the two slices have different lengths.</p> +<h5 id="examples-89"><a class="doc-anchor" href="#examples-89">§</a>Examples</h5> +<p>Copying two elements from a slice into another:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>src = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>, <span class="number">0</span>]; + +<span class="comment">// Because the slices have to be the same length, +// we slice the source slice from four elements +// to two. It will panic if we don't do this. +</span>dst.copy_from_slice(<span class="kw-2">&</span>src[<span class="number">2</span>..]); + +<span class="macro">assert_eq!</span>(src, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>(dst, [<span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +<p>Rust enforces that there can only be one mutable reference with no +immutable references to a particular piece of data in a particular +scope. Because of this, attempting to use <code>copy_from_slice</code> on a +single slice will result in a compile failure:</p> + +<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +slice[..<span class="number">2</span>].copy_from_slice(<span class="kw-2">&</span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div> +<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut" title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct +sub-slices from a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +{ + <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>); + left.copy_from_slice(<span class="kw-2">&</span>right[<span class="number">1</span>..]); +} + +<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_within" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.37.0">1.37.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3644-3646">source</a></span><h4 class="code-header">pub fn <a href="#method.copy_within" class="fn">copy_within</a><R>(&mut self, src: R, dest: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)<div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><div class="docblock"><p>Copies elements from one part of the slice to another part of itself, +using a memmove.</p> +<p><code>src</code> is the range within <code>self</code> to copy from. <code>dest</code> is the starting +index of the range within <code>self</code> to copy to, which will have the same +length as <code>src</code>. The two ranges may overlap. The ends of the two ranges +must be less than or equal to <code>self.len()</code>.</p> +<h5 id="panics-26"><a class="doc-anchor" href="#panics-26">§</a>Panics</h5> +<p>This function will panic if either range exceeds the end of the slice, +or if the end of <code>src</code> is before the start.</p> +<h5 id="examples-90"><a class="doc-anchor" href="#examples-90">§</a>Examples</h5> +<p>Copying four bytes within a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>bytes = <span class="kw-2">*</span><span class="string">b"Hello, World!"</span>; + +bytes.copy_within(<span class="number">1</span>..<span class="number">5</span>, <span class="number">8</span>); + +<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>bytes, <span class="string">b"Hello, Wello!"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.swap_with_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3711">source</a></span><h4 class="code-header">pub fn <a href="#method.swap_with_slice" class="fn">swap_with_slice</a>(&mut self, other: &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Swaps all elements in <code>self</code> with those in <code>other</code>.</p> +<p>The length of <code>other</code> must be the same as <code>self</code>.</p> +<h5 id="panics-27"><a class="doc-anchor" href="#panics-27">§</a>Panics</h5> +<p>This function will panic if the two slices have different lengths.</p> +<h5 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h5> +<p>Swapping two elements across slices:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice1 = [<span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>slice2 = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; + +slice1.swap_with_slice(<span class="kw-2">&mut </span>slice2[<span class="number">2</span>..]); + +<span class="macro">assert_eq!</span>(slice1, [<span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>(slice2, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>]);</code></pre></div> +<p>Rust enforces that there can only be one mutable reference to a +particular piece of data in a particular scope. Because of this, +attempting to use <code>swap_with_slice</code> on a single slice will result in +a compile failure:</p> + +<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; +slice[..<span class="number">2</span>].swap_with_slice(<span class="kw-2">&mut </span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div> +<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut" title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct +mutable sub-slices from a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +{ + <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>); + left.swap_with_slice(<span class="kw-2">&mut </span>right[<span class="number">1</span>..]); +} + +<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.align_to" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3791">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to" class="fn">align_to</a><U>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[U]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the slice to a slice of another type, ensuring alignment of the types is +maintained.</p> +<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle +slice of a new type, and the suffix slice. How exactly the slice is split up is not +specified; the middle part may be smaller than necessary. However, if this fails to return a +maximal middle part, that is because code is running in a context where performance does not +matter, such as a sanitizer attempting to find alignment bugs. Regular code running +in a default (debug or release) execution <em>will</em> return a maximal middle part.</p> +<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are +zero-sized and will return the original slice without splitting anything.</p> +<h5 id="safety-7"><a class="doc-anchor" href="#safety-7">§</a>Safety</h5> +<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned +middle slice, so all the usual caveats pertaining to <code>transmute::<T, U></code> also apply here.</p> +<h5 id="examples-91"><a class="doc-anchor" href="#examples-91">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{ + <span class="kw">let </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>]; + <span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to::<u16>(); + <span class="comment">// less_efficient_algorithm_for_bytes(prefix); + // more_efficient_algorithm_for_aligned_shorts(shorts); + // less_efficient_algorithm_for_bytes(suffix); +</span>}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.align_to_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3859">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to_mut" class="fn">align_to_mut</a><U>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[U]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the mutable slice to a mutable slice of another type, ensuring alignment of the +types is maintained.</p> +<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle +slice of a new type, and the suffix slice. How exactly the slice is split up is not +specified; the middle part may be smaller than necessary. However, if this fails to return a +maximal middle part, that is because code is running in a context where performance does not +matter, such as a sanitizer attempting to find alignment bugs. Regular code running +in a default (debug or release) execution <em>will</em> return a maximal middle part.</p> +<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are +zero-sized and will return the original slice without splitting anything.</p> +<h5 id="safety-8"><a class="doc-anchor" href="#safety-8">§</a>Safety</h5> +<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned +middle slice, so all the usual caveats pertaining to <code>transmute::<T, U></code> also apply here.</p> +<h5 id="examples-92"><a class="doc-anchor" href="#examples-92">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{ + <span class="kw">let </span><span class="kw-2">mut </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>]; + <span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to_mut::<u16>(); + <span class="comment">// less_efficient_algorithm_for_bytes(prefix); + // more_efficient_algorithm_for_aligned_shorts(shorts); + // less_efficient_algorithm_for_bytes(suffix); +</span>}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_simd" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3959-3963">source</a><h4 class="code-header">pub fn <a href="#method.as_simd" class="fn">as_simd</a><const LANES: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &[<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>], &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; LANES]</a>>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>, + <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a><LANES>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.</p> +<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.align_to" title="method slice::align_to"><code>slice::align_to</code></a>, so has the same weak +postconditions as that method. You’re only assured that +<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p> +<p>Notably, all of the following are possible:</p> +<ul> +<li><code>prefix.len() >= LANES</code>.</li> +<li><code>middle.is_empty()</code> despite <code>self.len() >= 3 * LANES</code>.</li> +<li><code>suffix.len() >= LANES</code>.</li> +</ul> +<p>That said, this is a safe method, so if you’re only writing safe code, +then this can at most cause incorrect logic, not unsoundness.</p> +<h5 id="panics-28"><a class="doc-anchor" href="#panics-28">§</a>Panics</h5> +<p>This will panic if the size of the SIMD type is different from +<code>LANES</code> times that of the scalar.</p> +<p>At the time of writing, the trait restrictions on <code>Simd<T, LANES></code> keeps +that from ever happening, as only power-of-two numbers of lanes are +supported. It’s possible that, in the future, those restrictions might +be lifted in a way that would make it possible to see panics from this +method for something like <code>LANES == 3</code>.</p> +<h5 id="examples-93"><a class="doc-anchor" href="#examples-93">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(portable_simd)] +</span><span class="kw">use </span>core::simd::prelude::<span class="kw-2">*</span>; + +<span class="kw">let </span>short = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span>(prefix, middle, suffix) = short.as_simd::<<span class="number">4</span>>(); +<span class="macro">assert_eq!</span>(middle, []); <span class="comment">// Not enough elements for anything in the middle + +// They might be split in any possible way between prefix and suffix +</span><span class="kw">let </span>it = prefix.iter().chain(suffix).copied(); +<span class="macro">assert_eq!</span>(it.collect::<Vec<<span class="kw">_</span>>>(), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); + +<span class="kw">fn </span>basic_simd_sum(x: <span class="kw-2">&</span>[f32]) -> f32 { + <span class="kw">use </span>std::ops::Add; + <span class="kw">let </span>(prefix, middle, suffix) = x.as_simd(); + <span class="kw">let </span>sums = f32x4::from_array([ + prefix.iter().copied().sum(), + <span class="number">0.0</span>, + <span class="number">0.0</span>, + suffix.iter().copied().sum(), + ]); + <span class="kw">let </span>sums = middle.iter().copied().fold(sums, f32x4::add); + sums.reduce_sum() +} + +<span class="kw">let </span>numbers: Vec<f32> = (<span class="number">1</span>..<span class="number">101</span>).map(|x| x <span class="kw">as _</span>).collect(); +<span class="macro">assert_eq!</span>(basic_simd_sum(<span class="kw-2">&</span>numbers[<span class="number">1</span>..<span class="number">99</span>]), <span class="number">4949.0</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_simd_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4004-4008">source</a><h4 class="code-header">pub fn <a href="#method.as_simd_mut" class="fn">as_simd_mut</a><const LANES: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut [<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>], &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; LANES]</a>>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>, + <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a><LANES>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a mutable slice into a mutable prefix, a middle of aligned SIMD types, +and a mutable suffix.</p> +<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.align_to_mut" title="method slice::align_to_mut"><code>slice::align_to_mut</code></a>, so has the same weak +postconditions as that method. You’re only assured that +<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p> +<p>Notably, all of the following are possible:</p> +<ul> +<li><code>prefix.len() >= LANES</code>.</li> +<li><code>middle.is_empty()</code> despite <code>self.len() >= 3 * LANES</code>.</li> +<li><code>suffix.len() >= LANES</code>.</li> +</ul> +<p>That said, this is a safe method, so if you’re only writing safe code, +then this can at most cause incorrect logic, not unsoundness.</p> +<p>This is the mutable version of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.as_simd" title="method slice::as_simd"><code>slice::as_simd</code></a>; see that for examples.</p> +<h5 id="panics-29"><a class="doc-anchor" href="#panics-29">§</a>Panics</h5> +<p>This will panic if the size of the SIMD type is different from +<code>LANES</code> times that of the scalar.</p> +<p>At the time of writing, the trait restrictions on <code>Simd<T, LANES></code> keeps +that from ever happening, as only power-of-two numbers of lanes are +supported. It’s possible that, in the future, those restrictions might +be lifted in a way that would make it possible to see panics from this +method for something like <code>LANES == 3</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4044-4046">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted" class="fn">is_sorted</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted.</p> +<p>That is, for each element <code>a</code> and its following element <code>b</code>, <code>a <= b</code> must hold. If the +slice yields exactly zero or one element, <code>true</code> is returned.</p> +<p>Note that if <code>Self::Item</code> is only <code>PartialOrd</code>, but not <code>Ord</code>, the above definition +implies that this function returns <code>false</code> if any two consecutive items are not +comparable.</p> +<h5 id="examples-94"><a class="doc-anchor" href="#examples-94">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)] +</span><span class="kw">let </span>empty: [i32; <span class="number">0</span>] = []; + +<span class="macro">assert!</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted()); +<span class="macro">assert!</span>(![<span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>].is_sorted()); +<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted()); +<span class="macro">assert!</span>(empty.is_sorted()); +<span class="macro">assert!</span>(![<span class="number">0.0</span>, <span class="number">1.0</span>, f32::NAN].is_sorted());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted_by" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4073-4075">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by" class="fn">is_sorted_by</a><'a, F>(&'a self, compare: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given comparator function.</p> +<p>Instead of using <code>PartialOrd::partial_cmp</code>, this function uses the given <code>compare</code> +function to determine whether two elements are to be considered in sorted order.</p> +<h5 id="examples-95"><a class="doc-anchor" href="#examples-95">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)] + +</span><span class="macro">assert!</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted_by(|a, b| a <= b)); +<span class="macro">assert!</span>(![<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted_by(|a, b| a < b)); + +<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted_by(|a, b| <span class="bool-val">true</span>)); +<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted_by(|a, b| <span class="bool-val">false</span>)); + +<span class="kw">let </span>empty: [i32; <span class="number">0</span>] = []; +<span class="macro">assert!</span>(empty.is_sorted_by(|a, b| <span class="bool-val">false</span>)); +<span class="macro">assert!</span>(empty.is_sorted_by(|a, b| <span class="bool-val">true</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted_by_key" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4099-4102">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by_key" class="fn">is_sorted_by_key</a><'a, F, K>(&'a self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given key extraction function.</p> +<p>Instead of comparing the slice’s elements directly, this function compares the keys of the +elements, as determined by <code>f</code>. Apart from that, it’s equivalent to <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.is_sorted" title="method slice::is_sorted"><code>is_sorted</code></a>; see its +documentation for more information.</p> +<h5 id="examples-96"><a class="doc-anchor" href="#examples-96">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)] + +</span><span class="macro">assert!</span>([<span class="string">"c"</span>, <span class="string">"bb"</span>, <span class="string">"aaa"</span>].is_sorted_by_key(|s| s.len())); +<span class="macro">assert!</span>(![-<span class="number">2i32</span>, -<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>].is_sorted_by_key(|n| n.abs()));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.partition_point" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.52.0">1.52.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4158-4160">source</a></span><h4 class="code-header">pub fn <a href="#method.partition_point" class="fn">partition_point</a><P>(&self, pred: P) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a><div class="where">where + P: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns the index of the partition point according to the given predicate +(the index of the first element of the second partition).</p> +<p>The slice is assumed to be partitioned according to the given predicate. +This means that all elements for which the predicate returns true are at the start of the slice +and all elements for which the predicate returns false are at the end. +For example, <code>[7, 15, 3, 5, 4, 12, 6]</code> is partitioned under the predicate <code>x % 2 != 0</code> +(all odd numbers are at the start, all even at the end).</p> +<p>If this slice is not partitioned, the returned result is unspecified and meaningless, +as this method performs a kind of binary search.</p> +<p>See also <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search" title="method slice::binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by" title="method slice::binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by_key" title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>.</p> +<h5 id="examples-97"><a class="doc-anchor" href="#examples-97">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>]; +<span class="kw">let </span>i = v.partition_point(|<span class="kw-2">&</span>x| x < <span class="number">5</span>); + +<span class="macro">assert_eq!</span>(i, <span class="number">4</span>); +<span class="macro">assert!</span>(v[..i].iter().all(|<span class="kw-2">&</span>x| x < <span class="number">5</span>)); +<span class="macro">assert!</span>(v[i..].iter().all(|<span class="kw-2">&</span>x| !(x < <span class="number">5</span>)));</code></pre></div> +<p>If all elements of the slice match the predicate, including if the slice +is empty, then the length of the slice will be returned:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">2</span>, <span class="number">4</span>, <span class="number">8</span>]; +<span class="macro">assert_eq!</span>(a.partition_point(|x| x < <span class="kw-2">&</span><span class="number">100</span>), a.len()); +<span class="kw">let </span>a: [i32; <span class="number">0</span>] = []; +<span class="macro">assert_eq!</span>(a.partition_point(|x| x < <span class="kw-2">&</span><span class="number">100</span>), <span class="number">0</span>);</code></pre></div> +<p>If you want to insert an item to a sorted vector, while maintaining +sort order:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; +<span class="kw">let </span>num = <span class="number">42</span>; +<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&</span>x| x < num); +s.insert(idx, num); +<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4216">source</a><h4 class="code-header">pub fn <a href="#method.take" class="fn">take</a><R, 'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, range: R) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>><div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.OneSidedRange.html" title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the subslice corresponding to the given range +and returns a reference to it.</p> +<p>Returns <code>None</code> and does not modify the slice if the given +range is out of bounds.</p> +<p>Note that this method only accepts one-sided ranges such as +<code>2..</code> or <code>..6</code>, but not <code>2..6</code>.</p> +<h5 id="examples-98"><a class="doc-anchor" href="#examples-98">§</a>Examples</h5> +<p>Taking the first three elements of a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>first_three = slice.take(..<span class="number">3</span>).unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'d'</span>]); +<span class="macro">assert_eq!</span>(first_three, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]);</code></pre></div> +<p>Taking the last two elements of a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>tail = slice.take(<span class="number">2</span>..).unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]); +<span class="macro">assert_eq!</span>(tail, <span class="kw-2">&</span>[<span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div> +<p>Getting <code>None</code> when <code>range</code> is out of bounds:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(<span class="number">5</span>..)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(..<span class="number">5</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(..=<span class="number">4</span>)); +<span class="kw">let </span>expected: <span class="kw-2">&</span>[char] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(expected), slice.take(..<span class="number">4</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4285-4288">source</a><h4 class="code-header">pub fn <a href="#method.take_mut" class="fn">take_mut</a><R, 'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, range: R) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>><div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.OneSidedRange.html" title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the subslice corresponding to the given range +and returns a mutable reference to it.</p> +<p>Returns <code>None</code> and does not modify the slice if the given +range is out of bounds.</p> +<p>Note that this method only accepts one-sided ranges such as +<code>2..</code> or <code>..6</code>, but not <code>2..6</code>.</p> +<h5 id="examples-99"><a class="doc-anchor" href="#examples-99">§</a>Examples</h5> +<p>Taking the first three elements of a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>first_three = slice.take_mut(..<span class="number">3</span>).unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&mut </span>[<span class="string">'d'</span>]); +<span class="macro">assert_eq!</span>(first_three, <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]);</code></pre></div> +<p>Taking the last two elements of a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>tail = slice.take_mut(<span class="number">2</span>..).unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>]); +<span class="macro">assert_eq!</span>(tail, <span class="kw-2">&mut </span>[<span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div> +<p>Getting <code>None</code> when <code>range</code> is out of bounds:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(<span class="number">5</span>..)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(..<span class="number">5</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(..=<span class="number">4</span>)); +<span class="kw">let </span>expected: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(expected), slice.take_mut(..<span class="number">4</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_first" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4324">source</a><h4 class="code-header">pub fn <a href="#method.take_first" class="fn">take_first</a><'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the first element of the slice and returns a reference +to it.</p> +<p>Returns <code>None</code> if the slice is empty.</p> +<h5 id="examples-100"><a class="doc-anchor" href="#examples-100">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>first = slice.take_first().unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'b'</span>, <span class="string">'c'</span>]); +<span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="string">'a'</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_first_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4349">source</a><h4 class="code-header">pub fn <a href="#method.take_first_mut" class="fn">take_first_mut</a><'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a mut T</a>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the first element of the slice and returns a mutable +reference to it.</p> +<p>Returns <code>None</code> if the slice is empty.</p> +<h5 id="examples-101"><a class="doc-anchor" href="#examples-101">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>first = slice.take_first_mut().unwrap(); +<span class="kw-2">*</span>first = <span class="string">'d'</span>; + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'b'</span>, <span class="string">'c'</span>]); +<span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="string">'d'</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_last" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4373">source</a><h4 class="code-header">pub fn <a href="#method.take_last" class="fn">take_last</a><'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the last element of the slice and returns a reference +to it.</p> +<p>Returns <code>None</code> if the slice is empty.</p> +<h5 id="examples-102"><a class="doc-anchor" href="#examples-102">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>last = slice.take_last().unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]); +<span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="string">'c'</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_last_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4398">source</a><h4 class="code-header">pub fn <a href="#method.take_last_mut" class="fn">take_last_mut</a><'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a mut T</a>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the last element of the slice and returns a mutable +reference to it.</p> +<p>Returns <code>None</code> if the slice is empty.</p> +<h5 id="examples-103"><a class="doc-anchor" href="#examples-103">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>last = slice.take_last_mut().unwrap(); +<span class="kw-2">*</span>last = <span class="string">'d'</span>; + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]); +<span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="string">'d'</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_many_unchecked_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4432-4435">source</a><h4 class="code-header">pub unsafe fn <a href="#method.get_many_unchecked_mut" class="fn">get_many_unchecked_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self, + indices: [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>] +) -> [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>get_many_mut</code>)</span></div></span></summary><div class="docblock"><p>Returns mutable references to many indices at once, without doing any checks.</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.get_many_mut" title="method slice::get_many_mut"><code>get_many_mut</code></a>.</p> +<h5 id="safety-9"><a class="doc-anchor" href="#safety-9">§</a>Safety</h5> +<p>Calling this method with overlapping or out-of-bounds indices is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting references are not used.</p> +<h5 id="examples-104"><a class="doc-anchor" href="#examples-104">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(get_many_mut)] + +</span><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>[a, b] = x.get_many_unchecked_mut([<span class="number">0</span>, <span class="number">2</span>]); + <span class="kw-2">*</span>a <span class="kw-2">*</span>= <span class="number">10</span>; + <span class="kw-2">*</span>b <span class="kw-2">*</span>= <span class="number">100</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">2</span>, <span class="number">400</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_many_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4474-4477">source</a><h4 class="code-header">pub fn <a href="#method.get_many_mut" class="fn">get_many_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self, + indices: [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>] +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>], <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/struct.GetManyMutError.html" title="struct core::slice::GetManyMutError">GetManyMutError</a><N>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>get_many_mut</code>)</span></div></span></summary><div class="docblock"><p>Returns mutable references to many indices at once.</p> +<p>Returns an error if any index is out-of-bounds, or if the same index was +passed more than once.</p> +<h5 id="examples-105"><a class="doc-anchor" href="#examples-105">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(get_many_mut)] + +</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">if let </span><span class="prelude-val">Ok</span>([a, b]) = v.get_many_mut([<span class="number">0</span>, <span class="number">2</span>]) { + <span class="kw-2">*</span>a = <span class="number">413</span>; + <span class="kw-2">*</span>b = <span class="number">612</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">413</span>, <span class="number">2</span>, <span class="number">612</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_floats" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4592">source</a><h4 class="code-header">pub fn <a href="#method.sort_floats" class="fn">sort_floats</a>(&mut self)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><div class="docblock"><p>Sorts the slice of floats.</p> +<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses +the ordering defined by <a href="https://doc.rust-lang.org/1.77.0/std/primitive.f32.html#method.total_cmp" title="method f32::total_cmp"><code>f32::total_cmp</code></a>.</p> +<h5 id="current-implementation-6"><a class="doc-anchor" href="#current-implementation-6">§</a>Current implementation</h5> +<p>This uses the same sorting algorithm as <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable_by" title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p> +<h5 id="examples-106"><a class="doc-anchor" href="#examples-106">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(sort_floats)] +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">2.6</span>, -<span class="number">5e-8</span>, f32::NAN, <span class="number">8.29</span>, f32::INFINITY, -<span class="number">1.0</span>, <span class="number">0.0</span>, -f32::INFINITY, -<span class="number">0.0</span>]; + +v.sort_floats(); +<span class="kw">let </span>sorted = [-f32::INFINITY, -<span class="number">1.0</span>, -<span class="number">5e-8</span>, -<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">2.6</span>, <span class="number">8.29</span>, f32::INFINITY, f32::NAN]; +<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>v[..<span class="number">8</span>], <span class="kw-2">&</span>sorted[..<span class="number">8</span>]); +<span class="macro">assert!</span>(v[<span class="number">8</span>].is_nan());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_ascii" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#17">source</a></span><h4 class="code-header">pub fn <a href="#method.is_ascii" class="fn">is_ascii</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks if all bytes in this slice are within the ASCII range.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ascii" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#26">source</a><h4 class="code-header">pub fn <a href="#method.as_ascii" class="fn">as_ascii</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html" title="enum core::ascii::ascii_char::AsciiChar">AsciiChar</a>]></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><div class="docblock"><p>If this slice <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.is_ascii" title="method slice::is_ascii"><code>is_ascii</code></a>, returns it as a slice of +<a href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html" title="enum core::ascii::ascii_char::AsciiChar">ASCII characters</a>, otherwise returns <code>None</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ascii_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#44">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_ascii_unchecked" class="fn">as_ascii_unchecked</a>(&self) -> &[<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html" title="enum core::ascii::ascii_char::AsciiChar">AsciiChar</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><div class="docblock"><p>Converts this slice of bytes into a slice of ASCII characters, +without checking whether they’re valid.</p> +<h5 id="safety-10"><a class="doc-anchor" href="#safety-10">§</a>Safety</h5> +<p>Every byte in the slice must be in <code>0..=127</code>, or else this is UB.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.eq_ignore_ascii_case" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#58">source</a></span><h4 class="code-header">pub fn <a href="#method.eq_ignore_ascii_case" class="fn">eq_ignore_ascii_case</a>(&self, other: &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that two slices are an ASCII case-insensitive match.</p> +<p>Same as <code>to_ascii_lowercase(a) == to_ascii_lowercase(b)</code>, +but without allocating and copying temporaries.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.make_ascii_uppercase" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#73">source</a></span><h4 class="code-header">pub fn <a href="#method.make_ascii_uppercase" class="fn">make_ascii_uppercase</a>(&mut self)</h4></section></summary><div class="docblock"><p>Converts this slice to its ASCII upper case equivalent in-place.</p> +<p>ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.</p> +<p>To return a new uppercased value without modifying the existing one, use +<a href="#method.to_ascii_uppercase"><code>to_ascii_uppercase</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.make_ascii_lowercase" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#90">source</a></span><h4 class="code-header">pub fn <a href="#method.make_ascii_lowercase" class="fn">make_ascii_lowercase</a>(&mut self)</h4></section></summary><div class="docblock"><p>Converts this slice to its ASCII lower case equivalent in-place.</p> +<p>ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.</p> +<p>To return a new lowercased value without modifying the existing one, use +<a href="#method.to_ascii_lowercase"><code>to_ascii_lowercase</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.escape_ascii" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.60.0">1.60.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#110">source</a></span><h4 class="code-header">pub fn <a href="#method.escape_ascii" class="fn">escape_ascii</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/ascii/struct.EscapeAscii.html" title="struct core::slice::ascii::EscapeAscii">EscapeAscii</a><'_></h4></section></summary><div class="docblock"><p>Returns an iterator that produces an escaped version of this slice, +treating it as an ASCII string.</p> +<h5 id="examples-107"><a class="doc-anchor" href="#examples-107">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code> +<span class="kw">let </span>s = <span class="string">b"0\t\r\n'\"\\\x9d"</span>; +<span class="kw">let </span>escaped = s.escape_ascii().to_string(); +<span class="macro">assert_eq!</span>(escaped, <span class="string">"0\\t\\r\\n\\'\\\"\\\\\\x9d"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_ascii_start" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#130">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_start" class="fn">trim_ascii_start</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading ASCII whitespace bytes removed.</p> +<p>‘Whitespace’ refers to the definition used by +<code>u8::is_ascii_whitespace</code>.</p> +<h5 id="examples-108"><a class="doc-anchor" href="#examples-108">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)] + +</span><span class="macro">assert_eq!</span>(<span class="string">b" \t hello world\n"</span>.trim_ascii_start(), <span class="string">b"hello world\n"</span>); +<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii_start(), <span class="string">b""</span>); +<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii_start(), <span class="string">b""</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_ascii_end" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#160">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_end" class="fn">trim_ascii_end</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with trailing ASCII whitespace bytes removed.</p> +<p>‘Whitespace’ refers to the definition used by +<code>u8::is_ascii_whitespace</code>.</p> +<h5 id="examples-109"><a class="doc-anchor" href="#examples-109">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)] + +</span><span class="macro">assert_eq!</span>(<span class="string">b"\r hello world\n "</span>.trim_ascii_end(), <span class="string">b"\r hello world"</span>); +<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii_end(), <span class="string">b""</span>); +<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii_end(), <span class="string">b""</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_ascii" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#191">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii" class="fn">trim_ascii</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading and trailing ASCII whitespace bytes +removed.</p> +<p>‘Whitespace’ refers to the definition used by +<code>u8::is_ascii_whitespace</code>.</p> +<h5 id="examples-110"><a class="doc-anchor" href="#examples-110">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)] + +</span><span class="macro">assert_eq!</span>(<span class="string">b"\r hello world\n "</span>.trim_ascii(), <span class="string">b"hello world"</span>); +<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii(), <span class="string">b""</span>); +<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii(), <span class="string">b""</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.flatten" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4517">source</a><h4 class="code-header">pub fn <a href="#method.flatten" class="fn">flatten</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&[[T; N]]</code>, and flattens it to a <code>&[T]</code>.</p> +<h5 id="panics-30"><a class="doc-anchor" href="#panics-30">§</a>Panics</h5> +<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p> +<p>This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +<code>size_of::<T>() > 0</code>, this will never panic.</p> +<h5 id="examples-111"><a class="doc-anchor" href="#examples-111">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)] + +</span><span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); + +<span class="macro">assert_eq!</span>( + [[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(), + [[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>], [<span class="number">5</span>, <span class="number">6</span>]].flatten(), +); + +<span class="kw">let </span>slice_of_empty_arrays: <span class="kw-2">&</span>[[i32; <span class="number">0</span>]] = <span class="kw-2">&</span>[[], [], [], [], []]; +<span class="macro">assert!</span>(slice_of_empty_arrays.flatten().is_empty()); + +<span class="kw">let </span>empty_slice_of_arrays: <span class="kw-2">&</span>[[u32; <span class="number">10</span>]] = <span class="kw-2">&</span>[]; +<span class="macro">assert!</span>(empty_slice_of_arrays.flatten().is_empty());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.flatten_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4555">source</a><h4 class="code-header">pub fn <a href="#method.flatten_mut" class="fn">flatten_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&mut [[T; N]]</code>, and flattens it to a <code>&mut [T]</code>.</p> +<h5 id="panics-31"><a class="doc-anchor" href="#panics-31">§</a>Panics</h5> +<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p> +<p>This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +<code>size_of::<T>() > 0</code>, this will never panic.</p> +<h5 id="examples-112"><a class="doc-anchor" href="#examples-112">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)] + +</span><span class="kw">fn </span>add_5_to_all(slice: <span class="kw-2">&mut </span>[i32]) { + <span class="kw">for </span>i <span class="kw">in </span>slice { + <span class="kw-2">*</span>i += <span class="number">5</span>; + } +} + +<span class="kw">let </span><span class="kw-2">mut </span>array = [[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>], [<span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>]]; +add_5_to_all(array.flatten_mut()); +<span class="macro">assert_eq!</span>(array, [[<span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>], [<span class="number">9</span>, <span class="number">10</span>, <span class="number">11</span>], [<span class="number">12</span>, <span class="number">13</span>, <span class="number">14</span>]]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_str" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/ascii/ascii_char.rs.html#560">source</a><h4 class="code-header">pub fn <a href="#method.as_str" class="fn">as_str</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><div class="docblock"><p>Views this slice of ASCII characters as a UTF-8 <code>str</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_bytes" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/ascii/ascii_char.rs.html#571">source</a><h4 class="code-header">pub fn <a href="#method.as_bytes" class="fn">as_bytes</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><div class="docblock"><p>Views this slice of ASCII characters as a slice of <code>u8</code> bytes.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_floats-1" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4621">source</a><h4 class="code-header">pub fn <a href="#method.sort_floats-1" class="fn">sort_floats</a>(&mut self)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><div class="docblock"><p>Sorts the slice of floats.</p> +<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses +the ordering defined by <a href="https://doc.rust-lang.org/1.77.0/std/primitive.f64.html#method.total_cmp" title="method f64::total_cmp"><code>f64::total_cmp</code></a>.</p> +<h5 id="current-implementation-7"><a class="doc-anchor" href="#current-implementation-7">§</a>Current implementation</h5> +<p>This uses the same sorting algorithm as <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable_by" title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p> +<h5 id="examples-113"><a class="doc-anchor" href="#examples-113">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(sort_floats)] +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">2.6</span>, -<span class="number">5e-8</span>, f64::NAN, <span class="number">8.29</span>, f64::INFINITY, -<span class="number">1.0</span>, <span class="number">0.0</span>, -f64::INFINITY, -<span class="number">0.0</span>]; + +v.sort_floats(); +<span class="kw">let </span>sorted = [-f64::INFINITY, -<span class="number">1.0</span>, -<span class="number">5e-8</span>, -<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">2.6</span>, <span class="number">8.29</span>, f64::INFINITY, f64::NAN]; +<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>v[..<span class="number">8</span>], <span class="kw-2">&</span>sorted[..<span class="number">8</span>]); +<span class="macro">assert!</span>(v[<span class="number">8</span>].is_nan());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_ascii_uppercase" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#621">source</a></span><h4 class="code-header">pub fn <a href="#method.to_ascii_uppercase" class="fn">to_ascii_uppercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII upper case equivalent.</p> +<p>ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.</p> +<p>To uppercase the value in-place, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.make_ascii_uppercase" title="method slice::make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_ascii_lowercase" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#642">source</a></span><h4 class="code-header">pub fn <a href="#method.to_ascii_lowercase" class="fn">to_ascii_lowercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII lower case equivalent.</p> +<p>ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.</p> +<p>To lowercase the value in-place, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.make_ascii_lowercase" title="method slice::make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#207-209">source</a></span><h4 class="code-header">pub fn <a href="#method.sort" class="fn">sort</a>(&mut self)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice.</p> +<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p> +<p>When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable" title="method slice::sort_unstable"><code>sort_unstable</code></a>.</p> +<h5 id="current-implementation-8"><a class="doc-anchor" href="#current-implementation-8">§</a>Current implementation</h5> +<p>The current algorithm is an adaptive, iterative merge sort inspired by +<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.</p> +<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a +non-allocating insertion sort is used instead.</p> +<h5 id="examples-114"><a class="doc-anchor" href="#examples-114">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort(); +<span class="macro">assert!</span>(v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#263-265">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by" class="fn">sort_by</a><F>(&mut self, compare: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a comparator function.</p> +<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p> +<p>The comparator function must define a total ordering for the elements in the slice. If +the ordering is not total, the order of the elements is unspecified. An order is a +total order if it is (for all <code>a</code>, <code>b</code> and <code>c</code>):</p> +<ul> +<li>total and antisymmetric: exactly one of <code>a < b</code>, <code>a == b</code> or <code>a > b</code> is true, and</li> +<li>transitive, <code>a < b</code> and <code>b < c</code> implies <code>a < c</code>. The same must hold for both <code>==</code> and <code>></code>.</li> +</ul> +<p>For example, while <a href="https://doc.rust-lang.org/1.77.0/std/primitive.f64.html" title="primitive f64"><code>f64</code></a> doesn’t implement <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use +<code>partial_cmp</code> as our sort function when we know the slice doesn’t contain a <code>NaN</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>floats = [<span class="number">5f64</span>, <span class="number">4.0</span>, <span class="number">1.0</span>, <span class="number">3.0</span>, <span class="number">2.0</span>]; +floats.sort_by(|a, b| a.partial_cmp(b).unwrap()); +<span class="macro">assert_eq!</span>(floats, [<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>, <span class="number">4.0</span>, <span class="number">5.0</span>]);</code></pre></div> +<p>When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable_by" title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p> +<h5 id="current-implementation-9"><a class="doc-anchor" href="#current-implementation-9">§</a>Current implementation</h5> +<p>The current algorithm is an adaptive, iterative merge sort inspired by +<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.</p> +<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a +non-allocating insertion sort is used instead.</p> +<h5 id="examples-115"><a class="doc-anchor" href="#examples-115">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>]; +v.sort_by(|a, b| a.cmp(b)); +<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]); + +<span class="comment">// reverse sorting +</span>v.sort_by(|a, b| b.cmp(a)); +<span class="macro">assert!</span>(v == [<span class="number">5</span>, <span class="number">4</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#305-308">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by_key" class="fn">sort_by_key</a><K, F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function.</p> +<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>m</em> * <em>n</em> * log(<em>n</em>)) +worst-case, where the key function is <em>O</em>(<em>m</em>).</p> +<p>For expensive key functions (e.g. functions that are not simple property accesses or +basic operations), <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_by_cached_key" title="method slice::sort_by_cached_key"><code>sort_by_cached_key</code></a> is likely to be +significantly faster, as it does not recompute element keys.</p> +<p>When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable_by_key" title="method slice::sort_unstable_by_key"><code>sort_unstable_by_key</code></a>.</p> +<h5 id="current-implementation-10"><a class="doc-anchor" href="#current-implementation-10">§</a>Current implementation</h5> +<p>The current algorithm is an adaptive, iterative merge sort inspired by +<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.</p> +<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a +non-allocating insertion sort is used instead.</p> +<h5 id="examples-116"><a class="doc-anchor" href="#examples-116">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort_by_key(|k| k.abs()); +<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_by_cached_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.34.0">1.34.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#352-355">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by_cached_key" class="fn">sort_by_cached_key</a><K, F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function.</p> +<p>During sorting, the key function is called at most once per element, by using +temporary storage to remember the results of key evaluation. +The order of calls to the key function is unspecified and may change in future versions +of the standard library.</p> +<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>m</em> * <em>n</em> + <em>n</em> * log(<em>n</em>)) +worst-case, where the key function is <em>O</em>(<em>m</em>).</p> +<p>For simple key functions (e.g., functions that are property accesses or +basic operations), <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_by_key" title="method slice::sort_by_key"><code>sort_by_key</code></a> is likely to be +faster.</p> +<h5 id="current-implementation-11"><a class="doc-anchor" href="#current-implementation-11">§</a>Current implementation</h5> +<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.</p> +<p>In the worst case, the algorithm allocates temporary storage in a <code>Vec<(K, usize)></code> the +length of the slice.</p> +<h5 id="examples-117"><a class="doc-anchor" href="#examples-117">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">32</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort_by_cached_key(|k| k.to_string()); +<span class="macro">assert!</span>(v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">2</span>, <span class="number">32</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_vec" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#412-414">source</a></span><h4 class="code-header">pub fn <a href="#method.to_vec" class="fn">to_vec</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Copies <code>self</code> into a new <code>Vec</code>.</p> +<h5 id="examples-118"><a class="doc-anchor" href="#examples-118">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="kw">let </span>x = s.to_vec(); +<span class="comment">// Here, `s` and `x` can be modified independently.</span></code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_vec_in" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#436-438">source</a><h4 class="code-header">pub fn <a href="#method.to_vec_in" class="fn">to_vec_in</a><A>(&self, alloc: A) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T, A><div class="where">where + A: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>allocator_api</code>)</span></div></span></summary><div class="docblock"><p>Copies <code>self</code> into a new <code>Vec</code> with an allocator.</p> +<h5 id="examples-119"><a class="doc-anchor" href="#examples-119">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(allocator_api)] + +</span><span class="kw">use </span>std::alloc::System; + +<span class="kw">let </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="kw">let </span>x = s.to_vec_in(System); +<span class="comment">// Here, `s` and `x` can be modified independently.</span></code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.repeat" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.40.0">1.40.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#489-491">source</a></span><h4 class="code-header">pub fn <a href="#method.repeat" class="fn">repeat</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><div class="docblock"><p>Creates a vector by copying a slice <code>n</code> times.</p> +<h5 id="panics-32"><a class="doc-anchor" href="#panics-32">§</a>Panics</h5> +<p>This function will panic if the capacity would overflow.</p> +<h5 id="examples-120"><a class="doc-anchor" href="#examples-120">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="number">1</span>, <span class="number">2</span>].repeat(<span class="number">3</span>), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +<p>A panic upon overflow:</p> + +<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="comment">// this will panic at runtime +</span><span class="string">b"0123456789abcdef"</span>.repeat(usize::MAX);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.concat" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#557-559">source</a></span><h4 class="code-header">pub fn <a href="#method.concat" class="fn">concat</a><Item>(&self) -> <<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Concat.html" title="trait alloc::slice::Concat">Concat</a><Item>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Concat.html#associatedtype.Output" title="type alloc::slice::Concat::Output">Output</a> <a href="#" class="tooltip" data-notable-ty="<[T] as Concat<Item>>::Output">ⓘ</a><div class="where">where + <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Concat.html" title="trait alloc::slice::Concat">Concat</a><Item>, + Item: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>.</p> +<h5 id="examples-121"><a class="doc-anchor" href="#examples-121">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">"hello"</span>, <span class="string">"world"</span>].concat(), <span class="string">"helloworld"</span>); +<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].concat(), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.join" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#576-578">source</a></span><h4 class="code-header">pub fn <a href="#method.join" class="fn">join</a><Separator>( + &self, + sep: Separator +) -> <<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a><Separator>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html#associatedtype.Output" title="type alloc::slice::Join::Output">Output</a> <a href="#" class="tooltip" data-notable-ty="<[T] as Join<Separator>>::Output">ⓘ</a><div class="where">where + <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a><Separator>,</div></h4></section></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a +given separator between each.</p> +<h5 id="examples-122"><a class="doc-anchor" href="#examples-122">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">"hello"</span>, <span class="string">"world"</span>].join(<span class="string">" "</span>), <span class="string">"hello world"</span>); +<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].join(<span class="kw-2">&</span><span class="number">0</span>), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].join(<span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">0</span>][..]), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.connect" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#596-598">source</a></span><h4 class="code-header">pub fn <a href="#method.connect" class="fn">connect</a><Separator>( + &self, + sep: Separator +) -> <<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a><Separator>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html#associatedtype.Output" title="type alloc::slice::Join::Output">Output</a> <a href="#" class="tooltip" data-notable-ty="<[T] as Join<Separator>>::Output">ⓘ</a><div class="where">where + <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a><Separator>,</div></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.3.0: renamed to join</span></div></span></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a +given separator between each.</p> +<h5 id="examples-123"><a class="doc-anchor" href="#examples-123">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">"hello"</span>, <span class="string">"world"</span>].connect(<span class="string">" "</span>), <span class="string">"hello world"</span>); +<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].connect(<span class="kw-2">&</span><span class="number">0</span>), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5Bu8%5D%3E-for-BStr" class="impl"><a href="#impl-AsMut%3C%5Bu8%5D%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut-2" class="method trait-impl"><a href="#method.as_mut-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&mut [u8]">ⓘ</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CBStr%3E-for-%5Bu8%5D" class="impl"><a href="#impl-AsMut%3CBStr%3E-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CBStr%3E-for-BString" class="impl"><a href="#impl-AsMut%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut-1" class="method trait-impl"><a href="#method.as_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5Bu8%5D%3E-for-BStr" class="impl"><a href="#impl-AsRef%3C%5Bu8%5D%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CBStr%3E-for-%5Bu8%5D" class="impl"><a href="#impl-AsRef%3CBStr%3E-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref-4" class="method trait-impl"><a href="#method.as_ref-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CBStr%3E-for-BStr" class="impl"><a href="#impl-AsRef%3CBStr%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref-1" class="method trait-impl"><a href="#method.as_ref-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CBStr%3E-for-BString" class="impl"><a href="#impl-AsRef%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref-2" class="method trait-impl"><a href="#method.as_ref-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CBStr%3E-for-str" class="impl"><a href="#impl-AsRef%3CBStr%3E-for-str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref-3" class="method trait-impl"><a href="#method.as_ref-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3C%5Bu8%5D%3E-for-BStr" class="impl"><a href="#impl-Borrow%3C%5Bu8%5D%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CBStr%3E-for-%5Bu8%5D" class="impl"><a href="#impl-Borrow%3CBStr%3E-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-4" class="method trait-impl"><a href="#method.borrow-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CBStr%3E-for-BString" class="impl"><a href="#impl-Borrow%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-2" class="method trait-impl"><a href="#method.borrow-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CBStr%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-Borrow%3CBStr%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-3" class="method trait-impl"><a href="#method.borrow-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CBStr%3E-for-str" class="impl"><a href="#impl-Borrow%3CBStr%3E-for-str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3C%5Bu8%5D%3E-for-BStr" class="impl"><a href="#impl-BorrowMut%3C%5Bu8%5D%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&mut [u8]">ⓘ</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CBStr%3E-for-%5Bu8%5D" class="impl"><a href="#impl-BorrowMut%3CBStr%3E-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-3" class="method trait-impl"><a href="#method.borrow_mut-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CBStr%3E-for-BString" class="impl"><a href="#impl-BorrowMut%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-2" class="method trait-impl"><a href="#method.borrow_mut-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CBStr%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-BorrowMut%3CBStr%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-BStr" class="impl"><a href="#impl-Debug-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-%26BStr" class="impl"><a href="#impl-Default-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default-1" class="method trait-impl"><a href="#method.default-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-%26mut+BStr" class="impl"><a href="#impl-Default-for-%26mut+BStr" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for &'a mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> &'a mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-BStr" class="impl"><a href="#impl-Deref-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-BStr" class="impl"><a href="#impl-DerefMut-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&mut self) -> &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&mut [u8]">ⓘ</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-BStr" class="impl"><a href="#impl-Display-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26%5Bu8%5D%3E-for-%26BStr" class="impl"><a href="#impl-From%3C%26%5Bu8%5D%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26%5Bu8;+N%5D%3E-for-%26BStr" class="impl"><a href="#impl-From%3C%26%5Bu8;+N%5D%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]) -> &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26BStr%3E-for-%26%5Bu8%5D" class="impl"><a href="#impl-From%3C%26BStr%3E-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&'a [u8]">ⓘ</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26BStr%3E-for-BString" class="impl"><a href="#impl-From%3C%26BStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26str%3E-for-%26BStr" class="impl"><a href="#impl-From%3C%26str%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C%26BStr%3E-for-BString" class="impl"><a href="#impl-FromIterator%3C%26BStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-BStr" class="impl"><a href="#impl-Hash-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a><__H>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut __H</a>)<div class="where">where + __H: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CRange%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-Index%3CRange%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index-2" class="method trait-impl"><a href="#method.index-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeFrom%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-Index%3CRangeFrom%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeFrom.html" title="struct core::ops::range::RangeFrom">RangeFrom</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-6" class="associatedtype trait-impl"><a href="#associatedtype.Output-6" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index-6" class="method trait-impl"><a href="#method.index-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeFrom.html" title="struct core::ops::range::RangeFrom">RangeFrom</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeFull%3E-for-BStr" class="impl"><a href="#impl-Index%3CRangeFull%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index-3" class="method trait-impl"><a href="#method.index-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, _: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index-1" class="method trait-impl"><a href="#method.index-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeTo%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-Index%3CRangeTo%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeTo.html" title="struct core::ops::range::RangeTo">RangeTo</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl"><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index-4" class="method trait-impl"><a href="#method.index-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeTo.html" title="struct core::ops::range::RangeTo">RangeTo</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeToInclusive.html" title="struct core::ops::range::RangeToInclusive">RangeToInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index" class="method trait-impl"><a href="#method.index" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeToInclusive.html" title="struct core::ops::range::RangeToInclusive">RangeToInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3Cusize%3E-for-BStr" class="impl"><a href="#impl-Index%3Cusize%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output-5" class="associatedtype trait-impl"><a href="#associatedtype.Output-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index-5" class="method trait-impl"><a href="#method.index-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, idx: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRange%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-IndexMut%3CRange%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut-1" class="method trait-impl"><a href="#method.index_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeFrom.html" title="struct core::ops::range::RangeFrom">RangeFrom</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut-4" class="method trait-impl"><a href="#method.index_mut-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeFrom.html" title="struct core::ops::range::RangeFrom">RangeFrom</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeFull%3E-for-BStr" class="impl"><a href="#impl-IndexMut%3CRangeFull%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut-6" class="method trait-impl"><a href="#method.index_mut-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, _: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeFull.html" title="struct core::ops::range::RangeFull">RangeFull</a>) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut-3" class="method trait-impl"><a href="#method.index_mut-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeInclusive.html" title="struct core::ops::range::RangeInclusive">RangeInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeTo.html" title="struct core::ops::range::RangeTo">RangeTo</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut-5" class="method trait-impl"><a href="#method.index_mut-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeTo.html" title="struct core::ops::range::RangeTo">RangeTo</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-BStr" class="impl"><a href="#impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeToInclusive.html" title="struct core::ops::range::RangeToInclusive">RangeToInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut" class="method trait-impl"><a href="#method.index_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, r: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.RangeToInclusive.html" title="struct core::ops::range::RangeToInclusive">RangeToInclusive</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3Cusize%3E-for-BStr" class="impl"><a href="#impl-IndexMut%3Cusize%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.index_mut-2" class="method trait-impl"><a href="#method.index_mut-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, idx: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-BStr" class="impl"><a href="#impl-Ord-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26%5Bu8%5D%3E-for-BStr" class="impl"><a href="#impl-PartialEq%3C%26%5Bu8%5D%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-16" class="method trait-impl"><a href="#method.eq-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-16" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26BStr%3E-for-BString" class="impl"><a href="#impl-PartialEq%3C%26BStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-15" class="method trait-impl"><a href="#method.eq-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26BStr%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-PartialEq%3C%26BStr%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-19" class="method trait-impl"><a href="#method.eq-19" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-19" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-19" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26str%3E-for-BStr" class="impl"><a href="#impl-PartialEq%3C%26str%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-8" class="method trait-impl"><a href="#method.eq-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%5Bu8%5D%3E-for-BStr" class="impl"><a href="#impl-PartialEq%3C%5Bu8%5D%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBStr%3E-for-%26%5Bu8%5D" class="impl"><a href="#impl-PartialEq%3CBStr%3E-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBStr%3E-for-%26str" class="impl"><a href="#impl-PartialEq%3CBStr%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBStr%3E-for-%5Bu8%5D" class="impl"><a href="#impl-PartialEq%3CBStr%3E-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-20" class="method trait-impl"><a href="#method.eq-20" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-20" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-20" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBStr%3E-for-BString" class="impl"><a href="#impl-PartialEq%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-4" class="method trait-impl"><a href="#method.eq-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBStr%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-PartialEq%3CBStr%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-5" class="method trait-impl"><a href="#method.eq-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBStr%3E-for-str" class="impl"><a href="#impl-PartialEq%3CBStr%3E-for-str" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-13" class="method trait-impl"><a href="#method.eq-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-%26BStr" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-14" class="method trait-impl"><a href="#method.eq-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-BStr" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-12" class="method trait-impl"><a href="#method.eq-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CCow%3C'a,+%5Bu8%5D%3E%3E-for-%26BStr" class="impl"><a href="#impl-PartialEq%3CCow%3C'a,+%5Bu8%5D%3E%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-21" class="method trait-impl"><a href="#method.eq-21" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-21" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-21" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CCow%3C'a,+BStr%3E%3E-for-%26BStr" class="impl"><a href="#impl-PartialEq%3CCow%3C'a,+BStr%3E%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-18" class="method trait-impl"><a href="#method.eq-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-18" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CCow%3C'a,+str%3E%3E-for-%26BStr" class="impl"><a href="#impl-PartialEq%3CCow%3C'a,+str%3E%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-7" class="method trait-impl"><a href="#method.eq-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CString%3E-for-%26BStr" class="impl"><a href="#impl-PartialEq%3CString%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-17" class="method trait-impl"><a href="#method.eq-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-17" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CString%3E-for-BStr" class="impl"><a href="#impl-PartialEq%3CString%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-6" class="method trait-impl"><a href="#method.eq-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CVec%3Cu8%3E%3E-for-%26BStr" class="impl"><a href="#impl-PartialEq%3CVec%3Cu8%3E%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-9" class="method trait-impl"><a href="#method.eq-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CVec%3Cu8%3E%3E-for-BStr" class="impl"><a href="#impl-PartialEq%3CVec%3Cu8%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-11" class="method trait-impl"><a href="#method.eq-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3Cstr%3E-for-BStr" class="impl"><a href="#impl-PartialEq%3Cstr%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-3" class="method trait-impl"><a href="#method.eq-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-BStr" class="impl"><a href="#impl-PartialEq-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-10" class="method trait-impl"><a href="#method.eq-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26%5Bu8%5D%3E-for-BStr" class="impl"><a href="#impl-PartialOrd%3C%26%5Bu8%5D%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-9" class="method trait-impl"><a href="#method.partial_cmp-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26BStr%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3C%26BStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-12" class="method trait-impl"><a href="#method.partial_cmp-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26BStr%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-PartialOrd%3C%26BStr%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-13" class="method trait-impl"><a href="#method.partial_cmp-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26str%3E-for-BStr" class="impl"><a href="#impl-PartialOrd%3C%26str%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%5Bu8%5D%3E-for-BStr" class="impl"><a href="#impl-PartialOrd%3C%5Bu8%5D%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-5" class="method trait-impl"><a href="#method.partial_cmp-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBStr%3E-for-%26%5Bu8%5D" class="impl"><a href="#impl-PartialOrd%3CBStr%3E-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-15" class="method trait-impl"><a href="#method.partial_cmp-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBStr%3E-for-%26str" class="impl"><a href="#impl-PartialOrd%3CBStr%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBStr%3E-for-%5Bu8%5D" class="impl"><a href="#impl-PartialOrd%3CBStr%3E-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-6" class="method trait-impl"><a href="#method.partial_cmp-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBStr%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-16" class="method trait-impl"><a href="#method.partial_cmp-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-16" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-16" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-16" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-16" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBStr%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-PartialOrd%3CBStr%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-10" class="method trait-impl"><a href="#method.partial_cmp-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBStr%3E-for-str" class="impl"><a href="#impl-PartialOrd%3CBStr%3E-for-str" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-4" class="method trait-impl"><a href="#method.partial_cmp-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-%26BStr" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-11" class="method trait-impl"><a href="#method.partial_cmp-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-BStr" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-17" class="method trait-impl"><a href="#method.partial_cmp-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-17" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-17" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-17" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-17" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CString%3E-for-%26BStr" class="impl"><a href="#impl-PartialOrd%3CString%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-3" class="method trait-impl"><a href="#method.partial_cmp-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CString%3E-for-BStr" class="impl"><a href="#impl-PartialOrd%3CString%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-8" class="method trait-impl"><a href="#method.partial_cmp-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CVec%3Cu8%3E%3E-for-%26BStr" class="impl"><a href="#impl-PartialOrd%3CVec%3Cu8%3E%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BStr" class="impl"><a href="#impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-18" class="method trait-impl"><a href="#method.partial_cmp-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-18" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-18" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-18" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-18" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3Cstr%3E-for-BStr" class="impl"><a href="#impl-PartialOrd%3Cstr%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-7" class="method trait-impl"><a href="#method.partial_cmp-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-BStr" class="impl"><a href="#impl-PartialOrd-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-14" class="method trait-impl"><a href="#method.partial_cmp-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ToOwned-for-BStr" class="impl"><a href="#impl-ToOwned-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.63.0">1.63.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#77">source</a></span><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: &mut Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" title="type alloc::borrow::ToOwned::Owned">Owned</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3C%26BStr%3E-for-%26str" class="impl"><a href="#impl-TryFrom%3C%26BStr%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = Utf8Error</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(s: &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>, Utf8Error></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Eq-for-BStr" class="impl"><a href="#impl-Eq-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-BStr" class="impl"><a href="#impl-RefUnwindSafe-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section><section id="impl-Send-for-BStr" class="impl"><a href="#impl-Send-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section><section id="impl-Sized-for-BStr" class="impl"><a href="#impl-Sized-for-BStr" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section><section id="impl-Sync-for-BStr" class="impl"><a href="#impl-Sync-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section><section id="impl-Unpin-for-BStr" class="impl"><a href="#impl-Unpin-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section><section id="impl-UnwindSafe-for-BStr" class="impl"><a href="#impl-UnwindSafe-for-BStr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-5" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-4" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2600">source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2606">source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details></div><script type="text/json" id="notable-traits-data">{"&'a [u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","&mut [u8]":"<h3>Notable traits for <code>&mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","<[T] as Concat<Item>>::Output":"<h3>Notable traits for <code>&mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","<[T] as Join<Separator>>::Output":"<h3>Notable traits for <code>&mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A></code></h3><pre><code><div class=\"where\">impl<A> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>"}</script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/struct.BString.html b/ba2/struct.BString.html new file mode 100644 index 0000000..5f2f34e --- /dev/null +++ b/ba2/struct.BString.html @@ -0,0 +1,3136 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A wrapper for `Vec<u8>` that provides convenient string oriented trait impls."><title>BString in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">BString</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li></ul><h3><a href="#deref-methods-Vec%3Cu8%3E">Methods from Deref<Target=Vec<u8>></a></h3><ul class="block deref-methods"><li><a href="#method.allocator">allocator</a></li><li><a href="#method.append">append</a></li><li><a href="#method.as_mut_ptr">as_mut_ptr</a></li><li><a href="#method.as_mut_slice">as_mut_slice</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.as_slice">as_slice</a></li><li><a href="#method.capacity">capacity</a></li><li><a href="#method.clear">clear</a></li><li><a href="#method.dedup">dedup</a></li><li><a href="#method.dedup_by">dedup_by</a></li><li><a href="#method.dedup_by_key">dedup_by_key</a></li><li><a href="#method.drain">drain</a></li><li><a href="#method.extend_from_slice">extend_from_slice</a></li><li><a href="#method.extend_from_within">extend_from_within</a></li><li><a href="#method.extract_if">extract_if</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.len">len</a></li><li><a href="#method.pop">pop</a></li><li><a href="#method.push">push</a></li><li><a href="#method.push_within_capacity">push_within_capacity</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.reserve">reserve</a></li><li><a href="#method.reserve_exact">reserve_exact</a></li><li><a href="#method.resize">resize</a></li><li><a href="#method.resize_with">resize_with</a></li><li><a href="#method.retain">retain</a></li><li><a href="#method.retain_mut">retain_mut</a></li><li><a href="#method.set_len">set_len</a></li><li><a href="#method.shrink_to">shrink_to</a></li><li><a href="#method.shrink_to_fit">shrink_to_fit</a></li><li><a href="#method.spare_capacity_mut">spare_capacity_mut</a></li><li><a href="#method.splice">splice</a></li><li><a href="#method.split_at_spare_mut">split_at_spare_mut</a></li><li><a href="#method.split_off">split_off</a></li><li><a href="#method.swap_remove">swap_remove</a></li><li><a href="#method.truncate">truncate</a></li><li><a href="#method.try_reserve">try_reserve</a></li><li><a href="#method.try_reserve_exact">try_reserve_exact</a></li></ul><h3><a href="#deref-methods-%5BT%5D">Methods from Deref<Target=[T]></a></h3><ul class="block deref-methods"><li><a href="#method.align_to">align_to</a></li><li><a href="#method.align_to_mut">align_to_mut</a></li><li><a href="#method.array_chunks">array_chunks</a></li><li><a href="#method.array_chunks_mut">array_chunks_mut</a></li><li><a href="#method.array_windows">array_windows</a></li><li><a href="#method.as_ascii">as_ascii</a></li><li><a href="#method.as_ascii_unchecked">as_ascii_unchecked</a></li><li><a href="#method.as_bytes">as_bytes</a></li><li><a href="#method.as_chunks">as_chunks</a></li><li><a href="#method.as_chunks_mut">as_chunks_mut</a></li><li><a href="#method.as_chunks_unchecked">as_chunks_unchecked</a></li><li><a href="#method.as_chunks_unchecked_mut">as_chunks_unchecked_mut</a></li><li><a href="#method.as_mut_ptr-1">as_mut_ptr</a></li><li><a href="#method.as_mut_ptr_range">as_mut_ptr_range</a></li><li><a href="#method.as_ptr-1">as_ptr</a></li><li><a href="#method.as_ptr_range">as_ptr_range</a></li><li><a href="#method.as_rchunks">as_rchunks</a></li><li><a href="#method.as_rchunks_mut">as_rchunks_mut</a></li><li><a href="#method.as_simd">as_simd</a></li><li><a href="#method.as_simd_mut">as_simd_mut</a></li><li><a href="#method.as_str">as_str</a></li><li><a href="#method.binary_search">binary_search</a></li><li><a href="#method.binary_search_by">binary_search_by</a></li><li><a href="#method.binary_search_by_key">binary_search_by_key</a></li><li><a href="#method.chunk_by">chunk_by</a></li><li><a href="#method.chunk_by_mut">chunk_by_mut</a></li><li><a href="#method.chunks">chunks</a></li><li><a href="#method.chunks_exact">chunks_exact</a></li><li><a href="#method.chunks_exact_mut">chunks_exact_mut</a></li><li><a href="#method.chunks_mut">chunks_mut</a></li><li><a href="#method.clone_from_slice">clone_from_slice</a></li><li><a href="#method.concat">concat</a></li><li><a href="#method.connect">connect</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.copy_from_slice">copy_from_slice</a></li><li><a href="#method.copy_within">copy_within</a></li><li><a href="#method.ends_with">ends_with</a></li><li><a href="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a></li><li><a href="#method.escape_ascii">escape_ascii</a></li><li><a href="#method.fill">fill</a></li><li><a href="#method.fill_with">fill_with</a></li><li><a href="#method.first">first</a></li><li><a href="#method.first_chunk">first_chunk</a></li><li><a href="#method.first_chunk_mut">first_chunk_mut</a></li><li><a href="#method.first_mut">first_mut</a></li><li><a href="#method.flatten">flatten</a></li><li><a href="#method.flatten_mut">flatten_mut</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_many_mut">get_many_mut</a></li><li><a href="#method.get_many_unchecked_mut">get_many_unchecked_mut</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_unchecked">get_unchecked</a></li><li><a href="#method.get_unchecked_mut">get_unchecked_mut</a></li><li><a href="#method.is_ascii">is_ascii</a></li><li><a href="#method.is_empty-1">is_empty</a></li><li><a href="#method.is_sorted">is_sorted</a></li><li><a href="#method.is_sorted_by">is_sorted_by</a></li><li><a href="#method.is_sorted_by_key">is_sorted_by_key</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.join">join</a></li><li><a href="#method.last">last</a></li><li><a href="#method.last_chunk">last_chunk</a></li><li><a href="#method.last_chunk_mut">last_chunk_mut</a></li><li><a href="#method.last_mut">last_mut</a></li><li><a href="#method.len-1">len</a></li><li><a href="#method.make_ascii_lowercase">make_ascii_lowercase</a></li><li><a href="#method.make_ascii_uppercase">make_ascii_uppercase</a></li><li><a href="#method.partition_dedup">partition_dedup</a></li><li><a href="#method.partition_dedup_by">partition_dedup_by</a></li><li><a href="#method.partition_dedup_by_key">partition_dedup_by_key</a></li><li><a href="#method.partition_point">partition_point</a></li><li><a href="#method.rchunks">rchunks</a></li><li><a href="#method.rchunks_exact">rchunks_exact</a></li><li><a href="#method.rchunks_exact_mut">rchunks_exact_mut</a></li><li><a href="#method.rchunks_mut">rchunks_mut</a></li><li><a href="#method.repeat">repeat</a></li><li><a href="#method.reverse">reverse</a></li><li><a href="#method.rotate_left">rotate_left</a></li><li><a href="#method.rotate_right">rotate_right</a></li><li><a href="#method.rsplit">rsplit</a></li><li><a href="#method.rsplit_mut">rsplit_mut</a></li><li><a href="#method.rsplit_once">rsplit_once</a></li><li><a href="#method.rsplitn">rsplitn</a></li><li><a href="#method.rsplitn_mut">rsplitn_mut</a></li><li><a href="#method.select_nth_unstable">select_nth_unstable</a></li><li><a href="#method.select_nth_unstable_by">select_nth_unstable_by</a></li><li><a href="#method.select_nth_unstable_by_key">select_nth_unstable_by_key</a></li><li><a href="#method.sort">sort</a></li><li><a href="#method.sort_by">sort_by</a></li><li><a href="#method.sort_by_cached_key">sort_by_cached_key</a></li><li><a href="#method.sort_by_key">sort_by_key</a></li><li><a href="#method.sort_floats">sort_floats</a></li><li><a href="#method.sort_floats-1">sort_floats</a></li><li><a href="#method.sort_unstable">sort_unstable</a></li><li><a href="#method.sort_unstable_by">sort_unstable_by</a></li><li><a href="#method.sort_unstable_by_key">sort_unstable_by_key</a></li><li><a href="#method.split">split</a></li><li><a href="#method.split_at">split_at</a></li><li><a href="#method.split_at_checked">split_at_checked</a></li><li><a href="#method.split_at_mut">split_at_mut</a></li><li><a href="#method.split_at_mut_checked">split_at_mut_checked</a></li><li><a href="#method.split_at_mut_unchecked">split_at_mut_unchecked</a></li><li><a href="#method.split_at_unchecked">split_at_unchecked</a></li><li><a href="#method.split_first">split_first</a></li><li><a href="#method.split_first_chunk">split_first_chunk</a></li><li><a href="#method.split_first_chunk_mut">split_first_chunk_mut</a></li><li><a href="#method.split_first_mut">split_first_mut</a></li><li><a href="#method.split_inclusive">split_inclusive</a></li><li><a href="#method.split_inclusive_mut">split_inclusive_mut</a></li><li><a href="#method.split_last">split_last</a></li><li><a href="#method.split_last_chunk">split_last_chunk</a></li><li><a href="#method.split_last_chunk_mut">split_last_chunk_mut</a></li><li><a href="#method.split_last_mut">split_last_mut</a></li><li><a href="#method.split_mut">split_mut</a></li><li><a href="#method.split_once">split_once</a></li><li><a href="#method.splitn">splitn</a></li><li><a href="#method.splitn_mut">splitn_mut</a></li><li><a href="#method.starts_with">starts_with</a></li><li><a href="#method.strip_prefix">strip_prefix</a></li><li><a href="#method.strip_suffix">strip_suffix</a></li><li><a href="#method.swap">swap</a></li><li><a href="#method.swap_unchecked">swap_unchecked</a></li><li><a href="#method.swap_with_slice">swap_with_slice</a></li><li><a href="#method.take">take</a></li><li><a href="#method.take_first">take_first</a></li><li><a href="#method.take_first_mut">take_first_mut</a></li><li><a href="#method.take_last">take_last</a></li><li><a href="#method.take_last_mut">take_last_mut</a></li><li><a href="#method.take_mut">take_mut</a></li><li><a href="#method.to_ascii_lowercase">to_ascii_lowercase</a></li><li><a href="#method.to_ascii_uppercase">to_ascii_uppercase</a></li><li><a href="#method.to_vec">to_vec</a></li><li><a href="#method.to_vec_in">to_vec_in</a></li><li><a href="#method.trim_ascii">trim_ascii</a></li><li><a href="#method.trim_ascii_end">trim_ascii_end</a></li><li><a href="#method.trim_ascii_start">trim_ascii_start</a></li><li><a href="#method.windows">windows</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CBStr%3E-for-BString">AsMut<BStr></a></li><li><a href="#impl-AsMut%3C%5Bu8%5D%3E-for-BString">AsMut<[u8]></a></li><li><a href="#impl-AsRef%3CBStr%3E-for-BString">AsRef<BStr></a></li><li><a href="#impl-AsRef%3C%5Bu8%5D%3E-for-BString">AsRef<[u8]></a></li><li><a href="#impl-Borrow%3CBStr%3E-for-BString">Borrow<BStr></a></li><li><a href="#impl-Borrow%3C%5Bu8%5D%3E-for-BString">Borrow<[u8]></a></li><li><a href="#impl-BorrowMut%3CBStr%3E-for-BString">BorrowMut<BStr></a></li><li><a href="#impl-BorrowMut%3C%5Bu8%5D%3E-for-BString">BorrowMut<[u8]></a></li><li><a href="#impl-Clone-for-BString">Clone</a></li><li><a href="#impl-Debug-for-BString">Debug</a></li><li><a href="#impl-Default-for-BString">Default</a></li><li><a href="#impl-Deref-for-BString">Deref</a></li><li><a href="#impl-DerefMut-for-BString">DerefMut</a></li><li><a href="#impl-Display-for-BString">Display</a></li><li><a href="#impl-Eq-for-BString">Eq</a></li><li><a href="#impl-From%3C%26BStr%3E-for-BString">From<&'a BStr></a></li><li><a href="#impl-From%3C%26%5Bu8;+N%5D%3E-for-BString">From<&'a [u8; N]></a></li><li><a href="#impl-From%3C%26%5Bu8%5D%3E-for-BString">From<&'a [u8]></a></li><li><a href="#impl-From%3C%26str%3E-for-BString">From<&'a str></a></li><li><a href="#impl-From%3CBString%3E-for-Vec%3Cu8%3E">From<BString></a></li><li><a href="#impl-From%3CString%3E-for-BString">From<String></a></li><li><a href="#impl-From%3CVec%3Cu8%3E%3E-for-BString">From<Vec<u8>></a></li><li><a href="#impl-From%3C%5Bu8;+N%5D%3E-for-BString">From<[u8; N]></a></li><li><a href="#impl-FromIterator%3C%26BStr%3E-for-BString">FromIterator<&'a BStr></a></li><li><a href="#impl-FromIterator%3C%26%5Bu8%5D%3E-for-BString">FromIterator<&'a [u8]></a></li><li><a href="#impl-FromIterator%3C%26str%3E-for-BString">FromIterator<&'a str></a></li><li><a href="#impl-FromIterator%3CBString%3E-for-BString">FromIterator<BString></a></li><li><a href="#impl-FromIterator%3Cchar%3E-for-BString">FromIterator<char></a></li><li><a href="#impl-FromIterator%3Cu8%3E-for-BString">FromIterator<u8></a></li><li><a href="#impl-Hash-for-BString">Hash</a></li><li><a href="#impl-Ord-for-BString">Ord</a></li><li><a href="#impl-PartialEq-for-BString">PartialEq</a></li><li><a href="#impl-PartialEq%3C%26BStr%3E-for-BString">PartialEq<&'a BStr></a></li><li><a href="#impl-PartialEq%3C%26%5Bu8%5D%3E-for-BString">PartialEq<&'a [u8]></a></li><li><a href="#impl-PartialEq%3C%26str%3E-for-BString">PartialEq<&'a str></a></li><li><a href="#impl-PartialEq%3CBStr%3E-for-BString">PartialEq<BStr></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-%26%5Bu8%5D">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-%26BStr">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-%26str">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-%5Bu8%5D">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-BStr">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-Vec%3Cu8%3E">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CBString%3E-for-str">PartialEq<BString></a></li><li><a href="#impl-PartialEq%3CString%3E-for-BString">PartialEq<String></a></li><li><a href="#impl-PartialEq%3CVec%3Cu8%3E%3E-for-BString">PartialEq<Vec<u8>></a></li><li><a href="#impl-PartialEq%3C%5Bu8%5D%3E-for-BString">PartialEq<[u8]></a></li><li><a href="#impl-PartialEq%3Cstr%3E-for-BString">PartialEq<str></a></li><li><a href="#impl-PartialOrd-for-BString">PartialOrd</a></li><li><a href="#impl-PartialOrd%3C%26BStr%3E-for-BString">PartialOrd<&'a BStr></a></li><li><a href="#impl-PartialOrd%3C%26%5Bu8%5D%3E-for-BString">PartialOrd<&'a [u8]></a></li><li><a href="#impl-PartialOrd%3C%26str%3E-for-BString">PartialOrd<&'a str></a></li><li><a href="#impl-PartialOrd%3CBStr%3E-for-BString">PartialOrd<BStr></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-%26%5Bu8%5D">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-%26BStr">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-%26str">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-%5Bu8%5D">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-BStr">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-Vec%3Cu8%3E">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CBString%3E-for-str">PartialOrd<BString></a></li><li><a href="#impl-PartialOrd%3CString%3E-for-BString">PartialOrd<String></a></li><li><a href="#impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BString">PartialOrd<Vec<u8>></a></li><li><a href="#impl-PartialOrd%3C%5Bu8%5D%3E-for-BString">PartialOrd<[u8]></a></li><li><a href="#impl-PartialOrd%3Cstr%3E-for-BString">PartialOrd<str></a></li><li><a href="#impl-TryFrom%3C%26BString%3E-for-%26str">TryFrom<&'a BString></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-BString">RefUnwindSafe</a></li><li><a href="#impl-Send-for-BString">Send</a></li><li><a href="#impl-Sync-for-BString">Sync</a></li><li><a href="#impl-Unpin-for-BString">Unpin</a></li><li><a href="#impl-UnwindSafe-for-BString">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-ToString-for-T">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">ba2</a>::<wbr><a class="struct" href="#">BString</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct BString { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A wrapper for <code>Vec<u8></code> that provides convenient string oriented trait +impls.</p> +<p>A <code>BString</code> has ownership over its contents and corresponds to +a growable or shrinkable buffer. Its borrowed counterpart is a +<a href="struct.BStr.html"><code>BStr</code></a>, called a byte string slice.</p> +<p>Using a <code>BString</code> is just like using a <code>Vec<u8></code>, since <code>BString</code> +implements <code>Deref</code> to <code>Vec<u8></code>. So all methods available on <code>Vec<u8></code> +are also available on <code>BString</code>.</p> +<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2> +<p>You can create a new <code>BString</code> from a <code>Vec<u8></code> via a <code>From</code> impl:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::BString; + +<span class="kw">let </span>s = BString::from(<span class="string">"Hello, world!"</span>);</code></pre></div> +<h2 id="deref"><a class="doc-anchor" href="#deref">§</a>Deref</h2> +<p>The <code>BString</code> type implements <code>Deref</code> and <code>DerefMut</code>, where the target +types are <code>&Vec<u8></code> and <code>&mut Vec<u8></code>, respectively. <code>Deref</code> permits all of the +methods defined on <code>Vec<u8></code> to be implicitly callable on any <code>BString</code>.</p> +<p>For more information about how deref works, see the documentation for the +<a href="https://doc.rust-lang.org/std/ops/trait.Deref.html"><code>std::ops::Deref</code></a> +trait.</p> +<h2 id="representation"><a class="doc-anchor" href="#representation">§</a>Representation</h2> +<p>A <code>BString</code> has the same representation as a <code>Vec<u8></code> and a <code>String</code>. +That is, it is made up of three word sized components: a pointer to a +region of memory containing the bytes, a length and a capacity.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-BString" class="impl"><a href="#impl-BString" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><h4 class="code-header">pub const fn <a href="#method.new" class="fn">new</a>(bytes: <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class="docblock"><p>Constructs a new <code>BString</code> from the given <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec"><code>Vec</code></a>.</p> +<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::BString; + +<span class="kw">let </span><span class="kw-2">mut </span>b = BString::new(Vec::with_capacity(<span class="number">10</span>));</code></pre></div> +<p>This function is <code>const</code>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::BString; + +<span class="kw">const </span>B: BString = BString::new(<span class="macro">vec!</span>[]);</code></pre></div> +</div></details></div></details></div><h2 id="deref-methods-Vec%3Cu8%3E" class="section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>></span><a href="#deref-methods-Vec%3Cu8%3E" class="anchor">§</a></h2><div id="deref-methods-Vec%3Cu8%3E-1" class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.capacity" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#887">source</a></span><h4 class="code-header">pub fn <a href="#method.capacity" class="fn">capacity</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the total number of elements the vector can hold without +reallocating.</p> +<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec: Vec<i32> = Vec::with_capacity(<span class="number">10</span>); +vec.push(<span class="number">42</span>); +<span class="macro">assert!</span>(vec.capacity() >= <span class="number">10</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#910">source</a></span><h4 class="code-header">pub fn <a href="#method.reserve" class="fn">reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Reserves capacity for at least <code>additional</code> more elements to be inserted +in the given <code>Vec<T></code>. The collection may reserve more space to +speculatively avoid frequent reallocations. After calling <code>reserve</code>, +capacity will be greater than or equal to <code>self.len() + additional</code>. +Does nothing if capacity is already sufficient.</p> +<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5> +<p>Panics if the new capacity exceeds <code>isize::MAX</code> <em>bytes</em>.</p> +<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>]; +vec.reserve(<span class="number">10</span>); +<span class="macro">assert!</span>(vec.capacity() >= <span class="number">11</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_exact" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#940">source</a></span><h4 class="code-header">pub fn <a href="#method.reserve_exact" class="fn">reserve_exact</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Reserves the minimum capacity for at least <code>additional</code> more elements to +be inserted in the given <code>Vec<T></code>. Unlike <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.reserve" title="method alloc::vec::Vec::reserve"><code>reserve</code></a>, this will not +deliberately over-allocate to speculatively avoid frequent allocations. +After calling <code>reserve_exact</code>, capacity will be greater than or equal to +<code>self.len() + additional</code>. Does nothing if the capacity is already +sufficient.</p> +<p>Note that the allocator may give the collection more space than it +requests. Therefore, capacity can not be relied upon to be precisely +minimal. Prefer <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.reserve" title="method alloc::vec::Vec::reserve"><code>reserve</code></a> if future insertions are expected.</p> +<h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5> +<p>Panics if the new capacity exceeds <code>isize::MAX</code> <em>bytes</em>.</p> +<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>]; +vec.reserve_exact(<span class="number">10</span>); +<span class="macro">assert!</span>(vec.capacity() >= <span class="number">11</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.try_reserve" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.57.0">1.57.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#977">source</a></span><h4 class="code-header">pub fn <a href="#method.try_reserve" class="fn">try_reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/struct.TryReserveError.html" title="struct alloc::collections::TryReserveError">TryReserveError</a>></h4></section></summary><div class="docblock"><p>Tries to reserve capacity for at least <code>additional</code> more elements to be inserted +in the given <code>Vec<T></code>. The collection may reserve more space to speculatively avoid +frequent reallocations. After calling <code>try_reserve</code>, capacity will be +greater than or equal to <code>self.len() + additional</code> if it returns +<code>Ok(())</code>. Does nothing if capacity is already sufficient. This method +preserves the contents even if an error occurs.</p> +<h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5> +<p>If the capacity overflows, or the allocator reports a failure, then an error +is returned.</p> +<h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::TryReserveError; + +<span class="kw">fn </span>process_data(data: <span class="kw-2">&</span>[u32]) -> <span class="prelude-ty">Result</span><Vec<u32>, TryReserveError> { + <span class="kw">let </span><span class="kw-2">mut </span>output = Vec::new(); + + <span class="comment">// Pre-reserve the memory, exiting if we can't + </span>output.try_reserve(data.len())<span class="question-mark">?</span>; + + <span class="comment">// Now we know this can't OOM in the middle of our complex work + </span>output.extend(data.iter().map(|<span class="kw-2">&</span>val| { + val * <span class="number">2 </span>+ <span class="number">5 </span><span class="comment">// very complicated + </span>})); + + <span class="prelude-val">Ok</span>(output) +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.try_reserve_exact" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.57.0">1.57.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1020">source</a></span><h4 class="code-header">pub fn <a href="#method.try_reserve_exact" class="fn">try_reserve_exact</a>( + &mut self, + additional: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/struct.TryReserveError.html" title="struct alloc::collections::TryReserveError">TryReserveError</a>></h4></section></summary><div class="docblock"><p>Tries to reserve the minimum capacity for at least <code>additional</code> +elements to be inserted in the given <code>Vec<T></code>. Unlike <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.try_reserve" title="method alloc::vec::Vec::try_reserve"><code>try_reserve</code></a>, +this will not deliberately over-allocate to speculatively avoid frequent +allocations. After calling <code>try_reserve_exact</code>, capacity will be greater +than or equal to <code>self.len() + additional</code> if it returns <code>Ok(())</code>. +Does nothing if the capacity is already sufficient.</p> +<p>Note that the allocator may give the collection more space than it +requests. Therefore, capacity can not be relied upon to be precisely +minimal. Prefer <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.try_reserve" title="method alloc::vec::Vec::try_reserve"><code>try_reserve</code></a> if future insertions are expected.</p> +<h5 id="errors-1"><a class="doc-anchor" href="#errors-1">§</a>Errors</h5> +<p>If the capacity overflows, or the allocator reports a failure, then an error +is returned.</p> +<h5 id="examples-6"><a class="doc-anchor" href="#examples-6">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::collections::TryReserveError; + +<span class="kw">fn </span>process_data(data: <span class="kw-2">&</span>[u32]) -> <span class="prelude-ty">Result</span><Vec<u32>, TryReserveError> { + <span class="kw">let </span><span class="kw-2">mut </span>output = Vec::new(); + + <span class="comment">// Pre-reserve the memory, exiting if we can't + </span>output.try_reserve_exact(data.len())<span class="question-mark">?</span>; + + <span class="comment">// Now we know this can't OOM in the middle of our complex work + </span>output.extend(data.iter().map(|<span class="kw-2">&</span>val| { + val * <span class="number">2 </span>+ <span class="number">5 </span><span class="comment">// very complicated + </span>})); + + <span class="prelude-val">Ok</span>(output) +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.shrink_to_fit" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1043">source</a></span><h4 class="code-header">pub fn <a href="#method.shrink_to_fit" class="fn">shrink_to_fit</a>(&mut self)</h4></section></summary><div class="docblock"><p>Shrinks the capacity of the vector as much as possible.</p> +<p>The behavior of this method depends on the allocator, which may either shrink the vector +in-place or reallocate. The resulting vector might still have some excess capacity, just as +is the case for <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.with_capacity" title="associated function alloc::vec::Vec::with_capacity"><code>with_capacity</code></a>. See <a href="https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html#method.shrink" title="method core::alloc::Allocator::shrink"><code>Allocator::shrink</code></a> for more details.</p> +<h5 id="examples-7"><a class="doc-anchor" href="#examples-7">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = Vec::with_capacity(<span class="number">10</span>); +vec.extend([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); +<span class="macro">assert!</span>(vec.capacity() >= <span class="number">10</span>); +vec.shrink_to_fit(); +<span class="macro">assert!</span>(vec.capacity() >= <span class="number">3</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.shrink_to" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.56.0">1.56.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1072">source</a></span><h4 class="code-header">pub fn <a href="#method.shrink_to" class="fn">shrink_to</a>(&mut self, min_capacity: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Shrinks the capacity of the vector with a lower bound.</p> +<p>The capacity will remain at least as large as both the length +and the supplied value.</p> +<p>If the current capacity is less than the lower limit, this is a no-op.</p> +<h5 id="examples-8"><a class="doc-anchor" href="#examples-8">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = Vec::with_capacity(<span class="number">10</span>); +vec.extend([<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); +<span class="macro">assert!</span>(vec.capacity() >= <span class="number">10</span>); +vec.shrink_to(<span class="number">4</span>); +<span class="macro">assert!</span>(vec.capacity() >= <span class="number">4</span>); +vec.shrink_to(<span class="number">0</span>); +<span class="macro">assert!</span>(vec.capacity() >= <span class="number">3</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.truncate" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1158">source</a></span><h4 class="code-header">pub fn <a href="#method.truncate" class="fn">truncate</a>(&mut self, len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Shortens the vector, keeping the first <code>len</code> elements and dropping +the rest.</p> +<p>If <code>len</code> is greater or equal to the vector’s current length, this has +no effect.</p> +<p>The <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.drain" title="method alloc::vec::Vec::drain"><code>drain</code></a> method can emulate <code>truncate</code>, but causes the excess +elements to be returned instead of dropped.</p> +<p>Note that this method has no effect on the allocated capacity +of the vector.</p> +<h5 id="examples-9"><a class="doc-anchor" href="#examples-9">§</a>Examples</h5> +<p>Truncating a five element vector to two elements:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; +vec.truncate(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +<p>No truncation occurs when <code>len</code> is greater than the vector’s current +length:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +vec.truncate(<span class="number">8</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> +<p>Truncating when <code>len == 0</code> is equivalent to calling the <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.clear" title="method alloc::vec::Vec::clear"><code>clear</code></a> +method.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +vec.truncate(<span class="number">0</span>); +<span class="macro">assert_eq!</span>(vec, []);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1193">source</a></span><h4 class="code-header">pub fn <a href="#method.as_slice" class="fn">as_slice</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a></h4></section></summary><div class="docblock"><p>Extracts a slice containing the entire vector.</p> +<p>Equivalent to <code>&s[..]</code>.</p> +<h5 id="examples-10"><a class="doc-anchor" href="#examples-10">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::io::{<span class="self">self</span>, Write}; +<span class="kw">let </span>buffer = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>]; +io::sink().write(buffer.as_slice()).unwrap();</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1210">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_slice" class="fn">as_mut_slice</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a></h4></section></summary><div class="docblock"><p>Extracts a mutable slice of the entire vector.</p> +<p>Equivalent to <code>&mut s[..]</code>.</p> +<h5 id="examples-11"><a class="doc-anchor" href="#examples-11">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::io::{<span class="self">self</span>, Read}; +<span class="kw">let </span><span class="kw-2">mut </span>buffer = <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">3</span>]; +io::repeat(<span class="number">0b101</span>).read_exact(buffer.as_mut_slice()).unwrap();</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ptr" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.37.0">1.37.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1268">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const T</a></h4></section></summary><div class="docblock"><p>Returns a raw pointer to the vector’s buffer, or a dangling raw pointer +valid for zero sized reads if the vector didn’t allocate.</p> +<p>The caller must ensure that the vector outlives the pointer this +function returns, or else it will end up pointing to garbage. +Modifying the vector may cause its buffer to be reallocated, +which would also make any pointers to it invalid.</p> +<p>The caller must also ensure that the memory the pointer (non-transitively) points to +is never written to (except inside an <code>UnsafeCell</code>) using this pointer or any pointer +derived from it. If you need to mutate the contents of the slice, use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.as_mut_ptr" title="method alloc::vec::Vec::as_mut_ptr"><code>as_mut_ptr</code></a>.</p> +<p>This method guarantees that for the purpose of the aliasing model, this method +does not materialize a reference to the underlying slice, and thus the returned pointer +will remain valid when mixed with other calls to <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.as_ptr" title="method alloc::vec::Vec::as_ptr"><code>as_ptr</code></a> and <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.as_mut_ptr" title="method alloc::vec::Vec::as_mut_ptr"><code>as_mut_ptr</code></a>. +Note that calling other methods that materialize mutable references to the slice, +or mutable references to specific elements you are planning on accessing through this pointer, +as well as writing to those elements, may still invalidate this pointer. +See the second example below for how this guarantee can be used.</p> +<h5 id="examples-12"><a class="doc-anchor" href="#examples-12">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">let </span>x_ptr = x.as_ptr(); + +<span class="kw">unsafe </span>{ + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() { + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>x_ptr.add(i), <span class="number">1 </span><< i); + } +}</code></pre></div> +<p>Due to the aliasing guarantee, the following code is legal:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{ + <span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + <span class="kw">let </span>ptr1 = v.as_ptr(); + <span class="kw">let _ </span>= ptr1.read(); + <span class="kw">let </span>ptr2 = v.as_mut_ptr().offset(<span class="number">2</span>); + ptr2.write(<span class="number">2</span>); + <span class="comment">// Notably, the write to `ptr2` did *not* invalidate `ptr1` + // because it mutated a different element: + </span><span class="kw">let _ </span>= ptr1.read(); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_ptr" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.37.0">1.37.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1328">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr" class="fn">as_mut_ptr</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*mut T</a></h4></section></summary><div class="docblock"><p>Returns an unsafe mutable pointer to the vector’s buffer, or a dangling +raw pointer valid for zero sized reads if the vector didn’t allocate.</p> +<p>The caller must ensure that the vector outlives the pointer this +function returns, or else it will end up pointing to garbage. +Modifying the vector may cause its buffer to be reallocated, +which would also make any pointers to it invalid.</p> +<p>This method guarantees that for the purpose of the aliasing model, this method +does not materialize a reference to the underlying slice, and thus the returned pointer +will remain valid when mixed with other calls to <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.as_ptr" title="method alloc::vec::Vec::as_ptr"><code>as_ptr</code></a> and <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.as_mut_ptr" title="method alloc::vec::Vec::as_mut_ptr"><code>as_mut_ptr</code></a>. +Note that calling other methods that materialize references to the slice, +or references to specific elements you are planning on accessing through this pointer, +may still invalidate this pointer. +See the second example below for how this guarantee can be used.</p> +<h5 id="examples-13"><a class="doc-anchor" href="#examples-13">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Allocate vector big enough for 4 elements. +</span><span class="kw">let </span>size = <span class="number">4</span>; +<span class="kw">let </span><span class="kw-2">mut </span>x: Vec<i32> = Vec::with_capacity(size); +<span class="kw">let </span>x_ptr = x.as_mut_ptr(); + +<span class="comment">// Initialize elements via raw pointer writes, then set length. +</span><span class="kw">unsafe </span>{ + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..size { + <span class="kw-2">*</span>x_ptr.add(i) = i <span class="kw">as </span>i32; + } + x.set_len(size); +} +<span class="macro">assert_eq!</span>(<span class="kw-2">&*</span>x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> +<p>Due to the aliasing guarantee, the following code is legal:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{ + <span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">0</span>]; + <span class="kw">let </span>ptr1 = v.as_mut_ptr(); + ptr1.write(<span class="number">1</span>); + <span class="kw">let </span>ptr2 = v.as_mut_ptr(); + ptr2.write(<span class="number">2</span>); + <span class="comment">// Notably, the write to `ptr2` did *not* invalidate `ptr1`: + </span>ptr1.write(<span class="number">3</span>); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.allocator" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1337">source</a><h4 class="code-header">pub fn <a href="#method.allocator" class="fn">allocator</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&A</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>allocator_api</code>)</span></div></span></summary><div class="docblock"><p>Returns a reference to the underlying allocator.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.set_len" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1421">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.set_len" class="fn">set_len</a>(&mut self, new_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Forces the length of the vector to <code>new_len</code>.</p> +<p>This is a low-level operation that maintains none of the normal +invariants of the type. Normally changing the length of a vector +is done using one of the safe operations instead, such as +<a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.truncate" title="method alloc::vec::Vec::truncate"><code>truncate</code></a>, <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.resize" title="method alloc::vec::Vec::resize"><code>resize</code></a>, <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend" title="method core::iter::traits::collect::Extend::extend"><code>extend</code></a>, or <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.clear" title="method alloc::vec::Vec::clear"><code>clear</code></a>.</p> +<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5> +<ul> +<li><code>new_len</code> must be less than or equal to <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.capacity" title="method alloc::vec::Vec::capacity"><code>capacity()</code></a>.</li> +<li>The elements at <code>old_len..new_len</code> must be initialized.</li> +</ul> +<h5 id="examples-14"><a class="doc-anchor" href="#examples-14">§</a>Examples</h5> +<p>This method can be useful for situations in which the vector +is serving as a buffer for other code, particularly over FFI:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">pub fn </span>get_dictionary(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="prelude-ty">Option</span><Vec<u8>> { + <span class="comment">// Per the FFI method's docs, "32768 bytes is always enough". + </span><span class="kw">let </span><span class="kw-2">mut </span>dict = Vec::with_capacity(<span class="number">32_768</span>); + <span class="kw">let </span><span class="kw-2">mut </span>dict_length = <span class="number">0</span>; + <span class="comment">// SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that: + // 1. `dict_length` elements were initialized. + // 2. `dict_length` <= the capacity (32_768) + // which makes `set_len` safe to call. + </span><span class="kw">unsafe </span>{ + <span class="comment">// Make the FFI call... + </span><span class="kw">let </span>r = deflateGetDictionary(<span class="self">self</span>.strm, dict.as_mut_ptr(), <span class="kw-2">&mut </span>dict_length); + <span class="kw">if </span>r == Z_OK { + <span class="comment">// ...and update the length to what was initialized. + </span>dict.set_len(dict_length); + <span class="prelude-val">Some</span>(dict) + } <span class="kw">else </span>{ + <span class="prelude-val">None + </span>} + } +}</code></pre></div> +<p>While the following example is sound, there is a memory leak since +the inner vectors were not freed prior to the <code>set_len</code> call:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>], + <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">0</span>], + <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">1</span>]]; +<span class="comment">// SAFETY: +// 1. `old_len..0` is empty so no elements need to be initialized. +// 2. `0 <= capacity` always holds whatever `capacity` is. +</span><span class="kw">unsafe </span>{ + vec.set_len(<span class="number">0</span>); +}</code></pre></div> +<p>Normally, here, one would use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.clear" title="method alloc::vec::Vec::clear"><code>clear</code></a> instead to correctly drop +the contents and thus not leak memory.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.swap_remove" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1453">source</a></span><h4 class="code-header">pub fn <a href="#method.swap_remove" class="fn">swap_remove</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> T</h4></section></summary><div class="docblock"><p>Removes an element from the vector and returns it.</p> +<p>The removed element is replaced by the last element of the vector.</p> +<p>This does not preserve ordering, but is <em>O</em>(1). +If you need to preserve the element order, use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.remove" title="method alloc::vec::Vec::remove"><code>remove</code></a> instead.</p> +<h5 id="panics-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h5> +<p>Panics if <code>index</code> is out of bounds.</p> +<h5 id="examples-15"><a class="doc-anchor" href="#examples-15">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="string">"foo"</span>, <span class="string">"bar"</span>, <span class="string">"baz"</span>, <span class="string">"qux"</span>]; + +<span class="macro">assert_eq!</span>(v.swap_remove(<span class="number">1</span>), <span class="string">"bar"</span>); +<span class="macro">assert_eq!</span>(v, [<span class="string">"foo"</span>, <span class="string">"qux"</span>, <span class="string">"baz"</span>]); + +<span class="macro">assert_eq!</span>(v.swap_remove(<span class="number">0</span>), <span class="string">"foo"</span>); +<span class="macro">assert_eq!</span>(v, [<span class="string">"baz"</span>, <span class="string">"qux"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.insert" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1495">source</a></span><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, element: T)</h4></section></summary><div class="docblock"><p>Inserts an element at position <code>index</code> within the vector, shifting all +elements after it to the right.</p> +<h5 id="panics-3"><a class="doc-anchor" href="#panics-3">§</a>Panics</h5> +<p>Panics if <code>index > len</code>.</p> +<h5 id="examples-16"><a class="doc-anchor" href="#examples-16">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +vec.insert(<span class="number">1</span>, <span class="number">4</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>]); +vec.insert(<span class="number">4</span>, <span class="number">5</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.remove" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1557">source</a></span><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a>(&mut self, index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> T</h4></section></summary><div class="docblock"><p>Removes and returns the element at position <code>index</code> within the vector, +shifting all elements after it to the left.</p> +<p>Note: Because this shifts over the remaining elements, it has a +worst-case performance of <em>O</em>(<em>n</em>). If you don’t need the order of elements +to be preserved, use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.swap_remove" title="method alloc::vec::Vec::swap_remove"><code>swap_remove</code></a> instead. If you’d like to remove +elements from the beginning of the <code>Vec</code>, consider using +<a href="https://doc.rust-lang.org/1.77.0/alloc/collections/vec_deque/struct.VecDeque.html#method.pop_front" title="method alloc::collections::vec_deque::VecDeque::pop_front"><code>VecDeque::pop_front</code></a> instead.</p> +<h5 id="panics-4"><a class="doc-anchor" href="#panics-4">§</a>Panics</h5> +<p>Panics if <code>index</code> is out of bounds.</p> +<h5 id="examples-17"><a class="doc-anchor" href="#examples-17">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="macro">assert_eq!</span>(v.remove(<span class="number">1</span>), <span class="number">2</span>); +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">3</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.retain" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1612-1614">source</a></span><h4 class="code-header">pub fn <a href="#method.retain" class="fn">retain</a><F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Retains only the elements specified by the predicate.</p> +<p>In other words, remove all elements <code>e</code> for which <code>f(&e)</code> returns <code>false</code>. +This method operates in place, visiting each element exactly once in the +original order, and preserves the order of the retained elements.</p> +<h5 id="examples-18"><a class="doc-anchor" href="#examples-18">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; +vec.retain(|<span class="kw-2">&</span>x| x % <span class="number">2 </span>== <span class="number">0</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">2</span>, <span class="number">4</span>]);</code></pre></div> +<p>Because the elements are visited exactly once in the original order, +external state may be used to decide which elements to keep.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; +<span class="kw">let </span>keep = [<span class="bool-val">false</span>, <span class="bool-val">true</span>, <span class="bool-val">true</span>, <span class="bool-val">false</span>, <span class="bool-val">true</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = keep.iter(); +vec.retain(|<span class="kw">_</span>| <span class="kw-2">*</span>iter.next().unwrap()); +<span class="macro">assert_eq!</span>(vec, [<span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.retain_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.61.0">1.61.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1638-1640">source</a></span><h4 class="code-header">pub fn <a href="#method.retain_mut" class="fn">retain_mut</a><F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Retains only the elements specified by the predicate, passing a mutable reference to it.</p> +<p>In other words, remove all elements <code>e</code> such that <code>f(&mut e)</code> returns <code>false</code>. +This method operates in place, visiting each element exactly once in the +original order, and preserves the order of the retained elements.</p> +<h5 id="examples-19"><a class="doc-anchor" href="#examples-19">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; +vec.retain_mut(|x| <span class="kw">if </span><span class="kw-2">*</span>x <= <span class="number">3 </span>{ + <span class="kw-2">*</span>x += <span class="number">1</span>; + <span class="bool-val">true +</span>} <span class="kw">else </span>{ + <span class="bool-val">false +</span>}); +<span class="macro">assert_eq!</span>(vec, [<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.dedup_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.16.0">1.16.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1747-1750">source</a></span><h4 class="code-header">pub fn <a href="#method.dedup_by_key" class="fn">dedup_by_key</a><F, K>(&mut self, key: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Removes all but the first of consecutive elements in the vector that resolve to the same +key.</p> +<p>If the vector is sorted, this removes all duplicates.</p> +<h5 id="examples-20"><a class="doc-anchor" href="#examples-20">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">10</span>, <span class="number">20</span>, <span class="number">21</span>, <span class="number">30</span>, <span class="number">20</span>]; + +vec.dedup_by_key(|i| <span class="kw-2">*</span>i / <span class="number">10</span>); + +<span class="macro">assert_eq!</span>(vec, [<span class="number">10</span>, <span class="number">20</span>, <span class="number">30</span>, <span class="number">20</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.dedup_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.16.0">1.16.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1774-1776">source</a></span><h4 class="code-header">pub fn <a href="#method.dedup_by" class="fn">dedup_by</a><F>(&mut self, same_bucket: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Removes all but the first of consecutive elements in the vector satisfying a given equality +relation.</p> +<p>The <code>same_bucket</code> function is passed references to two elements from the vector and +must determine if the elements compare equal. The elements are passed in opposite order +from their order in the slice, so if <code>same_bucket(a, b)</code> returns <code>true</code>, <code>a</code> is removed.</p> +<p>If the vector is sorted, this removes all duplicates.</p> +<h5 id="examples-21"><a class="doc-anchor" href="#examples-21">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="string">"foo"</span>, <span class="string">"bar"</span>, <span class="string">"Bar"</span>, <span class="string">"baz"</span>, <span class="string">"bar"</span>]; + +vec.dedup_by(|a, b| a.eq_ignore_ascii_case(b)); + +<span class="macro">assert_eq!</span>(vec, [<span class="string">"foo"</span>, <span class="string">"bar"</span>, <span class="string">"baz"</span>, <span class="string">"bar"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.push" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1918">source</a></span><h4 class="code-header">pub fn <a href="#method.push" class="fn">push</a>(&mut self, value: T)</h4></section></summary><div class="docblock"><p>Appends an element to the back of a collection.</p> +<h5 id="panics-5"><a class="doc-anchor" href="#panics-5">§</a>Panics</h5> +<p>Panics if the new capacity exceeds <code>isize::MAX</code> <em>bytes</em>.</p> +<h5 id="examples-22"><a class="doc-anchor" href="#examples-22">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>]; +vec.push(<span class="number">3</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.push_within_capacity" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1964">source</a><h4 class="code-header">pub fn <a href="#method.push_within_capacity" class="fn">push_within_capacity</a>(&mut self, value: T) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, T></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>vec_push_within_capacity</code>)</span></div></span></summary><div class="docblock"><p>Appends an element if there is sufficient spare capacity, otherwise an error is returned +with the element.</p> +<p>Unlike <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.push" title="method alloc::vec::Vec::push"><code>push</code></a> this method will not reallocate when there’s insufficient capacity. +The caller should use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.reserve" title="method alloc::vec::Vec::reserve"><code>reserve</code></a> or <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.try_reserve" title="method alloc::vec::Vec::try_reserve"><code>try_reserve</code></a> to ensure that there is enough capacity.</p> +<h5 id="examples-23"><a class="doc-anchor" href="#examples-23">§</a>Examples</h5> +<p>A manual, panic-free alternative to <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator"><code>FromIterator</code></a>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(vec_push_within_capacity)] + +</span><span class="kw">use </span>std::collections::TryReserveError; +<span class="kw">fn </span>from_iter_fallible<T>(iter: <span class="kw">impl </span>Iterator<Item=T>) -> <span class="prelude-ty">Result</span><Vec<T>, TryReserveError> { + <span class="kw">let </span><span class="kw-2">mut </span>vec = Vec::new(); + <span class="kw">for </span>value <span class="kw">in </span>iter { + <span class="kw">if let </span><span class="prelude-val">Err</span>(value) = vec.push_within_capacity(value) { + vec.try_reserve(<span class="number">1</span>)<span class="question-mark">?</span>; + <span class="comment">// this cannot fail, the previous line either returned or added at least 1 free slot + </span><span class="kw">let _ </span>= vec.push_within_capacity(value); + } + } + <span class="prelude-val">Ok</span>(vec) +} +<span class="macro">assert_eq!</span>(from_iter_fallible(<span class="number">0</span>..<span class="number">100</span>), <span class="prelude-val">Ok</span>(Vec::from_iter(<span class="number">0</span>..<span class="number">100</span>)));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.pop" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#1993">source</a></span><h4 class="code-header">pub fn <a href="#method.pop" class="fn">pop</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T></h4></section></summary><div class="docblock"><p>Removes the last element from a vector and returns it, or <a href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html#variant.None" title="variant core::option::Option::None"><code>None</code></a> if it +is empty.</p> +<p>If you’d like to pop the first element, consider using +<a href="https://doc.rust-lang.org/1.77.0/alloc/collections/vec_deque/struct.VecDeque.html#method.pop_front" title="method alloc::collections::vec_deque::VecDeque::pop_front"><code>VecDeque::pop_front</code></a> instead.</p> +<h5 id="examples-24"><a class="doc-anchor" href="#examples-24">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="macro">assert_eq!</span>(vec.pop(), <span class="prelude-val">Some</span>(<span class="number">3</span>)); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.append" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.4.0">1.4.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2023">source</a></span><h4 class="code-header">pub fn <a href="#method.append" class="fn">append</a>(&mut self, other: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T, A>)</h4></section></summary><div class="docblock"><p>Moves all the elements of <code>other</code> into <code>self</code>, leaving <code>other</code> empty.</p> +<h5 id="panics-6"><a class="doc-anchor" href="#panics-6">§</a>Panics</h5> +<p>Panics if the new capacity exceeds <code>isize::MAX</code> <em>bytes</em>.</p> +<h5 id="examples-25"><a class="doc-anchor" href="#examples-25">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>vec2 = <span class="macro">vec!</span>[<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]; +vec.append(<span class="kw-2">&mut </span>vec2); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +<span class="macro">assert_eq!</span>(vec2, []);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.drain" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2072-2074">source</a></span><h4 class="code-header">pub fn <a href="#method.drain" class="fn">drain</a><R>(&mut self, range: R) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/drain/struct.Drain.html" title="struct alloc::vec::drain::Drain">Drain</a><'_, T, A><div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>,</div></h4></section></summary><div class="docblock"><p>Removes the specified range from the vector in bulk, returning all +removed elements as an iterator. If the iterator is dropped before +being fully consumed, it drops the remaining removed elements.</p> +<p>The returned iterator keeps a mutable borrow on the vector to optimize +its implementation.</p> +<h5 id="panics-7"><a class="doc-anchor" href="#panics-7">§</a>Panics</h5> +<p>Panics if the starting point is greater than the end point or if +the end point is greater than the length of the vector.</p> +<h5 id="leaking"><a class="doc-anchor" href="#leaking">§</a>Leaking</h5> +<p>If the returned iterator goes out of scope without being dropped (due to +<a href="https://doc.rust-lang.org/1.77.0/core/mem/fn.forget.html" title="fn core::mem::forget"><code>mem::forget</code></a>, for example), the vector may have lost and leaked +elements arbitrarily, including elements outside the range.</p> +<h5 id="examples-26"><a class="doc-anchor" href="#examples-26">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span>u: Vec<<span class="kw">_</span>> = v.drain(<span class="number">1</span>..).collect(); +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>]); +<span class="macro">assert_eq!</span>(u, <span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>]); + +<span class="comment">// A full range clears the vector, like `clear()` does +</span>v.drain(..); +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.clear" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2118">source</a></span><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&mut self)</h4></section></summary><div class="docblock"><p>Clears the vector, removing all values.</p> +<p>Note that this method has no effect on the allocated capacity +of the vector.</p> +<h5 id="examples-27"><a class="doc-anchor" href="#examples-27">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; + +v.clear(); + +<span class="macro">assert!</span>(v.is_empty());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.len" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2144">source</a></span><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of elements in the vector, also referred to +as its ‘length’.</p> +<h5 id="examples-28"><a class="doc-anchor" href="#examples-28">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="macro">assert_eq!</span>(a.len(), <span class="number">3</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2160">source</a></span><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the vector contains no elements.</p> +<h5 id="examples-29"><a class="doc-anchor" href="#examples-29">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); +<span class="macro">assert!</span>(v.is_empty()); + +v.push(<span class="number">1</span>); +<span class="macro">assert!</span>(!v.is_empty());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_off" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.4.0">1.4.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2192-2194">source</a></span><h4 class="code-header">pub fn <a href="#method.split_off" class="fn">split_off</a>(&mut self, at: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T, A><div class="where">where + A: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Splits the collection into two at the given index.</p> +<p>Returns a newly allocated vector containing the elements in the range +<code>[at, len)</code>. After the call, the original vector will be left containing +the elements <code>[0, at)</code> with its previous capacity unchanged.</p> +<ul> +<li>If you want to take ownership of the entire contents and capacity of +the vector, see <a href="https://doc.rust-lang.org/1.77.0/core/mem/fn.take.html" title="fn core::mem::take"><code>mem::take</code></a> or <a href="https://doc.rust-lang.org/1.77.0/core/mem/fn.replace.html" title="fn core::mem::replace"><code>mem::replace</code></a>.</li> +<li>If you don’t need the returned vector at all, see <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.truncate" title="method alloc::vec::Vec::truncate"><code>Vec::truncate</code></a>.</li> +<li>If you want to take ownership of an arbitrary subslice, or you don’t +necessarily want to store the removed items in a vector, see <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.drain" title="method alloc::vec::Vec::drain"><code>Vec::drain</code></a>.</li> +</ul> +<h5 id="panics-8"><a class="doc-anchor" href="#panics-8">§</a>Panics</h5> +<p>Panics if <code>at > len</code>.</p> +<h5 id="examples-30"><a class="doc-anchor" href="#examples-30">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span>vec2 = vec.split_off(<span class="number">1</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>]); +<span class="macro">assert_eq!</span>(vec2, [<span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.resize_with" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.33.0">1.33.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2248-2250">source</a></span><h4 class="code-header">pub fn <a href="#method.resize_with" class="fn">resize_with</a><F>(&mut self, new_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> T,</div></h4></section></summary><div class="docblock"><p>Resizes the <code>Vec</code> in-place so that <code>len</code> is equal to <code>new_len</code>.</p> +<p>If <code>new_len</code> is greater than <code>len</code>, the <code>Vec</code> is extended by the +difference, with each additional slot filled with the result of +calling the closure <code>f</code>. The return values from <code>f</code> will end up +in the <code>Vec</code> in the order they have been generated.</p> +<p>If <code>new_len</code> is less than <code>len</code>, the <code>Vec</code> is simply truncated.</p> +<p>This method uses a closure to create new values on every push. If +you’d rather <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> a given value, use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.resize" title="method alloc::vec::Vec::resize"><code>Vec::resize</code></a>. If you +want to use the <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default"><code>Default</code></a> trait to generate values, you can +pass <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" title="associated function core::default::Default::default"><code>Default::default</code></a> as the second argument.</p> +<h5 id="examples-31"><a class="doc-anchor" href="#examples-31">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +vec.resize_with(<span class="number">5</span>, Default::default); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">0</span>]); + +<span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[]; +<span class="kw">let </span><span class="kw-2">mut </span>p = <span class="number">1</span>; +vec.resize_with(<span class="number">4</span>, || { p <span class="kw-2">*</span>= <span class="number">2</span>; p }); +<span class="macro">assert_eq!</span>(vec, [<span class="number">2</span>, <span class="number">4</span>, <span class="number">8</span>, <span class="number">16</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.spare_capacity_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.60.0">1.60.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2323">source</a></span><h4 class="code-header">pub fn <a href="#method.spare_capacity_mut" class="fn">spare_capacity_mut</a>(&mut self) -> &mut [<a class="union" href="https://doc.rust-lang.org/1.77.0/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a><T>]</h4></section></summary><div class="docblock"><p>Returns the remaining spare capacity of the vector as a slice of +<code>MaybeUninit<T></code>.</p> +<p>The returned slice can be used to fill the vector with data (e.g. by +reading from a file) before marking the data as initialized using the +<a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.set_len" title="method alloc::vec::Vec::set_len"><code>set_len</code></a> method.</p> +<h5 id="examples-32"><a class="doc-anchor" href="#examples-32">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// Allocate vector big enough for 10 elements. +</span><span class="kw">let </span><span class="kw-2">mut </span>v = Vec::with_capacity(<span class="number">10</span>); + +<span class="comment">// Fill in the first 3 elements. +</span><span class="kw">let </span>uninit = v.spare_capacity_mut(); +uninit[<span class="number">0</span>].write(<span class="number">0</span>); +uninit[<span class="number">1</span>].write(<span class="number">1</span>); +uninit[<span class="number">2</span>].write(<span class="number">2</span>); + +<span class="comment">// Mark the first 3 elements of the vector as being initialized. +</span><span class="kw">unsafe </span>{ + v.set_len(<span class="number">3</span>); +} + +<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>v, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_spare_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2388">source</a><h4 class="code-header">pub fn <a href="#method.split_at_spare_mut" class="fn">split_at_spare_mut</a>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut [<a class="union" href="https://doc.rust-lang.org/1.77.0/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">MaybeUninit</a><T>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>vec_split_at_spare</code>)</span></div></span></summary><div class="docblock"><p>Returns vector content as a slice of <code>T</code>, along with the remaining spare +capacity of the vector as a slice of <code>MaybeUninit<T></code>.</p> +<p>The returned spare capacity slice can be used to fill the vector with data +(e.g. by reading from a file) before marking the data as initialized using +the <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.set_len" title="method alloc::vec::Vec::set_len"><code>set_len</code></a> method.</p> +<p>Note that this is a low-level API, which should be used with care for +optimization purposes. If you need to append data to a <code>Vec</code> +you can use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.push" title="method alloc::vec::Vec::push"><code>push</code></a>, <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.extend" title="method alloc::vec::Vec::extend"><code>extend</code></a>, <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.extend_from_slice" title="method alloc::vec::Vec::extend_from_slice"><code>extend_from_slice</code></a>, +<a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.extend_from_within" title="method alloc::vec::Vec::extend_from_within"><code>extend_from_within</code></a>, <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.insert" title="method alloc::vec::Vec::insert"><code>insert</code></a>, <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.append" title="method alloc::vec::Vec::append"><code>append</code></a>, <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.resize" title="method alloc::vec::Vec::resize"><code>resize</code></a> or +<a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.resize_with" title="method alloc::vec::Vec::resize_with"><code>resize_with</code></a>, depending on your exact needs.</p> +<h5 id="examples-33"><a class="doc-anchor" href="#examples-33">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(vec_split_at_spare)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="comment">// Reserve additional space big enough for 10 elements. +</span>v.reserve(<span class="number">10</span>); + +<span class="kw">let </span>(init, uninit) = v.split_at_spare_mut(); +<span class="kw">let </span>sum = init.iter().copied().sum::<u32>(); + +<span class="comment">// Fill in the next 4 elements. +</span>uninit[<span class="number">0</span>].write(sum); +uninit[<span class="number">1</span>].write(sum * <span class="number">2</span>); +uninit[<span class="number">2</span>].write(sum * <span class="number">3</span>); +uninit[<span class="number">3</span>].write(sum * <span class="number">4</span>); + +<span class="comment">// Mark the 4 elements of the vector as being initialized. +</span><span class="kw">unsafe </span>{ + <span class="kw">let </span>len = v.len(); + v.set_len(len + <span class="number">4</span>); +} + +<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>, <span class="number">8</span>, <span class="number">12</span>, <span class="number">16</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.resize" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2448">source</a></span><h4 class="code-header">pub fn <a href="#method.resize" class="fn">resize</a>(&mut self, new_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, value: T)</h4></section></summary><div class="docblock"><p>Resizes the <code>Vec</code> in-place so that <code>len</code> is equal to <code>new_len</code>.</p> +<p>If <code>new_len</code> is greater than <code>len</code>, the <code>Vec</code> is extended by the +difference, with each additional slot filled with <code>value</code>. +If <code>new_len</code> is less than <code>len</code>, the <code>Vec</code> is simply truncated.</p> +<p>This method requires <code>T</code> to implement <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a>, +in order to be able to clone the passed value. +If you need more flexibility (or want to rely on <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default"><code>Default</code></a> instead of +<a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a>), use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.resize_with" title="method alloc::vec::Vec::resize_with"><code>Vec::resize_with</code></a>. +If you only need to resize to a smaller size, use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.truncate" title="method alloc::vec::Vec::truncate"><code>Vec::truncate</code></a>.</p> +<h5 id="examples-34"><a class="doc-anchor" href="#examples-34">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="string">"hello"</span>]; +vec.resize(<span class="number">3</span>, <span class="string">"world"</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="string">"hello"</span>, <span class="string">"world"</span>, <span class="string">"world"</span>]); + +<span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; +vec.resize(<span class="number">2</span>, <span class="number">0</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_from_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.6.0">1.6.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2479">source</a></span><h4 class="code-header">pub fn <a href="#method.extend_from_slice" class="fn">extend_from_slice</a>(&mut self, other: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Clones and appends all elements in a slice to the <code>Vec</code>.</p> +<p>Iterates over the slice <code>other</code>, clones each element, and then appends +it to this <code>Vec</code>. The <code>other</code> slice is traversed in-order.</p> +<p>Note that this function is same as <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.extend" title="method alloc::vec::Vec::extend"><code>extend</code></a> except that it is +specialized to work with slices instead. If and when Rust gets +specialization this function will likely be deprecated (but still +available).</p> +<h5 id="examples-35"><a class="doc-anchor" href="#examples-35">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>]; +vec.extend_from_slice(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_from_within" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.53.0">1.53.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2506-2508">source</a></span><h4 class="code-header">pub fn <a href="#method.extend_from_within" class="fn">extend_from_within</a><R>(&mut self, src: R)<div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>,</div></h4></section></summary><div class="docblock"><p>Copies elements from <code>src</code> range to the end of the vector.</p> +<h5 id="panics-9"><a class="doc-anchor" href="#panics-9">§</a>Panics</h5> +<p>Panics if the starting point is greater than the end point or if +the end point is greater than the length of the vector.</p> +<h5 id="examples-36"><a class="doc-anchor" href="#examples-36">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; + +vec.extend_from_within(<span class="number">2</span>..); +<span class="macro">assert_eq!</span>(vec, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]); + +vec.extend_from_within(..<span class="number">2</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">0</span>, <span class="number">1</span>]); + +vec.extend_from_within(<span class="number">4</span>..<span class="number">8</span>); +<span class="macro">assert_eq!</span>(vec, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.dedup" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#2615">source</a></span><h4 class="code-header">pub fn <a href="#method.dedup" class="fn">dedup</a>(&mut self)</h4></section></summary><div class="docblock"><p>Removes consecutive repeated elements in the vector according to the +<a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq"><code>PartialEq</code></a> trait implementation.</p> +<p>If the vector is sorted, this removes all duplicates.</p> +<h5 id="examples-37"><a class="doc-anchor" href="#examples-37">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>vec = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>]; + +vec.dedup(); + +<span class="macro">assert_eq!</span>(vec, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.splice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#3016-3019">source</a></span><h4 class="code-header">pub fn <a href="#method.splice" class="fn">splice</a><R, I>( + &mut self, + range: R, + replace_with: I +) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/splice/struct.Splice.html" title="struct alloc::vec::splice::Splice">Splice</a><'_, <I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>, A><div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>, + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,</div></h4></section></summary><div class="docblock"><p>Creates a splicing iterator that replaces the specified range in the vector +with the given <code>replace_with</code> iterator and yields the removed items. +<code>replace_with</code> does not need to be the same length as <code>range</code>.</p> +<p><code>range</code> is removed even if the iterator is not consumed until the end.</p> +<p>It is unspecified how many elements are removed from the vector +if the <code>Splice</code> value is leaked.</p> +<p>The input iterator <code>replace_with</code> is only consumed when the <code>Splice</code> value is dropped.</p> +<p>This is optimal if:</p> +<ul> +<li>The tail (elements in the vector after <code>range</code>) is empty,</li> +<li>or <code>replace_with</code> yields fewer or equal elements than <code>range</code>’s length</li> +<li>or the lower bound of its <code>size_hint()</code> is exact.</li> +</ul> +<p>Otherwise, a temporary vector is allocated and the tail is moved twice.</p> +<h5 id="panics-10"><a class="doc-anchor" href="#panics-10">§</a>Panics</h5> +<p>Panics if the starting point is greater than the end point or if +the end point is greater than the length of the vector.</p> +<h5 id="examples-38"><a class="doc-anchor" href="#examples-38">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; +<span class="kw">let </span>new = [<span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>]; +<span class="kw">let </span>u: Vec<<span class="kw">_</span>> = v.splice(<span class="number">1</span>..<span class="number">3</span>, new).collect(); +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>(u, <span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.extract_if" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/vec/mod.rs.html#3075-3077">source</a><h4 class="code-header">pub fn <a href="#method.extract_if" class="fn">extract_if</a><F>(&mut self, filter: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/extract_if/struct.ExtractIf.html" title="struct alloc::vec::extract_if::ExtractIf">ExtractIf</a><'_, T, F, A><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extract_if</code>)</span></div></span></summary><div class="docblock"><p>Creates an iterator which uses a closure to determine if an element should be removed.</p> +<p>If the closure returns true, then the element is removed and yielded. +If the closure returns false, the element will remain in the vector and will not be yielded +by the iterator.</p> +<p>If the returned <code>ExtractIf</code> is not exhausted, e.g. because it is dropped without iterating +or the iteration short-circuits, then the remaining elements will be retained. +Use <a href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html#method.retain" title="method alloc::vec::Vec::retain"><code>retain</code></a> with a negated predicate if you do not need the returned iterator.</p> +<p>Using this method is equivalent to the following code:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>i = <span class="number">0</span>; +<span class="kw">while </span>i < vec.len() { + <span class="kw">if </span>some_predicate(<span class="kw-2">&mut </span>vec[i]) { + <span class="kw">let </span>val = vec.remove(i); + <span class="comment">// your code here + </span>} <span class="kw">else </span>{ + i += <span class="number">1</span>; + } +} +</code></pre></div> +<p>But <code>extract_if</code> is easier to use. <code>extract_if</code> is also more efficient, +because it can backshift the elements of the array in bulk.</p> +<p>Note that <code>extract_if</code> also lets you mutate every element in the filter closure, +regardless of whether you choose to keep or remove it.</p> +<h5 id="examples-39"><a class="doc-anchor" href="#examples-39">§</a>Examples</h5> +<p>Splitting an array into evens and odds, reusing the original allocation:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(extract_if)] +</span><span class="kw">let </span><span class="kw-2">mut </span>numbers = <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">8</span>, <span class="number">9</span>, <span class="number">11</span>, <span class="number">13</span>, <span class="number">14</span>, <span class="number">15</span>]; + +<span class="kw">let </span>evens = numbers.extract_if(|x| <span class="kw-2">*</span>x % <span class="number">2 </span>== <span class="number">0</span>).collect::<Vec<<span class="kw">_</span>>>(); +<span class="kw">let </span>odds = numbers; + +<span class="macro">assert_eq!</span>(evens, <span class="macro">vec!</span>[<span class="number">2</span>, <span class="number">4</span>, <span class="number">6</span>, <span class="number">8</span>, <span class="number">14</span>]); +<span class="macro">assert_eq!</span>(odds, <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">9</span>, <span class="number">11</span>, <span class="number">13</span>, <span class="number">15</span>]);</code></pre></div> +</div></details></div><h2 id="deref-methods-%5BT%5D" class="section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>></span><a href="#deref-methods-%5BT%5D" class="anchor">§</a></h2><div id="deref-methods-%5BT%5D-1" class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.len-1" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#138">source</a></span><h4 class="code-header">pub fn <a href="#method.len-1" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of elements in the slice.</p> +<h5 id="examples-40"><a class="doc-anchor" href="#examples-40">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="macro">assert_eq!</span>(a.len(), <span class="number">3</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty-1" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#154">source</a></span><h4 class="code-header">pub fn <a href="#method.is_empty-1" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice has a length of 0.</p> +<h5 id="examples-41"><a class="doc-anchor" href="#examples-41">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="macro">assert!</span>(!a.is_empty());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.first" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#173">source</a></span><h4 class="code-header">pub fn <a href="#method.first" class="fn">first</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>></h4></section></summary><div class="docblock"><p>Returns the first element of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-42"><a class="doc-anchor" href="#examples-42">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>), v.first()); + +<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.first());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.first_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#193">source</a></span><h4 class="code-header">pub fn <a href="#method.first_mut" class="fn">first_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>></h4></section></summary><div class="docblock"><p>Returns a mutable pointer to the first element of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-43"><a class="doc-anchor" href="#examples-43">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(first) = x.first_mut() { + <span class="kw-2">*</span>first = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">5</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_first" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#213">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first" class="fn">split_first</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-44"><a class="doc-anchor" href="#examples-44">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first() { + <span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="number">0</span>); + <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_first_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#235">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first_mut" class="fn">split_first_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-45"><a class="doc-anchor" href="#examples-45">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first_mut() { + <span class="kw-2">*</span>first = <span class="number">3</span>; + elements[<span class="number">0</span>] = <span class="number">4</span>; + elements[<span class="number">1</span>] = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_last" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#255">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last" class="fn">split_last</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-46"><a class="doc-anchor" href="#examples-46">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last() { + <span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="number">2</span>); + <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>]); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_last_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#277">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last_mut" class="fn">split_last_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-47"><a class="doc-anchor" href="#examples-47">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last_mut() { + <span class="kw-2">*</span>last = <span class="number">3</span>; + elements[<span class="number">0</span>] = <span class="number">4</span>; + elements[<span class="number">1</span>] = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#296">source</a></span><h4 class="code-header">pub fn <a href="#method.last" class="fn">last</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>></h4></section></summary><div class="docblock"><p>Returns the last element of the slice, or <code>None</code> if it is empty.</p> +<h5 id="examples-48"><a class="doc-anchor" href="#examples-48">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">30</span>), v.last()); + +<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.last());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#316">source</a></span><h4 class="code-header">pub fn <a href="#method.last_mut" class="fn">last_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the last item in the slice.</p> +<h5 id="examples-49"><a class="doc-anchor" href="#examples-49">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(last) = x.last_mut() { + <span class="kw-2">*</span>last = <span class="number">10</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">10</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.first_chunk" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#339">source</a></span><h4 class="code-header">pub fn <a href="#method.first_chunk" class="fn">first_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>></h4></section></summary><div class="docblock"><p>Return an array reference to the first <code>N</code> items in the slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-50"><a class="doc-anchor" href="#examples-50">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>u = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]), u.first_chunk::<<span class="number">2</span>>()); + +<span class="kw">let </span>v: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[<span class="number">10</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.first_chunk::<<span class="number">2</span>>()); + +<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[]), w.first_chunk::<<span class="number">0</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.first_chunk_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#369">source</a></span><h4 class="code-header">pub fn <a href="#method.first_chunk_mut" class="fn">first_chunk_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>></h4></section></summary><div class="docblock"><p>Return a mutable array reference to the first <code>N</code> items in the slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-51"><a class="doc-anchor" href="#examples-51">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(first) = x.first_chunk_mut::<<span class="number">2</span>>() { + first[<span class="number">0</span>] = <span class="number">5</span>; + first[<span class="number">1</span>] = <span class="number">4</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">5</span>, <span class="number">4</span>, <span class="number">2</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.first_chunk_mut::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_first_chunk" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#399">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first_chunk" class="fn">split_first_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Return an array reference to the first <code>N</code> items in the slice and the remaining slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-52"><a class="doc-anchor" href="#examples-52">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first_chunk::<<span class="number">2</span>>() { + <span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>]); + <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">2</span>]); +} + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.split_first_chunk::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_first_chunk_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#434-436">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first_chunk_mut" class="fn">split_first_chunk_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Return a mutable array reference to the first <code>N</code> items in the slice and the remaining +slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-53"><a class="doc-anchor" href="#examples-53">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first_chunk_mut::<<span class="number">2</span>>() { + first[<span class="number">0</span>] = <span class="number">3</span>; + first[<span class="number">1</span>] = <span class="number">4</span>; + elements[<span class="number">0</span>] = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.split_first_chunk_mut::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_last_chunk" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#469">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last_chunk" class="fn">split_last_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>)></h4></section></summary><div class="docblock"><p>Return an array reference to the last <code>N</code> items in the slice and the remaining slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-54"><a class="doc-anchor" href="#examples-54">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((elements, last)) = x.split_last_chunk::<<span class="number">2</span>>() { + <span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">0</span>]); + <span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]); +} + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.split_last_chunk::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_last_chunk_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#504-506">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last_chunk_mut" class="fn">split_last_chunk_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>)></h4></section></summary><div class="docblock"><p>Return a mutable array reference to the last <code>N</code> items in the slice and the remaining +slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-55"><a class="doc-anchor" href="#examples-55">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((elements, last)) = x.split_last_chunk_mut::<<span class="number">2</span>>() { + last[<span class="number">0</span>] = <span class="number">3</span>; + last[<span class="number">1</span>] = <span class="number">4</span>; + elements[<span class="number">0</span>] = <span class="number">5</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.split_last_chunk_mut::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last_chunk" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#539">source</a></span><h4 class="code-header">pub fn <a href="#method.last_chunk" class="fn">last_chunk</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>></h4></section></summary><div class="docblock"><p>Return an array reference to the last <code>N</code> items in the slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-56"><a class="doc-anchor" href="#examples-56">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>u = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>]), u.last_chunk::<<span class="number">2</span>>()); + +<span class="kw">let </span>v: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[<span class="number">10</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.last_chunk::<<span class="number">2</span>>()); + +<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[]), w.last_chunk::<<span class="number">0</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last_chunk_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#573">source</a></span><h4 class="code-header">pub fn <a href="#method.last_chunk_mut" class="fn">last_chunk_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>></h4></section></summary><div class="docblock"><p>Return a mutable array reference to the last <code>N</code> items in the slice.</p> +<p>If the slice is not at least <code>N</code> in length, this will return <code>None</code>.</p> +<h5 id="examples-57"><a class="doc-anchor" href="#examples-57">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(last) = x.last_chunk_mut::<<span class="number">2</span>>() { + last[<span class="number">0</span>] = <span class="number">10</span>; + last[<span class="number">1</span>] = <span class="number">20</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">10</span>, <span class="number">20</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, x.last_chunk_mut::<<span class="number">4</span>>());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#608-610">source</a></span><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a><I>(&self, index: I) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>><div class="where">where + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>,</div></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice depending on the type of +index.</p> +<ul> +<li>If given a position, returns a reference to the element at that +position or <code>None</code> if out of bounds.</li> +<li>If given a range, returns the subslice corresponding to that range, +or <code>None</code> if out of bounds.</li> +</ul> +<h5 id="examples-58"><a class="doc-anchor" href="#examples-58">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">40</span>), v.get(<span class="number">1</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>][..]), v.get(<span class="number">0</span>..<span class="number">2</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">3</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">0</span>..<span class="number">4</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#633-635">source</a></span><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a><I>( + &mut self, + index: I +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>><div class="where">where + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>,</div></h4></section></summary><div class="docblock"><p>Returns a mutable reference to an element or subslice depending on the +type of index (see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.get" title="method slice::get"><code>get</code></a>) or <code>None</code> if the index is out of bounds.</p> +<h5 id="examples-59"><a class="doc-anchor" href="#examples-59">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>(elem) = x.get_mut(<span class="number">1</span>) { + <span class="kw-2">*</span>elem = <span class="number">42</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">42</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_unchecked" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#670-672">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked" class="fn">get_unchecked</a><I>( + &self, + index: I +) -> &<I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><div class="where">where + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>,</div></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice, without doing bounds +checking.</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.get" title="method slice::get"><code>get</code></a>.</p> +<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting reference is not used.</p> +<p>You can think of this like <code>.get(index).unwrap_unchecked()</code>. It’s UB +to call <code>.get_unchecked(len)</code>, even if you immediately convert to a +pointer. And it’s UB to call <code>.get_unchecked(..len + 1)</code>, +<code>.get_unchecked(..=len)</code>, or similar.</p> +<h5 id="examples-60"><a class="doc-anchor" href="#examples-60">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; + +<span class="kw">unsafe </span>{ + <span class="macro">assert_eq!</span>(x.get_unchecked(<span class="number">1</span>), <span class="kw-2">&</span><span class="number">2</span>); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_unchecked_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#712-714">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked_mut" class="fn">get_unchecked_mut</a><I>( + &mut self, + index: I +) -> &mut <I as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><div class="where">where + I: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>>,</div></h4></section></summary><div class="docblock"><p>Returns a mutable reference to an element or subslice, without doing +bounds checking.</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.get_mut" title="method slice::get_mut"><code>get_mut</code></a>.</p> +<h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting reference is not used.</p> +<p>You can think of this like <code>.get_mut(index).unwrap_unchecked()</code>. It’s +UB to call <code>.get_unchecked_mut(len)</code>, even if you immediately convert +to a pointer. And it’s UB to call <code>.get_unchecked_mut(..len + 1)</code>, +<code>.get_unchecked_mut(..=len)</code>, or similar.</p> +<h5 id="examples-61"><a class="doc-anchor" href="#examples-61">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>elem = x.get_unchecked_mut(<span class="number">1</span>); + <span class="kw-2">*</span>elem = <span class="number">13</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">13</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ptr-1" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#753">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr-1" class="fn">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const T</a></h4></section></summary><div class="docblock"><p>Returns a raw pointer to the slice’s buffer.</p> +<p>The caller must ensure that the slice outlives the pointer this +function returns, or else it will end up pointing to garbage.</p> +<p>The caller must also ensure that the memory the pointer (non-transitively) points to +is never written to (except inside an <code>UnsafeCell</code>) using this pointer or any pointer +derived from it. If you need to mutate the contents of the slice, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.as_mut_ptr" title="method slice::as_mut_ptr"><code>as_mut_ptr</code></a>.</p> +<p>Modifying the container referenced by this slice may cause its buffer +to be reallocated, which would also make any pointers to it invalid.</p> +<h5 id="examples-62"><a class="doc-anchor" href="#examples-62">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">let </span>x_ptr = x.as_ptr(); + +<span class="kw">unsafe </span>{ + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() { + <span class="macro">assert_eq!</span>(x.get_unchecked(i), <span class="kw-2">&*</span>x_ptr.add(i)); + } +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_ptr-1" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#784">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr-1" class="fn">as_mut_ptr</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*mut T</a></h4></section></summary><div class="docblock"><p>Returns an unsafe mutable pointer to the slice’s buffer.</p> +<p>The caller must ensure that the slice outlives the pointer this +function returns, or else it will end up pointing to garbage.</p> +<p>Modifying the container referenced by this slice may cause its buffer +to be reallocated, which would also make any pointers to it invalid.</p> +<h5 id="examples-63"><a class="doc-anchor" href="#examples-63">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">let </span>x_ptr = x.as_mut_ptr(); + +<span class="kw">unsafe </span>{ + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() { + <span class="kw-2">*</span>x_ptr.add(i) += <span class="number">2</span>; + } +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ptr_range" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#820">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr_range" class="fn">as_ptr_range</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const T</a>></h4></section></summary><div class="docblock"><p>Returns the two raw pointers spanning the slice.</p> +<p>The returned range is half-open, which means that the end pointer +points <em>one past</em> the last element of the slice. This way, an empty +slice is represented by two equal pointers, and the difference between +the two pointers represents the size of the slice.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.as_ptr" title="method slice::as_ptr"><code>as_ptr</code></a> for warnings on using these pointers. The end pointer +requires extra caution, as it does not point to a valid element in the +slice.</p> +<p>This function is useful for interacting with foreign interfaces which +use two pointers to refer to a range of elements in memory, as is +common in C++.</p> +<p>It can also be useful to check if a pointer to an element refers to an +element of this slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span>x = <span class="kw-2">&</span>a[<span class="number">1</span>] <span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>; +<span class="kw">let </span>y = <span class="kw-2">&</span><span class="number">5 </span><span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>; + +<span class="macro">assert!</span>(a.as_ptr_range().contains(<span class="kw-2">&</span>x)); +<span class="macro">assert!</span>(!a.as_ptr_range().contains(<span class="kw-2">&</span>y));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_ptr_range" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#864">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr_range" class="fn">as_mut_ptr_range</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*mut T</a>></h4></section></summary><div class="docblock"><p>Returns the two unsafe mutable pointers spanning the slice.</p> +<p>The returned range is half-open, which means that the end pointer +points <em>one past</em> the last element of the slice. This way, an empty +slice is represented by two equal pointers, and the difference between +the two pointers represents the size of the slice.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.as_mut_ptr" title="method slice::as_mut_ptr"><code>as_mut_ptr</code></a> for warnings on using these pointers. The end +pointer requires extra caution, as it does not point to a valid element +in the slice.</p> +<p>This function is useful for interacting with foreign interfaces which +use two pointers to refer to a range of elements in memory, as is +common in C++.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.swap" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#895">source</a></span><h4 class="code-header">pub fn <a href="#method.swap" class="fn">swap</a>(&mut self, a: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Swaps two elements in the slice.</p> +<p>If <code>a</code> equals to <code>b</code>, it’s guaranteed that elements won’t change value.</p> +<h5 id="arguments"><a class="doc-anchor" href="#arguments">§</a>Arguments</h5> +<ul> +<li>a - The index of the first element</li> +<li>b - The index of the second element</li> +</ul> +<h5 id="panics-11"><a class="doc-anchor" href="#panics-11">§</a>Panics</h5> +<p>Panics if <code>a</code> or <code>b</code> are out of bounds.</p> +<h5 id="examples-64"><a class="doc-anchor" href="#examples-64">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>, <span class="string">"d"</span>, <span class="string">"e"</span>]; +v.swap(<span class="number">2</span>, <span class="number">4</span>); +<span class="macro">assert!</span>(v == [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"e"</span>, <span class="string">"d"</span>, <span class="string">"c"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.swap_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#938">source</a><h4 class="code-header">pub unsafe fn <a href="#method.swap_unchecked" class="fn">swap_unchecked</a>(&mut self, a: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_swap_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Swaps two elements in the slice, without doing bounds checking.</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.swap" title="method slice::swap"><code>swap</code></a>.</p> +<h5 id="arguments-1"><a class="doc-anchor" href="#arguments-1">§</a>Arguments</h5> +<ul> +<li>a - The index of the first element</li> +<li>b - The index of the second element</li> +</ul> +<h5 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>. +The caller has to ensure that <code>a < self.len()</code> and <code>b < self.len()</code>.</p> +<h5 id="examples-65"><a class="doc-anchor" href="#examples-65">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_swap_unchecked)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>, <span class="string">"d"</span>]; +<span class="comment">// SAFETY: we know that 1 and 3 are both indices of the slice +</span><span class="kw">unsafe </span>{ v.swap_unchecked(<span class="number">1</span>, <span class="number">3</span>) }; +<span class="macro">assert!</span>(v == [<span class="string">"a"</span>, <span class="string">"d"</span>, <span class="string">"c"</span>, <span class="string">"b"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.reverse" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#962">source</a></span><h4 class="code-header">pub fn <a href="#method.reverse" class="fn">reverse</a>(&mut self)</h4></section></summary><div class="docblock"><p>Reverses the order of elements in the slice, in place.</p> +<h5 id="examples-66"><a class="doc-anchor" href="#examples-66">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +v.reverse(); +<span class="macro">assert!</span>(v == [<span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.iter" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1020">source</a></span><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over the slice.</p> +<p>The iterator yields all items from start to end.</p> +<h5 id="examples-67"><a class="doc-anchor" href="#examples-67">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iterator = x.iter(); + +<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">1</span>)); +<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">2</span>)); +<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">4</span>)); +<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.iter_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1039">source</a></span><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.IterMut.html" title="struct core::slice::iter::IterMut">IterMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator that allows modifying each value.</p> +<p>The iterator yields all items from start to end.</p> +<h5 id="examples-68"><a class="doc-anchor" href="#examples-68">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="kw">for </span>elem <span class="kw">in </span>x.iter_mut() { + <span class="kw-2">*</span>elem += <span class="number">2</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.windows" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1088">source</a></span><h4 class="code-header">pub fn <a href="#method.windows" class="fn">windows</a>(&self, size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Windows.html" title="struct core::slice::iter::Windows">Windows</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over all contiguous windows of length +<code>size</code>. The windows overlap. If the slice is shorter than +<code>size</code>, the iterator returns no values.</p> +<h5 id="panics-12"><a class="doc-anchor" href="#panics-12">§</a>Panics</h5> +<p>Panics if <code>size</code> is 0.</p> +<h5 id="examples-69"><a class="doc-anchor" href="#examples-69">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">3</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>If the slice is shorter than <code>size</code>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'f'</span>, <span class="string">'o'</span>, <span class="string">'o'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">4</span>); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>There’s no <code>windows_mut</code>, as that existing would let safe code violate the +“only one <code>&mut</code> at a time to the same thing” rule. However, you can sometimes +use <a href="https://doc.rust-lang.org/1.77.0/core/cell/struct.Cell.html#method.as_slice_of_cells" title="method core::cell::Cell::as_slice_of_cells"><code>Cell::as_slice_of_cells</code></a> in +conjunction with <code>windows</code> to accomplish something similar:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::cell::Cell; + +<span class="kw">let </span><span class="kw-2">mut </span>array = [<span class="string">'R'</span>, <span class="string">'u'</span>, <span class="string">'s'</span>, <span class="string">'t'</span>, <span class="string">' '</span>, <span class="string">'2'</span>, <span class="string">'0'</span>, <span class="string">'1'</span>, <span class="string">'5'</span>]; +<span class="kw">let </span>slice = <span class="kw-2">&mut </span>array[..]; +<span class="kw">let </span>slice_of_cells: <span class="kw-2">&</span>[Cell<char>] = Cell::from_mut(slice).as_slice_of_cells(); +<span class="kw">for </span>w <span class="kw">in </span>slice_of_cells.windows(<span class="number">3</span>) { + Cell::swap(<span class="kw-2">&</span>w[<span class="number">0</span>], <span class="kw-2">&</span>w[<span class="number">2</span>]); +} +<span class="macro">assert_eq!</span>(array, [<span class="string">'s'</span>, <span class="string">'t'</span>, <span class="string">' '</span>, <span class="string">'2'</span>, <span class="string">'0'</span>, <span class="string">'1'</span>, <span class="string">'5'</span>, <span class="string">'u'</span>, <span class="string">'R'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunks" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1123">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks" class="fn">chunks</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Chunks.html" title="struct core::slice::iter::Chunks">Chunks</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the +slice, then the last chunk will not have length <code>chunk_size</code>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact" title="method slice::chunks_exact"><code>chunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly +<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks" title="method slice::rchunks"><code>rchunks</code></a> for the same iterator but starting at the end of the +slice.</p> +<h5 id="panics-13"><a class="doc-anchor" href="#panics-13">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-70"><a class="doc-anchor" href="#examples-70">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'m'</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1162">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_mut" class="fn">chunks_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksMut.html" title="struct core::slice::iter::ChunksMut">ChunksMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the +length of the slice, then the last chunk will not have length <code>chunk_size</code>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact_mut" title="method slice::chunks_exact_mut"><code>chunks_exact_mut</code></a> for a variant of this iterator that returns chunks of always +exactly <code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_mut" title="method slice::rchunks_mut"><code>rchunks_mut</code></a> for the same iterator but starting at +the end of the slice.</p> +<h5 id="panics-14"><a class="doc-anchor" href="#panics-14">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-71"><a class="doc-anchor" href="#examples-71">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.chunks_mut(<span class="number">2</span>) { + <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() { + <span class="kw-2">*</span>elem += count; + } + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_exact" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1200">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact" class="fn">chunks_exact</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksExact.html" title="struct core::slice::iter::ChunksExact">ChunksExact</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the +slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved +from the <code>remainder</code> function of the iterator.</p> +<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the +resulting code better than in the case of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks" title="method slice::chunks"><code>chunks</code></a>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks" title="method slice::chunks"><code>chunks</code></a> for a variant of this iterator that also returns the remainder as a smaller +chunk, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_exact" title="method slice::rchunks_exact"><code>rchunks_exact</code></a> for the same iterator but starting at the end of the slice.</p> +<h5 id="panics-15"><a class="doc-anchor" href="#panics-15">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-72"><a class="doc-anchor" href="#examples-72">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks_exact(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]); +<span class="macro">assert!</span>(iter.next().is_none()); +<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunks_exact_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1243">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact_mut" class="fn">chunks_exact_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunksExactMut.html" title="struct core::slice::iter::ChunksExactMut">ChunksExactMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the +length of the slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be +retrieved from the <code>into_remainder</code> function of the iterator.</p> +<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the +resulting code better than in the case of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_mut" title="method slice::chunks_mut"><code>chunks_mut</code></a>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_mut" title="method slice::chunks_mut"><code>chunks_mut</code></a> for a variant of this iterator that also returns the remainder as a +smaller chunk, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_exact_mut" title="method slice::rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for the same iterator but starting at the end of +the slice.</p> +<h5 id="panics-16"><a class="doc-anchor" href="#panics-16">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-73"><a class="doc-anchor" href="#examples-73">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.chunks_exact_mut(<span class="number">2</span>) { + <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() { + <span class="kw-2">*</span>elem += count; + } + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">0</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_chunks_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1278">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked" class="fn">as_chunks_unchecked</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +assuming that there’s no remainder.</p> +<h5 id="safety-4"><a class="doc-anchor" href="#safety-4">§</a>Safety</h5> +<p>This may only be called when</p> +<ul> +<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li> +<li><code>N != 0</code>.</li> +</ul> +<h5 id="examples-74"><a class="doc-anchor" href="#examples-74">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice: <span class="kw-2">&</span>[char] = <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>]; +<span class="kw">let </span>chunks: <span class="kw-2">&</span>[[char; <span class="number">1</span>]] = + <span class="comment">// SAFETY: 1-element chunks never have remainder + </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() }; +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>], [<span class="string">'o'</span>], [<span class="string">'r'</span>], [<span class="string">'e'</span>], [<span class="string">'m'</span>], [<span class="string">'!'</span>]]); +<span class="kw">let </span>chunks: <span class="kw-2">&</span>[[char; <span class="number">3</span>]] = + <span class="comment">// SAFETY: The slice length (6) is a multiple of 3 + </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() }; +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>], [<span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>]]); + +<span class="comment">// These would be unsound: +// let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5 +// let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed</span></code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_chunks" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1323">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks" class="fn">as_chunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> (&[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>], &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +starting at the beginning of the slice, +and a remainder slice with length strictly less than <code>N</code>.</p> +<h5 id="panics-17"><a class="doc-anchor" href="#panics-17">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-75"><a class="doc-anchor" href="#examples-75">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span>(chunks, remainder) = slice.as_chunks(); +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>, <span class="string">'o'</span>], [<span class="string">'r'</span>, <span class="string">'e'</span>]]); +<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div> +<p>If you expect the slice to be an exact multiple, you can combine +<code>let</code>-<code>else</code> with an empty slice pattern:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice = [<span class="string">'R'</span>, <span class="string">'u'</span>, <span class="string">'s'</span>, <span class="string">'t'</span>]; +<span class="kw">let </span>(chunks, []) = slice.as_chunks::<<span class="number">2</span>>() <span class="kw">else </span>{ + <span class="macro">panic!</span>(<span class="string">"slice didn't have even length"</span>) +}; +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'R'</span>, <span class="string">'u'</span>], [<span class="string">'s'</span>, <span class="string">'t'</span>]]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_rchunks" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1355">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks" class="fn">as_rchunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +starting at the end of the slice, +and a remainder slice with length strictly less than <code>N</code>.</p> +<h5 id="panics-18"><a class="doc-anchor" href="#panics-18">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-76"><a class="doc-anchor" href="#examples-76">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span>(remainder, chunks) = slice.as_rchunks(); +<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&</span>[<span class="string">'l'</span>]); +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'o'</span>, <span class="string">'r'</span>], [<span class="string">'e'</span>, <span class="string">'m'</span>]]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.array_chunks" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1395">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks" class="fn">array_chunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayChunks.html" title="struct core::slice::iter::ArrayChunks">ArrayChunks</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are array references and do not overlap. If <code>N</code> does not divide the +length of the slice, then the last up to <code>N-1</code> elements will be omitted and can be +retrieved from the <code>remainder</code> function of the iterator.</p> +<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact" title="method slice::chunks_exact"><code>chunks_exact</code></a>.</p> +<h5 id="panics-19"><a class="doc-anchor" href="#panics-19">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-77"><a class="doc-anchor" href="#examples-77">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)] +</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_chunks(); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]); +<span class="macro">assert!</span>(iter.next().is_none()); +<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_chunks_unchecked_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1432">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked_mut" class="fn">as_chunks_unchecked_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self +) -> &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +assuming that there’s no remainder.</p> +<h5 id="safety-5"><a class="doc-anchor" href="#safety-5">§</a>Safety</h5> +<p>This may only be called when</p> +<ul> +<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li> +<li><code>N != 0</code>.</li> +</ul> +<h5 id="examples-78"><a class="doc-anchor" href="#examples-78">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>slice: <span class="kw-2">&mut </span>[char] = <span class="kw-2">&mut </span>[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>]; +<span class="kw">let </span>chunks: <span class="kw-2">&mut </span>[[char; <span class="number">1</span>]] = + <span class="comment">// SAFETY: 1-element chunks never have remainder + </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked_mut() }; +chunks[<span class="number">0</span>] = [<span class="string">'L'</span>]; +<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'L'</span>], [<span class="string">'o'</span>], [<span class="string">'r'</span>], [<span class="string">'e'</span>], [<span class="string">'m'</span>], [<span class="string">'!'</span>]]); +<span class="kw">let </span>chunks: <span class="kw-2">&mut </span>[[char; <span class="number">3</span>]] = + <span class="comment">// SAFETY: The slice length (6) is a multiple of 3 + </span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked_mut() }; +chunks[<span class="number">1</span>] = [<span class="string">'a'</span>, <span class="string">'x'</span>, <span class="string">'?'</span>]; +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'L'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'a'</span>, <span class="string">'x'</span>, <span class="string">'?'</span>]); + +<span class="comment">// These would be unsound: +// let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5 +// let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed</span></code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_chunks_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1472">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks_mut" class="fn">as_chunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> (&mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>], &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +starting at the beginning of the slice, +and a remainder slice with length strictly less than <code>N</code>.</p> +<h5 id="panics-20"><a class="doc-anchor" href="#panics-20">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-79"><a class="doc-anchor" href="#examples-79">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">let </span>(chunks, remainder) = v.as_chunks_mut(); +remainder[<span class="number">0</span>] = <span class="number">9</span>; +<span class="kw">for </span>chunk <span class="kw">in </span>chunks { + <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>]; + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_rchunks_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1510">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks_mut" class="fn">as_rchunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays, +starting at the end of the slice, +and a remainder slice with length strictly less than <code>N</code>.</p> +<h5 id="panics-21"><a class="doc-anchor" href="#panics-21">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-80"><a class="doc-anchor" href="#examples-80">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)] +</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">let </span>(remainder, chunks) = v.as_rchunks_mut(); +remainder[<span class="number">0</span>] = <span class="number">9</span>; +<span class="kw">for </span>chunk <span class="kw">in </span>chunks { + <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>]; + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">9</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.array_chunks_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1552">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks_mut" class="fn">array_chunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayChunksMut.html" title="struct core::slice::iter::ArrayChunksMut">ArrayChunksMut</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the +beginning of the slice.</p> +<p>The chunks are mutable array references and do not overlap. If <code>N</code> does not divide +the length of the slice, then the last up to <code>N-1</code> elements will be omitted and +can be retrieved from the <code>into_remainder</code> function of the iterator.</p> +<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact_mut" title="method slice::chunks_exact_mut"><code>chunks_exact_mut</code></a>.</p> +<h5 id="panics-22"><a class="doc-anchor" href="#panics-22">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-81"><a class="doc-anchor" href="#examples-81">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)] +</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.array_chunks_mut() { + <span class="kw-2">*</span>chunk = [count; <span class="number">2</span>]; + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">0</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.array_windows" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1585">source</a><h4 class="code-header">pub fn <a href="#method.array_windows" class="fn">array_windows</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ArrayWindows.html" title="struct core::slice::iter::ArrayWindows">ArrayWindows</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_windows</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over overlapping windows of <code>N</code> elements of a slice, +starting at the beginning of the slice.</p> +<p>This is the const generic equivalent of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.windows" title="method slice::windows"><code>windows</code></a>.</p> +<p>If <code>N</code> is greater than the size of the slice, it will return no windows.</p> +<h5 id="panics-23"><a class="doc-anchor" href="#panics-23">§</a>Panics</h5> +<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time +error before this method gets stabilized.</p> +<h5 id="examples-82"><a class="doc-anchor" href="#examples-82">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_windows)] +</span><span class="kw">let </span>slice = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_windows(); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1620">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks" class="fn">rchunks</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunks.html" title="struct core::slice::iter::RChunks">RChunks</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end +of the slice.</p> +<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the +slice, then the last chunk will not have length <code>chunk_size</code>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_exact" title="method slice::rchunks_exact"><code>rchunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly +<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks" title="method slice::chunks"><code>chunks</code></a> for the same iterator but starting at the beginning +of the slice.</p> +<h5 id="panics-24"><a class="doc-anchor" href="#panics-24">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-83"><a class="doc-anchor" href="#examples-83">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'e'</span>, <span class="string">'m'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'o'</span>, <span class="string">'r'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1659">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_mut" class="fn">rchunks_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksMut.html" title="struct core::slice::iter::RChunksMut">RChunksMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end +of the slice.</p> +<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the +length of the slice, then the last chunk will not have length <code>chunk_size</code>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_exact_mut" title="method slice::rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for a variant of this iterator that returns chunks of always +exactly <code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_mut" title="method slice::chunks_mut"><code>chunks_mut</code></a> for the same iterator but starting at the +beginning of the slice.</p> +<h5 id="panics-25"><a class="doc-anchor" href="#panics-25">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-84"><a class="doc-anchor" href="#examples-84">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.rchunks_mut(<span class="number">2</span>) { + <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() { + <span class="kw-2">*</span>elem += count; + } + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_exact" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1699">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact" class="fn">rchunks_exact</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksExact.html" title="struct core::slice::iter::RChunksExact">RChunksExact</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the +end of the slice.</p> +<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the +slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved +from the <code>remainder</code> function of the iterator.</p> +<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the +resulting code better than in the case of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks" title="method slice::rchunks"><code>rchunks</code></a>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks" title="method slice::rchunks"><code>rchunks</code></a> for a variant of this iterator that also returns the remainder as a smaller +chunk, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact" title="method slice::chunks_exact"><code>chunks_exact</code></a> for the same iterator but starting at the beginning of the +slice.</p> +<h5 id="panics-26"><a class="doc-anchor" href="#panics-26">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-85"><a class="doc-anchor" href="#examples-85">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks_exact(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'e'</span>, <span class="string">'m'</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'o'</span>, <span class="string">'r'</span>]); +<span class="macro">assert!</span>(iter.next().is_none()); +<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'l'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rchunks_exact_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1743">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact_mut" class="fn">rchunks_exact_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RChunksExactMut.html" title="struct core::slice::iter::RChunksExactMut">RChunksExactMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end +of the slice.</p> +<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the +length of the slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be +retrieved from the <code>into_remainder</code> function of the iterator.</p> +<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the +resulting code better than in the case of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_mut" title="method slice::chunks_mut"><code>chunks_mut</code></a>.</p> +<p>See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.rchunks_mut" title="method slice::rchunks_mut"><code>rchunks_mut</code></a> for a variant of this iterator that also returns the remainder as a +smaller chunk, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.chunks_exact_mut" title="method slice::chunks_exact_mut"><code>chunks_exact_mut</code></a> for the same iterator but starting at the beginning +of the slice.</p> +<h5 id="panics-27"><a class="doc-anchor" href="#panics-27">§</a>Panics</h5> +<p>Panics if <code>chunk_size</code> is 0.</p> +<h5 id="examples-86"><a class="doc-anchor" href="#examples-86">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>; + +<span class="kw">for </span>chunk <span class="kw">in </span>v.rchunks_exact_mut(<span class="number">2</span>) { + <span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() { + <span class="kw-2">*</span>elem += count; + } + count += <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunk_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1782-1784">source</a></span><h4 class="code-header">pub fn <a href="#method.chunk_by" class="fn">chunk_by</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunkBy.html" title="struct core::slice::iter::ChunkBy">ChunkBy</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping runs +of elements using the predicate to separate them.</p> +<p>The predicate is called for every pair of consecutive elements, +meaning that it is called on <code>slice[0]</code> and <code>slice[1]</code>, +followed by <code>slice[1]</code> and <code>slice[2]</code>, and so on.</p> +<h5 id="examples-87"><a class="doc-anchor" href="#examples-87">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunk_by(|a, b| a == b); + +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +<p>This method can be used to extract the sorted subslices:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunk_by(|a, b| a <= b); + +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chunk_by_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.77.0">1.77.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1823-1825">source</a></span><h4 class="code-header">pub fn <a href="#method.chunk_by_mut" class="fn">chunk_by_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.ChunkByMut.html" title="struct core::slice::iter::ChunkByMut">ChunkByMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping mutable +runs of elements using the predicate to separate them.</p> +<p>The predicate is called for every pair of consecutive elements, +meaning that it is called on <code>slice[0]</code> and <code>slice[1]</code>, +followed by <code>slice[1]</code> and <code>slice[2]</code>, and so on.</p> +<h5 id="examples-88"><a class="doc-anchor" href="#examples-88">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunk_by_mut(|a, b| a == b); + +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">3</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +<p>This method can be used to extract the sorted subslices:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunk_by_mut(|a, b| a <= b); + +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">3</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..])); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1870">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at" class="fn">split_at</a>(&self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one slice into two at an index.</p> +<p>The first will contain all indices from <code>[0, mid)</code> (excluding +the index <code>mid</code> itself) and the second will contain all +indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p> +<h5 id="panics-28"><a class="doc-anchor" href="#panics-28">§</a>Panics</h5> +<p>Panics if <code>mid > len</code>. For a non-panicking alternative see +<a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_checked" title="method slice::split_at_checked"><code>split_at_checked</code></a>.</p> +<h5 id="examples-89"><a class="doc-anchor" href="#examples-89">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]; + +{ + <span class="kw">let </span>(left, right) = v.split_at(<span class="number">0</span>); + <span class="macro">assert_eq!</span>(left, []); + <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +} + +{ + <span class="kw">let </span>(left, right) = v.split_at(<span class="number">2</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +} + +{ + <span class="kw">let </span>(left, right) = v.split_at(<span class="number">6</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); + <span class="macro">assert_eq!</span>(right, []); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1904">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at_mut" class="fn">split_at_mut</a>(&mut self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one mutable slice into two at an index.</p> +<p>The first will contain all indices from <code>[0, mid)</code> (excluding +the index <code>mid</code> itself) and the second will contain all +indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p> +<h5 id="panics-29"><a class="doc-anchor" href="#panics-29">§</a>Panics</h5> +<p>Panics if <code>mid > len</code>. For a non-panicking alternative see +<a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut_checked" title="method slice::split_at_mut_checked"><code>split_at_mut_checked</code></a>.</p> +<h5 id="examples-90"><a class="doc-anchor" href="#examples-90">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]; +<span class="kw">let </span>(left, right) = v.split_at_mut(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]); +<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]); +left[<span class="number">1</span>] = <span class="number">2</span>; +right[<span class="number">1</span>] = <span class="number">4</span>; +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#1960">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_unchecked" class="fn">split_at_unchecked</a>(&self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into two at an index, without doing bounds checking.</p> +<p>The first will contain all indices from <code>[0, mid)</code> (excluding +the index <code>mid</code> itself) and the second will contain all +indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at" title="method slice::split_at"><code>split_at</code></a>.</p> +<h5 id="safety-6"><a class="doc-anchor" href="#safety-6">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting reference is not used. The caller has to ensure that +<code>0 <= mid <= self.len()</code>.</p> +<h5 id="examples-91"><a class="doc-anchor" href="#examples-91">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)] + +</span><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]; + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">0</span>); + <span class="macro">assert_eq!</span>(left, []); + <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +} + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">2</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); +} + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">6</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); + <span class="macro">assert_eq!</span>(right, []); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_mut_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2014">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_mut_unchecked" class="fn">split_at_mut_unchecked</a>( + &mut self, + mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a> +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into two at an index, without doing bounds checking.</p> +<p>The first will contain all indices from <code>[0, mid)</code> (excluding +the index <code>mid</code> itself) and the second will contain all +indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut" title="method slice::split_at_mut"><code>split_at_mut</code></a>.</p> +<h5 id="safety-7"><a class="doc-anchor" href="#safety-7">§</a>Safety</h5> +<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting reference is not used. The caller has to ensure that +<code>0 <= mid <= self.len()</code>.</p> +<h5 id="examples-92"><a class="doc-anchor" href="#examples-92">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]; +<span class="comment">// scoped to restrict the lifetime of the borrows +</span><span class="kw">unsafe </span>{ + <span class="kw">let </span>(left, right) = v.split_at_mut_unchecked(<span class="number">2</span>); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]); + left[<span class="number">1</span>] = <span class="number">2</span>; + right[<span class="number">1</span>] = <span class="number">4</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_checked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2071">source</a><h4 class="code-header">pub fn <a href="#method.split_at_checked" class="fn">split_at_checked</a>(&self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_at_checked</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into two at an index, returning <code>None</code> if the slice is +too short.</p> +<p>If <code>mid ≤ len</code> returns a pair of slices where the first will contain all +indices from <code>[0, mid)</code> (excluding the index <code>mid</code> itself) and the +second will contain all indices from <code>[mid, len)</code> (excluding the index +<code>len</code> itself).</p> +<p>Otherwise, if <code>mid > len</code>, returns <code>None</code>.</p> +<h5 id="examples-93"><a class="doc-anchor" href="#examples-93">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_at_checked)] + +</span><span class="kw">let </span>v = [<span class="number">1</span>, -<span class="number">2</span>, <span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>, -<span class="number">6</span>]; + +{ + <span class="kw">let </span>(left, right) = v.split_at_checked(<span class="number">0</span>).unwrap(); + <span class="macro">assert_eq!</span>(left, []); + <span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, -<span class="number">2</span>, <span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>, -<span class="number">6</span>]); +} + +{ + <span class="kw">let </span>(left, right) = v.split_at_checked(<span class="number">2</span>).unwrap(); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, -<span class="number">2</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>, -<span class="number">6</span>]); +} + +{ + <span class="kw">let </span>(left, right) = v.split_at_checked(<span class="number">6</span>).unwrap(); + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, -<span class="number">2</span>, <span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>, -<span class="number">6</span>]); + <span class="macro">assert_eq!</span>(right, []); +} + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.split_at_checked(<span class="number">7</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_at_mut_checked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2112">source</a><h4 class="code-header">pub fn <a href="#method.split_at_mut_checked" class="fn">split_at_mut_checked</a>( + &mut self, + mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_at_checked</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into two at an index, returning <code>None</code> if the +slice is too short.</p> +<p>If <code>mid ≤ len</code> returns a pair of slices where the first will contain all +indices from <code>[0, mid)</code> (excluding the index <code>mid</code> itself) and the +second will contain all indices from <code>[mid, len)</code> (excluding the index +<code>len</code> itself).</p> +<p>Otherwise, if <code>mid > len</code>, returns <code>None</code>.</p> +<h5 id="examples-94"><a class="doc-anchor" href="#examples-94">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_at_checked)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]; + +<span class="kw">if let </span><span class="prelude-val">Some</span>((left, right)) = v.split_at_mut_checked(<span class="number">2</span>) { + <span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]); + <span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]); + left[<span class="number">1</span>] = <span class="number">2</span>; + right[<span class="number">1</span>] = <span class="number">4</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.split_at_mut_checked(<span class="number">7</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2164-2166">source</a></span><h4 class="code-header">pub fn <a href="#method.split" class="fn">split</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.Split.html" title="struct core::slice::iter::Split">Split</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code>. The matched element is not contained in the subslices.</p> +<h5 id="examples-95"><a class="doc-anchor" href="#examples-95">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>If the first element is matched, an empty slice will be the first item +returned by the iterator. Similarly, if the last element in the slice +is matched, an empty slice will be the last item returned by the +iterator:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>If two matched elements are directly adjacent, an empty slice will be +present between them:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">6</span>, <span class="number">33</span>, <span class="number">20</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2186-2188">source</a></span><h4 class="code-header">pub fn <a href="#method.split_mut" class="fn">split_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitMut.html" title="struct core::slice::iter::SplitMut">SplitMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that +match <code>pred</code>. The matched element is not contained in the subslices.</p> +<h5 id="examples-96"><a class="doc-anchor" href="#examples-96">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.split_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + group[<span class="number">0</span>] = <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">1</span>, <span class="number">60</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_inclusive" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2222-2224">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive" class="fn">split_inclusive</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitInclusive.html" title="struct core::slice::iter::SplitInclusive">SplitInclusive</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code>. The matched element is contained in the end of the previous +subslice as a terminator.</p> +<h5 id="examples-97"><a class="doc-anchor" href="#examples-97">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +<p>If the last element of the slice is matched, +that element will be considered the terminator of the preceding slice. +That slice will be the last item returned by the iterator.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">3</span>, <span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">3</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]); +<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_inclusive_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2246-2248">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive_mut" class="fn">split_inclusive_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitInclusiveMut.html" title="struct core::slice::iter::SplitInclusiveMut">SplitInclusiveMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that +match <code>pred</code>. The matched element is contained in the previous +subslice as a terminator.</p> +<h5 id="examples-98"><a class="doc-anchor" href="#examples-98">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.split_inclusive_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + <span class="kw">let </span>terminator_idx = group.len()-<span class="number">1</span>; + group[terminator_idx] = <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">10</span>, <span class="number">40</span>, <span class="number">1</span>, <span class="number">20</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2282-2284">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit" class="fn">rsplit</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplit.html" title="struct core::slice::iter::RSplit">RSplit</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code>, starting at the end of the slice and working backwards. +The matched element is not contained in the subslices.</p> +<h5 id="examples-99"><a class="doc-anchor" href="#examples-99">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>, <span class="number">0</span>, <span class="number">44</span>, <span class="number">55</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rsplit(|num| <span class="kw-2">*</span>num == <span class="number">0</span>); + +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">44</span>, <span class="number">55</span>]); +<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>]); +<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div> +<p>As with <code>split()</code>, if the first or last element is matched, an empty +slice will be the first (or last) item returned by the iterator.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>it = v.rsplit(|n| <span class="kw-2">*</span>n % <span class="number">2 </span>== <span class="number">0</span>); +<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[]); +<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">5</span>]); +<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>]); +<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[]); +<span class="macro">assert_eq!</span>(it.next(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2308-2310">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit_mut" class="fn">rsplit_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitMut.html" title="struct core::slice::iter::RSplitMut">RSplitMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that +match <code>pred</code>, starting at the end of the slice and working +backwards. The matched element is not contained in the subslices.</p> +<h5 id="examples-100"><a class="doc-anchor" href="#examples-100">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">100</span>, <span class="number">400</span>, <span class="number">300</span>, <span class="number">200</span>, <span class="number">600</span>, <span class="number">500</span>]; + +<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">0</span>; +<span class="kw">for </span>group <span class="kw">in </span>v.rsplit_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + count += <span class="number">1</span>; + group[<span class="number">0</span>] = count; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">3</span>, <span class="number">400</span>, <span class="number">300</span>, <span class="number">2</span>, <span class="number">600</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.splitn" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2336-2338">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn" class="fn">splitn</a><F>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitN.html" title="struct core::slice::iter::SplitN">SplitN</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is +not contained in the subslices.</p> +<p>The last element returned, if any, will contain the remainder of the +slice.</p> +<h5 id="examples-101"><a class="doc-anchor" href="#examples-101">§</a>Examples</h5> +<p>Print the slice split once by numbers divisible by 3 (i.e., <code>[10, 40]</code>, +<code>[20, 60, 50]</code>):</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.splitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + <span class="macro">println!</span>(<span class="string">"{group:?}"</span>); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.splitn_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2362-2364">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn_mut" class="fn">splitn_mut</a><F>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.SplitNMut.html" title="struct core::slice::iter::SplitNMut">SplitNMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that match +<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is +not contained in the subslices.</p> +<p>The last element returned, if any, will contain the remainder of the +slice.</p> +<h5 id="examples-102"><a class="doc-anchor" href="#examples-102">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.splitn_mut(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + group[<span class="number">0</span>] = <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">1</span>, <span class="number">60</span>, <span class="number">50</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplitn" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2391-2393">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn" class="fn">rsplitn</a><F>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitN.html" title="struct core::slice::iter::RSplitN">RSplitN</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of +the slice and works backwards. The matched element is not contained in +the subslices.</p> +<p>The last element returned, if any, will contain the remainder of the +slice.</p> +<h5 id="examples-103"><a class="doc-anchor" href="#examples-103">§</a>Examples</h5> +<p>Print the slice split once, starting from the end, by numbers divisible +by 3 (i.e., <code>[50]</code>, <code>[10, 40, 30, 20]</code>):</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>v.rsplitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + <span class="macro">println!</span>(<span class="string">"{group:?}"</span>); +}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplitn_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2418-2420">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn_mut" class="fn">rsplitn_mut</a><F>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/iter/struct.RSplitNMut.html" title="struct core::slice::iter::RSplitNMut">RSplitNMut</a><'_, T, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match +<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of +the slice and works backwards. The matched element is not contained in +the subslices.</p> +<p>The last element returned, if any, will contain the remainder of the +slice.</p> +<h5 id="examples-104"><a class="doc-anchor" href="#examples-104">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>]; + +<span class="kw">for </span>group <span class="kw">in </span>s.rsplitn_mut(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) { + group[<span class="number">0</span>] = <span class="number">1</span>; +} +<span class="macro">assert_eq!</span>(s, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_once" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2445-2447">source</a><h4 class="code-header">pub fn <a href="#method.split_once" class="fn">split_once</a><F>(&self, pred: F) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_once</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice on the first element that matches the specified +predicate.</p> +<p>If any matching elements are present in the slice, returns the prefix +before the match and suffix after. The matching element itself is not +included. If no elements match, returns <code>None</code>.</p> +<h5 id="examples-105"><a class="doc-anchor" href="#examples-105">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_once)] +</span><span class="kw">let </span>s = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="macro">assert_eq!</span>(s.split_once(|<span class="kw-2">&</span>x| x == <span class="number">2</span>), <span class="prelude-val">Some</span>(( + <span class="kw-2">&</span>[<span class="number">1</span>][..], + <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>][..] +))); +<span class="macro">assert_eq!</span>(s.split_once(|<span class="kw-2">&</span>x| x == <span class="number">0</span>), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit_once" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2473-2475">source</a><h4 class="code-header">pub fn <a href="#method.rsplit_once" class="fn">rsplit_once</a><F>(&self, pred: F) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_once</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice on the last element that matches the specified +predicate.</p> +<p>If any matching elements are present in the slice, returns the prefix +before the match and suffix after. The matching element itself is not +included. If no elements match, returns <code>None</code>.</p> +<h5 id="examples-106"><a class="doc-anchor" href="#examples-106">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_once)] +</span><span class="kw">let </span>s = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>]; +<span class="macro">assert_eq!</span>(s.rsplit_once(|<span class="kw-2">&</span>x| x == <span class="number">2</span>), <span class="prelude-val">Some</span>(( + <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..], + <span class="kw-2">&</span>[<span class="number">4</span>][..] +))); +<span class="macro">assert_eq!</span>(s.rsplit_once(|<span class="kw-2">&</span>x| x == <span class="number">0</span>), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.contains" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2509-2511">source</a></span><h4 class="code-header">pub fn <a href="#method.contains" class="fn">contains</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice contains an element with the given value.</p> +<p>This operation is <em>O</em>(<em>n</em>).</p> +<p>Note that if you have a sorted slice, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search" title="method slice::binary_search"><code>binary_search</code></a> may be faster.</p> +<h5 id="examples-107"><a class="doc-anchor" href="#examples-107">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.contains(<span class="kw-2">&</span><span class="number">30</span>)); +<span class="macro">assert!</span>(!v.contains(<span class="kw-2">&</span><span class="number">50</span>));</code></pre></div> +<p>If you do not have a <code>&T</code>, but some other value that you can compare +with one (for example, <code>String</code> implements <code>PartialEq<str></code>), you can +use <code>iter().any</code>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [String::from(<span class="string">"hello"</span>), String::from(<span class="string">"world"</span>)]; <span class="comment">// slice of `String` +</span><span class="macro">assert!</span>(v.iter().any(|e| e == <span class="string">"hello"</span>)); <span class="comment">// search with `&str` +</span><span class="macro">assert!</span>(!v.iter().any(|e| e == <span class="string">"hi"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.starts_with" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2538-2540">source</a></span><h4 class="code-header">pub fn <a href="#method.starts_with" class="fn">starts_with</a>(&self, needle: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a prefix of the slice.</p> +<h5 id="examples-108"><a class="doc-anchor" href="#examples-108">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>])); +<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>])); +<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&</span>[<span class="number">50</span>])); +<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">50</span>]));</code></pre></div> +<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[])); +<span class="kw">let </span>v: <span class="kw-2">&</span>[u8] = <span class="kw-2">&</span>[]; +<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[]));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.ends_with" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2568-2570">source</a></span><h4 class="code-header">pub fn <a href="#method.ends_with" class="fn">ends_with</a>(&self, needle: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a suffix of the slice.</p> +<h5 id="examples-109"><a class="doc-anchor" href="#examples-109">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[<span class="number">30</span>])); +<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>])); +<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&</span>[<span class="number">50</span>])); +<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&</span>[<span class="number">50</span>, <span class="number">30</span>]));</code></pre></div> +<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[])); +<span class="kw">let </span>v: <span class="kw-2">&</span>[u8] = <span class="kw-2">&</span>[]; +<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[]));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.strip_prefix" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2598-2600">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_prefix" class="fn">strip_prefix</a><P>(&self, prefix: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&P</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>><div class="where">where + P: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a><Item = T> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns a subslice with the prefix removed.</p> +<p>If the slice starts with <code>prefix</code>, returns the subslice after the prefix, wrapped in <code>Some</code>. +If <code>prefix</code> is empty, simply returns the original slice.</p> +<p>If the slice does not start with <code>prefix</code>, returns <code>None</code>.</p> +<h5 id="examples-110"><a class="doc-anchor" href="#examples-110">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>][..])); +<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">30</span>][..])); +<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>); +<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">50</span>]), <span class="prelude-val">None</span>); + +<span class="kw">let </span>prefix : <span class="kw-2">&</span>str = <span class="string">"he"</span>; +<span class="macro">assert_eq!</span>(<span class="string">b"hello"</span>.strip_prefix(prefix.as_bytes()), + <span class="prelude-val">Some</span>(<span class="string">b"llo"</span>.as_ref()));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.strip_suffix" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2632-2634">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_suffix" class="fn">strip_suffix</a><P>(&self, suffix: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&P</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>><div class="where">where + P: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a><Item = T> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section></summary><div class="docblock"><p>Returns a subslice with the suffix removed.</p> +<p>If the slice ends with <code>suffix</code>, returns the subslice before the suffix, wrapped in <code>Some</code>. +If <code>suffix</code> is empty, simply returns the original slice.</p> +<p>If the slice does not end with <code>suffix</code>, returns <code>None</code>.</p> +<h5 id="examples-111"><a class="doc-anchor" href="#examples-111">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>][..])); +<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>][..])); +<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>); +<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">50</span>, <span class="number">30</span>]), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.binary_search" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2716-2718">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search" class="fn">binary_search</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Binary searches this slice for a given element. +If the slice is not sorted, the returned result is unspecified and +meaningless.</p> +<p>If the value is found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok" title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.</p> +<p>See also <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by" title="method slice::binary_search_by"><code>binary_search_by</code></a>, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by_key" title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>.</p> +<h5 id="examples-112"><a class="doc-anchor" href="#examples-112">§</a>Examples</h5> +<p>Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in <code>[1, 4]</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; + +<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">13</span>), <span class="prelude-val">Ok</span>(<span class="number">9</span>)); +<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">4</span>), <span class="prelude-val">Err</span>(<span class="number">7</span>)); +<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">100</span>), <span class="prelude-val">Err</span>(<span class="number">13</span>)); +<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&</span><span class="number">1</span>); +<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div> +<p>If you want to find that whole <em>range</em> of matching items, rather than +an arbitrary matching one, that can be done using <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; + +<span class="kw">let </span>low = s.partition_point(|x| x < <span class="kw-2">&</span><span class="number">1</span>); +<span class="macro">assert_eq!</span>(low, <span class="number">1</span>); +<span class="kw">let </span>high = s.partition_point(|x| x <= <span class="kw-2">&</span><span class="number">1</span>); +<span class="macro">assert_eq!</span>(high, <span class="number">5</span>); +<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&</span><span class="number">1</span>); +<span class="macro">assert!</span>((low..high).contains(<span class="kw-2">&</span>r.unwrap())); + +<span class="macro">assert!</span>(s[..low].iter().all(|<span class="kw-2">&</span>x| x < <span class="number">1</span>)); +<span class="macro">assert!</span>(s[low..high].iter().all(|<span class="kw-2">&</span>x| x == <span class="number">1</span>)); +<span class="macro">assert!</span>(s[high..].iter().all(|<span class="kw-2">&</span>x| x > <span class="number">1</span>)); + +<span class="comment">// For something not found, the "range" of equal items is empty +</span><span class="macro">assert_eq!</span>(s.partition_point(|x| x < <span class="kw-2">&</span><span class="number">11</span>), <span class="number">9</span>); +<span class="macro">assert_eq!</span>(s.partition_point(|x| x <= <span class="kw-2">&</span><span class="number">11</span>), <span class="number">9</span>); +<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">11</span>), <span class="prelude-val">Err</span>(<span class="number">9</span>));</code></pre></div> +<p>If you want to insert an item to a sorted vector, while maintaining +sort order, consider using <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; +<span class="kw">let </span>num = <span class="number">42</span>; +<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&</span>x| x < num); +<span class="comment">// The above is equivalent to `let idx = s.binary_search(&num).unwrap_or_else(|x| x);` +</span>s.insert(idx, num); +<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.binary_search_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2767-2769">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by" class="fn">binary_search_by</a><'a, F>(&'a self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class="docblock"><p>Binary searches this slice with a comparator function.</p> +<p>The comparator function should return an order code that indicates +whether its argument is <code>Less</code>, <code>Equal</code> or <code>Greater</code> the desired +target. +If the slice is not sorted or if the comparator function does not +implement an order consistent with the sort order of the underlying +slice, the returned result is unspecified and meaningless.</p> +<p>If the value is found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok" title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.</p> +<p>See also <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search" title="method slice::binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by_key" title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>.</p> +<h5 id="examples-113"><a class="doc-anchor" href="#examples-113">§</a>Examples</h5> +<p>Looks up a series of four elements. The first is found, with a +uniquely determined position; the second and third are not +found; the fourth could match any position in <code>[1, 4]</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; + +<span class="kw">let </span>seek = <span class="number">13</span>; +<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Ok</span>(<span class="number">9</span>)); +<span class="kw">let </span>seek = <span class="number">4</span>; +<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Err</span>(<span class="number">7</span>)); +<span class="kw">let </span>seek = <span class="number">100</span>; +<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Err</span>(<span class="number">13</span>)); +<span class="kw">let </span>seek = <span class="number">1</span>; +<span class="kw">let </span>r = s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)); +<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.binary_search_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.10.0">1.10.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2855-2858">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by_key" class="fn">binary_search_by_key</a><'a, B, F>( + &'a self, + b: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&B</a>, + f: F +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>) -> B, + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Binary searches this slice with a key extraction function.</p> +<p>Assumes that the slice is sorted by the key, for instance with +<a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_by_key" title="method slice::sort_by_key"><code>sort_by_key</code></a> using the same key extraction function. +If the slice is not sorted by the key, the returned result is +unspecified and meaningless.</p> +<p>If the value is found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok" title="variant core::result::Result::Ok"><code>Result::Ok</code></a> is returned, containing the +index of the matching element. If there are multiple matches, then any +one of the matches could be returned. The index is chosen +deterministically, but is subject to change in future versions of Rust. +If the value is not found then <a href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err" title="variant core::result::Result::Err"><code>Result::Err</code></a> is returned, containing +the index where a matching element could be inserted while maintaining +sorted order.</p> +<p>See also <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search" title="method slice::binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by" title="method slice::binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.partition_point" title="method slice::partition_point"><code>partition_point</code></a>.</p> +<h5 id="examples-114"><a class="doc-anchor" href="#examples-114">§</a>Examples</h5> +<p>Looks up a series of four elements in a slice of pairs sorted by +their second elements. The first is found, with a uniquely +determined position; the second and third are not found; the +fourth could match any position in <code>[1, 4]</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [(<span class="number">0</span>, <span class="number">0</span>), (<span class="number">2</span>, <span class="number">1</span>), (<span class="number">4</span>, <span class="number">1</span>), (<span class="number">5</span>, <span class="number">1</span>), (<span class="number">3</span>, <span class="number">1</span>), + (<span class="number">1</span>, <span class="number">2</span>), (<span class="number">2</span>, <span class="number">3</span>), (<span class="number">4</span>, <span class="number">5</span>), (<span class="number">5</span>, <span class="number">8</span>), (<span class="number">3</span>, <span class="number">13</span>), + (<span class="number">1</span>, <span class="number">21</span>), (<span class="number">2</span>, <span class="number">34</span>), (<span class="number">4</span>, <span class="number">55</span>)]; + +<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">13</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Ok</span>(<span class="number">9</span>)); +<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">4</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">7</span>)); +<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">100</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">13</span>)); +<span class="kw">let </span>r = s.binary_search_by_key(<span class="kw-2">&</span><span class="number">1</span>, |<span class="kw-2">&</span>(a, b)| b); +<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_unstable" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2891-2893">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable" class="fn">sort_unstable</a>(&mut self)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice, but might not preserve the order of equal elements.</p> +<p>This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p> +<h5 id="current-implementation"><a class="doc-anchor" href="#current-implementation">§</a>Current implementation</h5> +<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.</p> +<p>It is typically faster than stable sorting, except in a few special cases, e.g., when the +slice consists of several concatenated sorted sequences.</p> +<h5 id="examples-115"><a class="doc-anchor" href="#examples-115">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort_unstable(); +<span class="macro">assert!</span>(v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_unstable_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2946-2948">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable_by" class="fn">sort_unstable_by</a><F>(&mut self, compare: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a comparator function, but might not preserve the order of equal +elements.</p> +<p>This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p> +<p>The comparator function must define a total ordering for the elements in the slice. If +the ordering is not total, the order of the elements is unspecified. An order is a +total order if it is (for all <code>a</code>, <code>b</code> and <code>c</code>):</p> +<ul> +<li>total and antisymmetric: exactly one of <code>a < b</code>, <code>a == b</code> or <code>a > b</code> is true, and</li> +<li>transitive, <code>a < b</code> and <code>b < c</code> implies <code>a < c</code>. The same must hold for both <code>==</code> and <code>></code>.</li> +</ul> +<p>For example, while <a href="https://doc.rust-lang.org/1.77.0/std/primitive.f64.html" title="primitive f64"><code>f64</code></a> doesn’t implement <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use +<code>partial_cmp</code> as our sort function when we know the slice doesn’t contain a <code>NaN</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>floats = [<span class="number">5f64</span>, <span class="number">4.0</span>, <span class="number">1.0</span>, <span class="number">3.0</span>, <span class="number">2.0</span>]; +floats.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap()); +<span class="macro">assert_eq!</span>(floats, [<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>, <span class="number">4.0</span>, <span class="number">5.0</span>]);</code></pre></div> +<h5 id="current-implementation-1"><a class="doc-anchor" href="#current-implementation-1">§</a>Current implementation</h5> +<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.</p> +<p>It is typically faster than stable sorting, except in a few special cases, e.g., when the +slice consists of several concatenated sorted sequences.</p> +<h5 id="examples-116"><a class="doc-anchor" href="#examples-116">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>]; +v.sort_unstable_by(|a, b| a.cmp(b)); +<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]); + +<span class="comment">// reverse sorting +</span>v.sort_unstable_by(|a, b| b.cmp(a)); +<span class="macro">assert!</span>(v == [<span class="number">5</span>, <span class="number">4</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_unstable_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#2984-2987">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable_by_key" class="fn">sort_unstable_by_key</a><K, F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function, but might not preserve the order of equal +elements.</p> +<p>This sort is unstable (i.e., may reorder equal elements), in-place +(i.e., does not allocate), and <em>O</em>(<em>m</em> * <em>n</em> * log(<em>n</em>)) worst-case, where the key function is +<em>O</em>(<em>m</em>).</p> +<h5 id="current-implementation-2"><a class="doc-anchor" href="#current-implementation-2">§</a>Current implementation</h5> +<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.</p> +<p>Due to its key calling strategy, <a href="#method.sort_unstable_by_key"><code>sort_unstable_by_key</code></a> +is likely to be slower than <a href="#method.sort_by_cached_key"><code>sort_by_cached_key</code></a> in +cases where the key function is expensive.</p> +<h5 id="examples-117"><a class="doc-anchor" href="#examples-117">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort_unstable_by_key(|k| k.abs()); +<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.select_nth_unstable" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3034-3036">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable" class="fn">select_nth_unstable</a>( + &mut self, + index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a> +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Reorder the slice such that the element at <code>index</code> is at its final sorted position.</p> +<p>This reordering has the additional property that any value at position <code>i < index</code> will be +less than or equal to any value at a position <code>j > index</code>. Additionally, this reordering is +unstable (i.e. any number of equal elements may end up at position <code>index</code>), in-place +(i.e. does not allocate), and runs in <em>O</em>(<em>n</em>) time. +This function is also known as “kth element” in other libraries.</p> +<p>It returns a triplet of the following from the reordered slice: +the subslice prior to <code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; +accordingly, the values in those two subslices will respectively all be less-than-or-equal-to +and greater-than-or-equal-to the value of the element at <code>index</code>.</p> +<h5 id="current-implementation-3"><a class="doc-anchor" href="#current-implementation-3">§</a>Current implementation</h5> +<p>The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable" title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.</p> +<h5 id="panics-30"><a class="doc-anchor" href="#panics-30">§</a>Panics</h5> +<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p> +<h5 id="examples-118"><a class="doc-anchor" href="#examples-118">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +<span class="comment">// Find the median +</span>v.select_nth_unstable(<span class="number">2</span>); + +<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort +// about the specified index. +</span><span class="macro">assert!</span>(v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>] || + v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>] || + v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>] || + v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.select_nth_unstable_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3085-3091">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable_by" class="fn">select_nth_unstable_by</a><F>( + &mut self, + index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + compare: F +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class="docblock"><p>Reorder the slice with a comparator function such that the element at <code>index</code> is at its +final sorted position.</p> +<p>This reordering has the additional property that any value at position <code>i < index</code> will be +less than or equal to any value at a position <code>j > index</code> using the comparator function. +Additionally, this reordering is unstable (i.e. any number of equal elements may end up at +position <code>index</code>), in-place (i.e. does not allocate), and runs in <em>O</em>(<em>n</em>) time. +This function is also known as “kth element” in other libraries.</p> +<p>It returns a triplet of the following from +the slice reordered according to the provided comparator function: the subslice prior to +<code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; accordingly, the values in +those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to +the value of the element at <code>index</code>.</p> +<h5 id="current-implementation-4"><a class="doc-anchor" href="#current-implementation-4">§</a>Current implementation</h5> +<p>The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable" title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.</p> +<h5 id="panics-31"><a class="doc-anchor" href="#panics-31">§</a>Panics</h5> +<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p> +<h5 id="examples-119"><a class="doc-anchor" href="#examples-119">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +<span class="comment">// Find the median as if the slice were sorted in descending order. +</span>v.select_nth_unstable_by(<span class="number">2</span>, |a, b| b.cmp(a)); + +<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort +// about the specified index. +</span><span class="macro">assert!</span>(v == [<span class="number">2</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">5</span>, -<span class="number">3</span>] || + v == [<span class="number">2</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>] || + v == [<span class="number">4</span>, <span class="number">2</span>, <span class="number">1</span>, -<span class="number">5</span>, -<span class="number">3</span>] || + v == [<span class="number">4</span>, <span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.select_nth_unstable_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3140-3147">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable_by_key" class="fn">select_nth_unstable_by_key</a><K, F>( + &mut self, + index: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + f: F +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Reorder the slice with a key extraction function such that the element at <code>index</code> is at its +final sorted position.</p> +<p>This reordering has the additional property that any value at position <code>i < index</code> will be +less than or equal to any value at a position <code>j > index</code> using the key extraction function. +Additionally, this reordering is unstable (i.e. any number of equal elements may end up at +position <code>index</code>), in-place (i.e. does not allocate), and runs in <em>O</em>(<em>n</em>) time. +This function is also known as “kth element” in other libraries.</p> +<p>It returns a triplet of the following from +the slice reordered according to the provided key extraction function: the subslice prior to +<code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; accordingly, the values in +those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to +the value of the element at <code>index</code>.</p> +<h5 id="current-implementation-5"><a class="doc-anchor" href="#current-implementation-5">§</a>Current implementation</h5> +<p>The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also +the basis for <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable" title="method slice::sort_unstable"><code>sort_unstable</code></a>. The fallback algorithm is Median of Medians using Tukey’s Ninther for +pivot selection, which guarantees linear runtime for all inputs.</p> +<h5 id="panics-32"><a class="doc-anchor" href="#panics-32">§</a>Panics</h5> +<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p> +<h5 id="examples-120"><a class="doc-anchor" href="#examples-120">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +<span class="comment">// Return the median as if the array were sorted according to absolute value. +</span>v.select_nth_unstable_by_key(<span class="number">2</span>, |a| a.abs()); + +<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort +// about the specified index. +</span><span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>] || + v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, -<span class="number">5</span>, <span class="number">4</span>] || + v == [<span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>] || + v == [<span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.partition_dedup" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3174-3176">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup" class="fn">partition_dedup</a>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all consecutive repeated elements to the end of the slice according to the +<a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq"><code>PartialEq</code></a> trait implementation.</p> +<p>Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.</p> +<p>If the slice is sorted, the first returned slice contains no duplicates.</p> +<h5 id="examples-121"><a class="doc-anchor" href="#examples-121">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]; + +<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup(); + +<span class="macro">assert_eq!</span>(dedup, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]); +<span class="macro">assert_eq!</span>(duplicates, [<span class="number">2</span>, <span class="number">3</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.partition_dedup_by" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3208-3210">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup_by" class="fn">partition_dedup_by</a><F>(&mut self, same_bucket: F) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all but the first of consecutive elements to the end of the slice satisfying +a given equality relation.</p> +<p>Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.</p> +<p>The <code>same_bucket</code> function is passed references to two elements from the slice and +must determine if the elements compare equal. The elements are passed in opposite order +from their order in the slice, so if <code>same_bucket(a, b)</code> returns <code>true</code>, <code>a</code> is moved +at the end of the slice.</p> +<p>If the slice is sorted, the first returned slice contains no duplicates.</p> +<h5 id="examples-122"><a class="doc-anchor" href="#examples-122">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="string">"foo"</span>, <span class="string">"Foo"</span>, <span class="string">"BAZ"</span>, <span class="string">"Bar"</span>, <span class="string">"bar"</span>, <span class="string">"baz"</span>, <span class="string">"BAZ"</span>]; + +<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup_by(|a, b| a.eq_ignore_ascii_case(b)); + +<span class="macro">assert_eq!</span>(dedup, [<span class="string">"foo"</span>, <span class="string">"BAZ"</span>, <span class="string">"Bar"</span>, <span class="string">"baz"</span>]); +<span class="macro">assert_eq!</span>(duplicates, [<span class="string">"bar"</span>, <span class="string">"Foo"</span>, <span class="string">"BAZ"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.partition_dedup_by_key" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3334-3337">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup_by_key" class="fn">partition_dedup_by_key</a><K, F>(&mut self, key: F) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all but the first of consecutive elements to the end of the slice that resolve +to the same key.</p> +<p>Returns two slices. The first contains no consecutive repeated elements. +The second contains all the duplicates in no specified order.</p> +<p>If the slice is sorted, the first returned slice contains no duplicates.</p> +<h5 id="examples-123"><a class="doc-anchor" href="#examples-123">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">10</span>, <span class="number">20</span>, <span class="number">21</span>, <span class="number">30</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">11</span>, <span class="number">13</span>]; + +<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup_by_key(|i| <span class="kw-2">*</span>i / <span class="number">10</span>); + +<span class="macro">assert_eq!</span>(dedup, [<span class="number">10</span>, <span class="number">20</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">11</span>]); +<span class="macro">assert_eq!</span>(duplicates, [<span class="number">21</span>, <span class="number">30</span>, <span class="number">13</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rotate_left" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.26.0">1.26.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3373">source</a></span><h4 class="code-header">pub fn <a href="#method.rotate_left" class="fn">rotate_left</a>(&mut self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the slice in-place such that the first <code>mid</code> elements of the +slice move to the end while the last <code>self.len() - mid</code> elements move to +the front. After calling <code>rotate_left</code>, the element previously at index +<code>mid</code> will become the first element in the slice.</p> +<h5 id="panics-33"><a class="doc-anchor" href="#panics-33">§</a>Panics</h5> +<p>This function will panic if <code>mid</code> is greater than the length of the +slice. Note that <code>mid == self.len()</code> does <em>not</em> panic and is a no-op +rotation.</p> +<h5 id="complexity"><a class="doc-anchor" href="#complexity">§</a>Complexity</h5> +<p>Takes linear (in <code>self.len()</code>) time.</p> +<h5 id="examples-124"><a class="doc-anchor" href="#examples-124">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>]; +a.rotate_left(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(a, [<span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>, <span class="string">'a'</span>, <span class="string">'b'</span>]);</code></pre></div> +<p>Rotating a subslice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>]; +a[<span class="number">1</span>..<span class="number">5</span>].rotate_left(<span class="number">1</span>); +<span class="macro">assert_eq!</span>(a, [<span class="string">'a'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'b'</span>, <span class="string">'f'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rotate_right" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.26.0">1.26.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3416">source</a></span><h4 class="code-header">pub fn <a href="#method.rotate_right" class="fn">rotate_right</a>(&mut self, k: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the slice in-place such that the first <code>self.len() - k</code> +elements of the slice move to the end while the last <code>k</code> elements move +to the front. After calling <code>rotate_right</code>, the element previously at +index <code>self.len() - k</code> will become the first element in the slice.</p> +<h5 id="panics-34"><a class="doc-anchor" href="#panics-34">§</a>Panics</h5> +<p>This function will panic if <code>k</code> is greater than the length of the +slice. Note that <code>k == self.len()</code> does <em>not</em> panic and is a no-op +rotation.</p> +<h5 id="complexity-1"><a class="doc-anchor" href="#complexity-1">§</a>Complexity</h5> +<p>Takes linear (in <code>self.len()</code>) time.</p> +<h5 id="examples-125"><a class="doc-anchor" href="#examples-125">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>]; +a.rotate_right(<span class="number">2</span>); +<span class="macro">assert_eq!</span>(a, [<span class="string">'e'</span>, <span class="string">'f'</span>, <span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div> +<p>Rotating a subslice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>]; +a[<span class="number">1</span>..<span class="number">5</span>].rotate_right(<span class="number">1</span>); +<span class="macro">assert_eq!</span>(a, [<span class="string">'a'</span>, <span class="string">'e'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'f'</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.fill" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3439-3441">source</a></span><h4 class="code-header">pub fn <a href="#method.fill" class="fn">fill</a>(&mut self, value: T)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Fills <code>self</code> with elements by cloning <code>value</code>.</p> +<h5 id="examples-126"><a class="doc-anchor" href="#examples-126">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">10</span>]; +buf.fill(<span class="number">1</span>); +<span class="macro">assert_eq!</span>(buf, <span class="macro">vec!</span>[<span class="number">1</span>; <span class="number">10</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.fill_with" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3463-3465">source</a></span><h4 class="code-header">pub fn <a href="#method.fill_with" class="fn">fill_with</a><F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> T,</div></h4></section></summary><div class="docblock"><p>Fills <code>self</code> with elements returned by calling a closure repeatedly.</p> +<p>This method uses a closure to create new values. If you’d rather +<a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone"><code>Clone</code></a> a given value, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.fill" title="method slice::fill"><code>fill</code></a>. If you want to use the <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default"><code>Default</code></a> +trait to generate values, you can pass <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" title="associated function core::default::Default::default"><code>Default::default</code></a> as the +argument.</p> +<h5 id="examples-127"><a class="doc-anchor" href="#examples-127">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[<span class="number">1</span>; <span class="number">10</span>]; +buf.fill_with(Default::default); +<span class="macro">assert_eq!</span>(buf, <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">10</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3526-3528">source</a></span><h4 class="code-header">pub fn <a href="#method.clone_from_slice" class="fn">clone_from_slice</a>(&mut self, src: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Copies the elements from <code>src</code> into <code>self</code>.</p> +<p>The length of <code>src</code> must be the same as <code>self</code>.</p> +<h5 id="panics-35"><a class="doc-anchor" href="#panics-35">§</a>Panics</h5> +<p>This function will panic if the two slices have different lengths.</p> +<h5 id="examples-128"><a class="doc-anchor" href="#examples-128">§</a>Examples</h5> +<p>Cloning two elements from a slice into another:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>src = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>, <span class="number">0</span>]; + +<span class="comment">// Because the slices have to be the same length, +// we slice the source slice from four elements +// to two. It will panic if we don't do this. +</span>dst.clone_from_slice(<span class="kw-2">&</span>src[<span class="number">2</span>..]); + +<span class="macro">assert_eq!</span>(src, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>(dst, [<span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +<p>Rust enforces that there can only be one mutable reference with no +immutable references to a particular piece of data in a particular +scope. Because of this, attempting to use <code>clone_from_slice</code> on a +single slice will result in a compile failure:</p> + +<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +slice[..<span class="number">2</span>].clone_from_slice(<span class="kw-2">&</span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div> +<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut" title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct +sub-slices from a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +{ + <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>); + left.clone_from_slice(<span class="kw-2">&</span>right[<span class="number">1</span>..]); +} + +<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_from_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.9.0">1.9.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3590-3592">source</a></span><h4 class="code-header">pub fn <a href="#method.copy_from_slice" class="fn">copy_from_slice</a>(&mut self, src: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><div class="docblock"><p>Copies all elements from <code>src</code> into <code>self</code>, using a memcpy.</p> +<p>The length of <code>src</code> must be the same as <code>self</code>.</p> +<p>If <code>T</code> does not implement <code>Copy</code>, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.clone_from_slice" title="method slice::clone_from_slice"><code>clone_from_slice</code></a>.</p> +<h5 id="panics-36"><a class="doc-anchor" href="#panics-36">§</a>Panics</h5> +<p>This function will panic if the two slices have different lengths.</p> +<h5 id="examples-129"><a class="doc-anchor" href="#examples-129">§</a>Examples</h5> +<p>Copying two elements from a slice into another:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>src = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>, <span class="number">0</span>]; + +<span class="comment">// Because the slices have to be the same length, +// we slice the source slice from four elements +// to two. It will panic if we don't do this. +</span>dst.copy_from_slice(<span class="kw-2">&</span>src[<span class="number">2</span>..]); + +<span class="macro">assert_eq!</span>(src, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>(dst, [<span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +<p>Rust enforces that there can only be one mutable reference with no +immutable references to a particular piece of data in a particular +scope. Because of this, attempting to use <code>copy_from_slice</code> on a +single slice will result in a compile failure:</p> + +<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +slice[..<span class="number">2</span>].copy_from_slice(<span class="kw-2">&</span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div> +<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut" title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct +sub-slices from a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +{ + <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>); + left.copy_from_slice(<span class="kw-2">&</span>right[<span class="number">1</span>..]); +} + +<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_within" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.37.0">1.37.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3644-3646">source</a></span><h4 class="code-header">pub fn <a href="#method.copy_within" class="fn">copy_within</a><R>(&mut self, src: R, dest: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)<div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><div class="docblock"><p>Copies elements from one part of the slice to another part of itself, +using a memmove.</p> +<p><code>src</code> is the range within <code>self</code> to copy from. <code>dest</code> is the starting +index of the range within <code>self</code> to copy to, which will have the same +length as <code>src</code>. The two ranges may overlap. The ends of the two ranges +must be less than or equal to <code>self.len()</code>.</p> +<h5 id="panics-37"><a class="doc-anchor" href="#panics-37">§</a>Panics</h5> +<p>This function will panic if either range exceeds the end of the slice, +or if the end of <code>src</code> is before the start.</p> +<h5 id="examples-130"><a class="doc-anchor" href="#examples-130">§</a>Examples</h5> +<p>Copying four bytes within a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>bytes = <span class="kw-2">*</span><span class="string">b"Hello, World!"</span>; + +bytes.copy_within(<span class="number">1</span>..<span class="number">5</span>, <span class="number">8</span>); + +<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>bytes, <span class="string">b"Hello, Wello!"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.swap_with_slice" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3711">source</a></span><h4 class="code-header">pub fn <a href="#method.swap_with_slice" class="fn">swap_with_slice</a>(&mut self, other: &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Swaps all elements in <code>self</code> with those in <code>other</code>.</p> +<p>The length of <code>other</code> must be the same as <code>self</code>.</p> +<h5 id="panics-38"><a class="doc-anchor" href="#panics-38">§</a>Panics</h5> +<p>This function will panic if the two slices have different lengths.</p> +<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5> +<p>Swapping two elements across slices:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice1 = [<span class="number">0</span>, <span class="number">0</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>slice2 = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]; + +slice1.swap_with_slice(<span class="kw-2">&mut </span>slice2[<span class="number">2</span>..]); + +<span class="macro">assert_eq!</span>(slice1, [<span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>(slice2, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>]);</code></pre></div> +<p>Rust enforces that there can only be one mutable reference to a +particular piece of data in a particular scope. Because of this, +attempting to use <code>swap_with_slice</code> on a single slice will result in +a compile failure:</p> + +<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; +slice[..<span class="number">2</span>].swap_with_slice(<span class="kw-2">&mut </span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div> +<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.split_at_mut" title="method slice::split_at_mut"><code>split_at_mut</code></a> to create two distinct +mutable sub-slices from a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]; + +{ + <span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>); + left.swap_with_slice(<span class="kw-2">&mut </span>right[<span class="number">1</span>..]); +} + +<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.align_to" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3791">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to" class="fn">align_to</a><U>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[U]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the slice to a slice of another type, ensuring alignment of the types is +maintained.</p> +<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle +slice of a new type, and the suffix slice. How exactly the slice is split up is not +specified; the middle part may be smaller than necessary. However, if this fails to return a +maximal middle part, that is because code is running in a context where performance does not +matter, such as a sanitizer attempting to find alignment bugs. Regular code running +in a default (debug or release) execution <em>will</em> return a maximal middle part.</p> +<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are +zero-sized and will return the original slice without splitting anything.</p> +<h5 id="safety-8"><a class="doc-anchor" href="#safety-8">§</a>Safety</h5> +<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned +middle slice, so all the usual caveats pertaining to <code>transmute::<T, U></code> also apply here.</p> +<h5 id="examples-131"><a class="doc-anchor" href="#examples-131">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{ + <span class="kw">let </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>]; + <span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to::<u16>(); + <span class="comment">// less_efficient_algorithm_for_bytes(prefix); + // more_efficient_algorithm_for_aligned_shorts(shorts); + // less_efficient_algorithm_for_bytes(suffix); +</span>}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.align_to_mut" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3859">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to_mut" class="fn">align_to_mut</a><U>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[U]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the mutable slice to a mutable slice of another type, ensuring alignment of the +types is maintained.</p> +<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle +slice of a new type, and the suffix slice. How exactly the slice is split up is not +specified; the middle part may be smaller than necessary. However, if this fails to return a +maximal middle part, that is because code is running in a context where performance does not +matter, such as a sanitizer attempting to find alignment bugs. Regular code running +in a default (debug or release) execution <em>will</em> return a maximal middle part.</p> +<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are +zero-sized and will return the original slice without splitting anything.</p> +<h5 id="safety-9"><a class="doc-anchor" href="#safety-9">§</a>Safety</h5> +<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned +middle slice, so all the usual caveats pertaining to <code>transmute::<T, U></code> also apply here.</p> +<h5 id="examples-132"><a class="doc-anchor" href="#examples-132">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{ + <span class="kw">let </span><span class="kw-2">mut </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>]; + <span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to_mut::<u16>(); + <span class="comment">// less_efficient_algorithm_for_bytes(prefix); + // more_efficient_algorithm_for_aligned_shorts(shorts); + // less_efficient_algorithm_for_bytes(suffix); +</span>}</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_simd" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#3959-3963">source</a><h4 class="code-header">pub fn <a href="#method.as_simd" class="fn">as_simd</a><const LANES: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &[<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>], &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; LANES]</a>>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>, + <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a><LANES>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.</p> +<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.align_to" title="method slice::align_to"><code>slice::align_to</code></a>, so has the same weak +postconditions as that method. You’re only assured that +<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p> +<p>Notably, all of the following are possible:</p> +<ul> +<li><code>prefix.len() >= LANES</code>.</li> +<li><code>middle.is_empty()</code> despite <code>self.len() >= 3 * LANES</code>.</li> +<li><code>suffix.len() >= LANES</code>.</li> +</ul> +<p>That said, this is a safe method, so if you’re only writing safe code, +then this can at most cause incorrect logic, not unsoundness.</p> +<h5 id="panics-39"><a class="doc-anchor" href="#panics-39">§</a>Panics</h5> +<p>This will panic if the size of the SIMD type is different from +<code>LANES</code> times that of the scalar.</p> +<p>At the time of writing, the trait restrictions on <code>Simd<T, LANES></code> keeps +that from ever happening, as only power-of-two numbers of lanes are +supported. It’s possible that, in the future, those restrictions might +be lifted in a way that would make it possible to see panics from this +method for something like <code>LANES == 3</code>.</p> +<h5 id="examples-133"><a class="doc-anchor" href="#examples-133">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(portable_simd)] +</span><span class="kw">use </span>core::simd::prelude::<span class="kw-2">*</span>; + +<span class="kw">let </span>short = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">let </span>(prefix, middle, suffix) = short.as_simd::<<span class="number">4</span>>(); +<span class="macro">assert_eq!</span>(middle, []); <span class="comment">// Not enough elements for anything in the middle + +// They might be split in any possible way between prefix and suffix +</span><span class="kw">let </span>it = prefix.iter().chain(suffix).copied(); +<span class="macro">assert_eq!</span>(it.collect::<Vec<<span class="kw">_</span>>>(), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); + +<span class="kw">fn </span>basic_simd_sum(x: <span class="kw-2">&</span>[f32]) -> f32 { + <span class="kw">use </span>std::ops::Add; + <span class="kw">let </span>(prefix, middle, suffix) = x.as_simd(); + <span class="kw">let </span>sums = f32x4::from_array([ + prefix.iter().copied().sum(), + <span class="number">0.0</span>, + <span class="number">0.0</span>, + suffix.iter().copied().sum(), + ]); + <span class="kw">let </span>sums = middle.iter().copied().fold(sums, f32x4::add); + sums.reduce_sum() +} + +<span class="kw">let </span>numbers: Vec<f32> = (<span class="number">1</span>..<span class="number">101</span>).map(|x| x <span class="kw">as _</span>).collect(); +<span class="macro">assert_eq!</span>(basic_simd_sum(<span class="kw-2">&</span>numbers[<span class="number">1</span>..<span class="number">99</span>]), <span class="number">4949.0</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_simd_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4004-4008">source</a><h4 class="code-header">pub fn <a href="#method.as_simd_mut" class="fn">as_simd_mut</a><const LANES: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self +) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, &mut [<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>], &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>)<div class="where">where + <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">[T; LANES]</a>>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>, + <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a><LANES>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a mutable slice into a mutable prefix, a middle of aligned SIMD types, +and a mutable suffix.</p> +<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.align_to_mut" title="method slice::align_to_mut"><code>slice::align_to_mut</code></a>, so has the same weak +postconditions as that method. You’re only assured that +<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p> +<p>Notably, all of the following are possible:</p> +<ul> +<li><code>prefix.len() >= LANES</code>.</li> +<li><code>middle.is_empty()</code> despite <code>self.len() >= 3 * LANES</code>.</li> +<li><code>suffix.len() >= LANES</code>.</li> +</ul> +<p>That said, this is a safe method, so if you’re only writing safe code, +then this can at most cause incorrect logic, not unsoundness.</p> +<p>This is the mutable version of <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.as_simd" title="method slice::as_simd"><code>slice::as_simd</code></a>; see that for examples.</p> +<h5 id="panics-40"><a class="doc-anchor" href="#panics-40">§</a>Panics</h5> +<p>This will panic if the size of the SIMD type is different from +<code>LANES</code> times that of the scalar.</p> +<p>At the time of writing, the trait restrictions on <code>Simd<T, LANES></code> keeps +that from ever happening, as only power-of-two numbers of lanes are +supported. It’s possible that, in the future, those restrictions might +be lifted in a way that would make it possible to see panics from this +method for something like <code>LANES == 3</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4044-4046">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted" class="fn">is_sorted</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted.</p> +<p>That is, for each element <code>a</code> and its following element <code>b</code>, <code>a <= b</code> must hold. If the +slice yields exactly zero or one element, <code>true</code> is returned.</p> +<p>Note that if <code>Self::Item</code> is only <code>PartialOrd</code>, but not <code>Ord</code>, the above definition +implies that this function returns <code>false</code> if any two consecutive items are not +comparable.</p> +<h5 id="examples-134"><a class="doc-anchor" href="#examples-134">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)] +</span><span class="kw">let </span>empty: [i32; <span class="number">0</span>] = []; + +<span class="macro">assert!</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted()); +<span class="macro">assert!</span>(![<span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>].is_sorted()); +<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted()); +<span class="macro">assert!</span>(empty.is_sorted()); +<span class="macro">assert!</span>(![<span class="number">0.0</span>, <span class="number">1.0</span>, f32::NAN].is_sorted());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted_by" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4073-4075">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by" class="fn">is_sorted_by</a><'a, F>(&'a self, compare: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given comparator function.</p> +<p>Instead of using <code>PartialOrd::partial_cmp</code>, this function uses the given <code>compare</code> +function to determine whether two elements are to be considered in sorted order.</p> +<h5 id="examples-135"><a class="doc-anchor" href="#examples-135">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)] + +</span><span class="macro">assert!</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted_by(|a, b| a <= b)); +<span class="macro">assert!</span>(![<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted_by(|a, b| a < b)); + +<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted_by(|a, b| <span class="bool-val">true</span>)); +<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted_by(|a, b| <span class="bool-val">false</span>)); + +<span class="kw">let </span>empty: [i32; <span class="number">0</span>] = []; +<span class="macro">assert!</span>(empty.is_sorted_by(|a, b| <span class="bool-val">false</span>)); +<span class="macro">assert!</span>(empty.is_sorted_by(|a, b| <span class="bool-val">true</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_sorted_by_key" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4099-4102">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by_key" class="fn">is_sorted_by_key</a><'a, F, K>(&'a self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given key extraction function.</p> +<p>Instead of comparing the slice’s elements directly, this function compares the keys of the +elements, as determined by <code>f</code>. Apart from that, it’s equivalent to <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.is_sorted" title="method slice::is_sorted"><code>is_sorted</code></a>; see its +documentation for more information.</p> +<h5 id="examples-136"><a class="doc-anchor" href="#examples-136">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)] + +</span><span class="macro">assert!</span>([<span class="string">"c"</span>, <span class="string">"bb"</span>, <span class="string">"aaa"</span>].is_sorted_by_key(|s| s.len())); +<span class="macro">assert!</span>(![-<span class="number">2i32</span>, -<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>].is_sorted_by_key(|n| n.abs()));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.partition_point" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.52.0">1.52.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4158-4160">source</a></span><h4 class="code-header">pub fn <a href="#method.partition_point" class="fn">partition_point</a><P>(&self, pred: P) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a><div class="where">where + P: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns the index of the partition point according to the given predicate +(the index of the first element of the second partition).</p> +<p>The slice is assumed to be partitioned according to the given predicate. +This means that all elements for which the predicate returns true are at the start of the slice +and all elements for which the predicate returns false are at the end. +For example, <code>[7, 15, 3, 5, 4, 12, 6]</code> is partitioned under the predicate <code>x % 2 != 0</code> +(all odd numbers are at the start, all even at the end).</p> +<p>If this slice is not partitioned, the returned result is unspecified and meaningless, +as this method performs a kind of binary search.</p> +<p>See also <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search" title="method slice::binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by" title="method slice::binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.binary_search_by_key" title="method slice::binary_search_by_key"><code>binary_search_by_key</code></a>.</p> +<h5 id="examples-137"><a class="doc-anchor" href="#examples-137">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>]; +<span class="kw">let </span>i = v.partition_point(|<span class="kw-2">&</span>x| x < <span class="number">5</span>); + +<span class="macro">assert_eq!</span>(i, <span class="number">4</span>); +<span class="macro">assert!</span>(v[..i].iter().all(|<span class="kw-2">&</span>x| x < <span class="number">5</span>)); +<span class="macro">assert!</span>(v[i..].iter().all(|<span class="kw-2">&</span>x| !(x < <span class="number">5</span>)));</code></pre></div> +<p>If all elements of the slice match the predicate, including if the slice +is empty, then the length of the slice will be returned:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">2</span>, <span class="number">4</span>, <span class="number">8</span>]; +<span class="macro">assert_eq!</span>(a.partition_point(|x| x < <span class="kw-2">&</span><span class="number">100</span>), a.len()); +<span class="kw">let </span>a: [i32; <span class="number">0</span>] = []; +<span class="macro">assert_eq!</span>(a.partition_point(|x| x < <span class="kw-2">&</span><span class="number">100</span>), <span class="number">0</span>);</code></pre></div> +<p>If you want to insert an item to a sorted vector, while maintaining +sort order:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>]; +<span class="kw">let </span>num = <span class="number">42</span>; +<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&</span>x| x < num); +s.insert(idx, num); +<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4216">source</a><h4 class="code-header">pub fn <a href="#method.take" class="fn">take</a><R, 'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, range: R) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>><div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.OneSidedRange.html" title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the subslice corresponding to the given range +and returns a reference to it.</p> +<p>Returns <code>None</code> and does not modify the slice if the given +range is out of bounds.</p> +<p>Note that this method only accepts one-sided ranges such as +<code>2..</code> or <code>..6</code>, but not <code>2..6</code>.</p> +<h5 id="examples-138"><a class="doc-anchor" href="#examples-138">§</a>Examples</h5> +<p>Taking the first three elements of a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>first_three = slice.take(..<span class="number">3</span>).unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'d'</span>]); +<span class="macro">assert_eq!</span>(first_three, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]);</code></pre></div> +<p>Taking the last two elements of a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>tail = slice.take(<span class="number">2</span>..).unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]); +<span class="macro">assert_eq!</span>(tail, <span class="kw-2">&</span>[<span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div> +<p>Getting <code>None</code> when <code>range</code> is out of bounds:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(<span class="number">5</span>..)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(..<span class="number">5</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(..=<span class="number">4</span>)); +<span class="kw">let </span>expected: <span class="kw-2">&</span>[char] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(expected), slice.take(..<span class="number">4</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4285-4288">source</a><h4 class="code-header">pub fn <a href="#method.take_mut" class="fn">take_mut</a><R, 'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>, range: R) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>><div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.OneSidedRange.html" title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the subslice corresponding to the given range +and returns a mutable reference to it.</p> +<p>Returns <code>None</code> and does not modify the slice if the given +range is out of bounds.</p> +<p>Note that this method only accepts one-sided ranges such as +<code>2..</code> or <code>..6</code>, but not <code>2..6</code>.</p> +<h5 id="examples-139"><a class="doc-anchor" href="#examples-139">§</a>Examples</h5> +<p>Taking the first three elements of a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>first_three = slice.take_mut(..<span class="number">3</span>).unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&mut </span>[<span class="string">'d'</span>]); +<span class="macro">assert_eq!</span>(first_three, <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]);</code></pre></div> +<p>Taking the last two elements of a slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="kw">let </span><span class="kw-2">mut </span>tail = slice.take_mut(<span class="number">2</span>..).unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>]); +<span class="macro">assert_eq!</span>(tail, <span class="kw-2">&mut </span>[<span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div> +<p>Getting <code>None</code> when <code>range</code> is out of bounds:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(<span class="number">5</span>..)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(..<span class="number">5</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(..=<span class="number">4</span>)); +<span class="kw">let </span>expected: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(expected), slice.take_mut(..<span class="number">4</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_first" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4324">source</a><h4 class="code-header">pub fn <a href="#method.take_first" class="fn">take_first</a><'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the first element of the slice and returns a reference +to it.</p> +<p>Returns <code>None</code> if the slice is empty.</p> +<h5 id="examples-140"><a class="doc-anchor" href="#examples-140">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>first = slice.take_first().unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'b'</span>, <span class="string">'c'</span>]); +<span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="string">'a'</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_first_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4349">source</a><h4 class="code-header">pub fn <a href="#method.take_first_mut" class="fn">take_first_mut</a><'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a mut T</a>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the first element of the slice and returns a mutable +reference to it.</p> +<p>Returns <code>None</code> if the slice is empty.</p> +<h5 id="examples-141"><a class="doc-anchor" href="#examples-141">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>first = slice.take_first_mut().unwrap(); +<span class="kw-2">*</span>first = <span class="string">'d'</span>; + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'b'</span>, <span class="string">'c'</span>]); +<span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="string">'d'</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_last" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4373">source</a><h4 class="code-header">pub fn <a href="#method.take_last" class="fn">take_last</a><'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a T</a>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the last element of the slice and returns a reference +to it.</p> +<p>Returns <code>None</code> if the slice is empty.</p> +<h5 id="examples-142"><a class="doc-anchor" href="#examples-142">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>last = slice.take_last().unwrap(); + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]); +<span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="string">'c'</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.take_last_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4398">source</a><h4 class="code-header">pub fn <a href="#method.take_last_mut" class="fn">take_last_mut</a><'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'a mut T</a>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the last element of the slice and returns a mutable +reference to it.</p> +<p>Returns <code>None</code> if the slice is empty.</p> +<h5 id="examples-143"><a class="doc-anchor" href="#examples-143">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)] + +</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]; +<span class="kw">let </span>last = slice.take_last_mut().unwrap(); +<span class="kw-2">*</span>last = <span class="string">'d'</span>; + +<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]); +<span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="string">'d'</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_many_unchecked_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4432-4435">source</a><h4 class="code-header">pub unsafe fn <a href="#method.get_many_unchecked_mut" class="fn">get_many_unchecked_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self, + indices: [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>] +) -> [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>get_many_mut</code>)</span></div></span></summary><div class="docblock"><p>Returns mutable references to many indices at once, without doing any checks.</p> +<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.get_many_mut" title="method slice::get_many_mut"><code>get_many_mut</code></a>.</p> +<h5 id="safety-10"><a class="doc-anchor" href="#safety-10">§</a>Safety</h5> +<p>Calling this method with overlapping or out-of-bounds indices is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em> +even if the resulting references are not used.</p> +<h5 id="examples-144"><a class="doc-anchor" href="#examples-144">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(get_many_mut)] + +</span><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]; + +<span class="kw">unsafe </span>{ + <span class="kw">let </span>[a, b] = x.get_many_unchecked_mut([<span class="number">0</span>, <span class="number">2</span>]); + <span class="kw-2">*</span>a <span class="kw-2">*</span>= <span class="number">10</span>; + <span class="kw-2">*</span>b <span class="kw-2">*</span>= <span class="number">100</span>; +} +<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">2</span>, <span class="number">400</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.get_many_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4474-4477">source</a><h4 class="code-header">pub fn <a href="#method.get_many_mut" class="fn">get_many_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>( + &mut self, + indices: [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>] +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>], <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/struct.GetManyMutError.html" title="struct core::slice::GetManyMutError">GetManyMutError</a><N>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>get_many_mut</code>)</span></div></span></summary><div class="docblock"><p>Returns mutable references to many indices at once.</p> +<p>Returns an error if any index is out-of-bounds, or if the same index was +passed more than once.</p> +<h5 id="examples-145"><a class="doc-anchor" href="#examples-145">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(get_many_mut)] + +</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]; +<span class="kw">if let </span><span class="prelude-val">Ok</span>([a, b]) = v.get_many_mut([<span class="number">0</span>, <span class="number">2</span>]) { + <span class="kw-2">*</span>a = <span class="number">413</span>; + <span class="kw-2">*</span>b = <span class="number">612</span>; +} +<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">413</span>, <span class="number">2</span>, <span class="number">612</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_floats" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4592">source</a><h4 class="code-header">pub fn <a href="#method.sort_floats" class="fn">sort_floats</a>(&mut self)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><div class="docblock"><p>Sorts the slice of floats.</p> +<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses +the ordering defined by <a href="https://doc.rust-lang.org/1.77.0/std/primitive.f32.html#method.total_cmp" title="method f32::total_cmp"><code>f32::total_cmp</code></a>.</p> +<h5 id="current-implementation-6"><a class="doc-anchor" href="#current-implementation-6">§</a>Current implementation</h5> +<p>This uses the same sorting algorithm as <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable_by" title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p> +<h5 id="examples-146"><a class="doc-anchor" href="#examples-146">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(sort_floats)] +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">2.6</span>, -<span class="number">5e-8</span>, f32::NAN, <span class="number">8.29</span>, f32::INFINITY, -<span class="number">1.0</span>, <span class="number">0.0</span>, -f32::INFINITY, -<span class="number">0.0</span>]; + +v.sort_floats(); +<span class="kw">let </span>sorted = [-f32::INFINITY, -<span class="number">1.0</span>, -<span class="number">5e-8</span>, -<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">2.6</span>, <span class="number">8.29</span>, f32::INFINITY, f32::NAN]; +<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>v[..<span class="number">8</span>], <span class="kw-2">&</span>sorted[..<span class="number">8</span>]); +<span class="macro">assert!</span>(v[<span class="number">8</span>].is_nan());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_ascii" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#17">source</a></span><h4 class="code-header">pub fn <a href="#method.is_ascii" class="fn">is_ascii</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks if all bytes in this slice are within the ASCII range.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ascii" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#26">source</a><h4 class="code-header">pub fn <a href="#method.as_ascii" class="fn">as_ascii</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html" title="enum core::ascii::ascii_char::AsciiChar">AsciiChar</a>]></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><div class="docblock"><p>If this slice <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.is_ascii" title="method slice::is_ascii"><code>is_ascii</code></a>, returns it as a slice of +<a href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html" title="enum core::ascii::ascii_char::AsciiChar">ASCII characters</a>, otherwise returns <code>None</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_ascii_unchecked" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#44">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_ascii_unchecked" class="fn">as_ascii_unchecked</a>(&self) -> &[<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/ascii/ascii_char/enum.AsciiChar.html" title="enum core::ascii::ascii_char::AsciiChar">AsciiChar</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><div class="docblock"><p>Converts this slice of bytes into a slice of ASCII characters, +without checking whether they’re valid.</p> +<h5 id="safety-11"><a class="doc-anchor" href="#safety-11">§</a>Safety</h5> +<p>Every byte in the slice must be in <code>0..=127</code>, or else this is UB.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.eq_ignore_ascii_case" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#58">source</a></span><h4 class="code-header">pub fn <a href="#method.eq_ignore_ascii_case" class="fn">eq_ignore_ascii_case</a>(&self, other: &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that two slices are an ASCII case-insensitive match.</p> +<p>Same as <code>to_ascii_lowercase(a) == to_ascii_lowercase(b)</code>, +but without allocating and copying temporaries.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.make_ascii_uppercase" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#73">source</a></span><h4 class="code-header">pub fn <a href="#method.make_ascii_uppercase" class="fn">make_ascii_uppercase</a>(&mut self)</h4></section></summary><div class="docblock"><p>Converts this slice to its ASCII upper case equivalent in-place.</p> +<p>ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.</p> +<p>To return a new uppercased value without modifying the existing one, use +<a href="#method.to_ascii_uppercase"><code>to_ascii_uppercase</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.make_ascii_lowercase" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#90">source</a></span><h4 class="code-header">pub fn <a href="#method.make_ascii_lowercase" class="fn">make_ascii_lowercase</a>(&mut self)</h4></section></summary><div class="docblock"><p>Converts this slice to its ASCII lower case equivalent in-place.</p> +<p>ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.</p> +<p>To return a new lowercased value without modifying the existing one, use +<a href="#method.to_ascii_lowercase"><code>to_ascii_lowercase</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.escape_ascii" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.60.0">1.60.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#110">source</a></span><h4 class="code-header">pub fn <a href="#method.escape_ascii" class="fn">escape_ascii</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/slice/ascii/struct.EscapeAscii.html" title="struct core::slice::ascii::EscapeAscii">EscapeAscii</a><'_></h4></section></summary><div class="docblock"><p>Returns an iterator that produces an escaped version of this slice, +treating it as an ASCII string.</p> +<h5 id="examples-147"><a class="doc-anchor" href="#examples-147">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code> +<span class="kw">let </span>s = <span class="string">b"0\t\r\n'\"\\\x9d"</span>; +<span class="kw">let </span>escaped = s.escape_ascii().to_string(); +<span class="macro">assert_eq!</span>(escaped, <span class="string">"0\\t\\r\\n\\'\\\"\\\\\\x9d"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_ascii_start" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#130">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_start" class="fn">trim_ascii_start</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading ASCII whitespace bytes removed.</p> +<p>‘Whitespace’ refers to the definition used by +<code>u8::is_ascii_whitespace</code>.</p> +<h5 id="examples-148"><a class="doc-anchor" href="#examples-148">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)] + +</span><span class="macro">assert_eq!</span>(<span class="string">b" \t hello world\n"</span>.trim_ascii_start(), <span class="string">b"hello world\n"</span>); +<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii_start(), <span class="string">b""</span>); +<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii_start(), <span class="string">b""</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_ascii_end" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#160">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_end" class="fn">trim_ascii_end</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with trailing ASCII whitespace bytes removed.</p> +<p>‘Whitespace’ refers to the definition used by +<code>u8::is_ascii_whitespace</code>.</p> +<h5 id="examples-149"><a class="doc-anchor" href="#examples-149">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)] + +</span><span class="macro">assert_eq!</span>(<span class="string">b"\r hello world\n "</span>.trim_ascii_end(), <span class="string">b"\r hello world"</span>); +<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii_end(), <span class="string">b""</span>); +<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii_end(), <span class="string">b""</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_ascii" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/ascii.rs.html#191">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii" class="fn">trim_ascii</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading and trailing ASCII whitespace bytes +removed.</p> +<p>‘Whitespace’ refers to the definition used by +<code>u8::is_ascii_whitespace</code>.</p> +<h5 id="examples-150"><a class="doc-anchor" href="#examples-150">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)] + +</span><span class="macro">assert_eq!</span>(<span class="string">b"\r hello world\n "</span>.trim_ascii(), <span class="string">b"hello world"</span>); +<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii(), <span class="string">b""</span>); +<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii(), <span class="string">b""</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.flatten" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4517">source</a><h4 class="code-header">pub fn <a href="#method.flatten" class="fn">flatten</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&[[T; N]]</code>, and flattens it to a <code>&[T]</code>.</p> +<h5 id="panics-41"><a class="doc-anchor" href="#panics-41">§</a>Panics</h5> +<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p> +<p>This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +<code>size_of::<T>() > 0</code>, this will never panic.</p> +<h5 id="examples-151"><a class="doc-anchor" href="#examples-151">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)] + +</span><span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]); + +<span class="macro">assert_eq!</span>( + [[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(), + [[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>], [<span class="number">5</span>, <span class="number">6</span>]].flatten(), +); + +<span class="kw">let </span>slice_of_empty_arrays: <span class="kw-2">&</span>[[i32; <span class="number">0</span>]] = <span class="kw-2">&</span>[[], [], [], [], []]; +<span class="macro">assert!</span>(slice_of_empty_arrays.flatten().is_empty()); + +<span class="kw">let </span>empty_slice_of_arrays: <span class="kw-2">&</span>[[u32; <span class="number">10</span>]] = <span class="kw-2">&</span>[]; +<span class="macro">assert!</span>(empty_slice_of_arrays.flatten().is_empty());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.flatten_mut" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4555">source</a><h4 class="code-header">pub fn <a href="#method.flatten_mut" class="fn">flatten_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&mut [[T; N]]</code>, and flattens it to a <code>&mut [T]</code>.</p> +<h5 id="panics-42"><a class="doc-anchor" href="#panics-42">§</a>Panics</h5> +<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p> +<p>This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +<code>size_of::<T>() > 0</code>, this will never panic.</p> +<h5 id="examples-152"><a class="doc-anchor" href="#examples-152">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)] + +</span><span class="kw">fn </span>add_5_to_all(slice: <span class="kw-2">&mut </span>[i32]) { + <span class="kw">for </span>i <span class="kw">in </span>slice { + <span class="kw-2">*</span>i += <span class="number">5</span>; + } +} + +<span class="kw">let </span><span class="kw-2">mut </span>array = [[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>], [<span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>]]; +add_5_to_all(array.flatten_mut()); +<span class="macro">assert_eq!</span>(array, [[<span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>], [<span class="number">9</span>, <span class="number">10</span>, <span class="number">11</span>], [<span class="number">12</span>, <span class="number">13</span>, <span class="number">14</span>]]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_str" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/ascii/ascii_char.rs.html#560">source</a><h4 class="code-header">pub fn <a href="#method.as_str" class="fn">as_str</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><div class="docblock"><p>Views this slice of ASCII characters as a UTF-8 <code>str</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_bytes" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/ascii/ascii_char.rs.html#571">source</a><h4 class="code-header">pub fn <a href="#method.as_bytes" class="fn">as_bytes</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>ascii_char</code>)</span></div></span></summary><div class="docblock"><p>Views this slice of ASCII characters as a slice of <code>u8</code> bytes.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_floats-1" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/slice/mod.rs.html#4621">source</a><h4 class="code-header">pub fn <a href="#method.sort_floats-1" class="fn">sort_floats</a>(&mut self)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><div class="docblock"><p>Sorts the slice of floats.</p> +<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses +the ordering defined by <a href="https://doc.rust-lang.org/1.77.0/std/primitive.f64.html#method.total_cmp" title="method f64::total_cmp"><code>f64::total_cmp</code></a>.</p> +<h5 id="current-implementation-7"><a class="doc-anchor" href="#current-implementation-7">§</a>Current implementation</h5> +<p>This uses the same sorting algorithm as <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable_by" title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p> +<h5 id="examples-153"><a class="doc-anchor" href="#examples-153">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(sort_floats)] +</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">2.6</span>, -<span class="number">5e-8</span>, f64::NAN, <span class="number">8.29</span>, f64::INFINITY, -<span class="number">1.0</span>, <span class="number">0.0</span>, -f64::INFINITY, -<span class="number">0.0</span>]; + +v.sort_floats(); +<span class="kw">let </span>sorted = [-f64::INFINITY, -<span class="number">1.0</span>, -<span class="number">5e-8</span>, -<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">2.6</span>, <span class="number">8.29</span>, f64::INFINITY, f64::NAN]; +<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>v[..<span class="number">8</span>], <span class="kw-2">&</span>sorted[..<span class="number">8</span>]); +<span class="macro">assert!</span>(v[<span class="number">8</span>].is_nan());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_ascii_uppercase" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#621">source</a></span><h4 class="code-header">pub fn <a href="#method.to_ascii_uppercase" class="fn">to_ascii_uppercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII upper case equivalent.</p> +<p>ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.</p> +<p>To uppercase the value in-place, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.make_ascii_uppercase" title="method slice::make_ascii_uppercase"><code>make_ascii_uppercase</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_ascii_lowercase" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#642">source</a></span><h4 class="code-header">pub fn <a href="#method.to_ascii_lowercase" class="fn">to_ascii_lowercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a vector containing a copy of this slice where each byte +is mapped to its ASCII lower case equivalent.</p> +<p>ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.</p> +<p>To lowercase the value in-place, use <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.make_ascii_lowercase" title="method slice::make_ascii_lowercase"><code>make_ascii_lowercase</code></a>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#207-209">source</a></span><h4 class="code-header">pub fn <a href="#method.sort" class="fn">sort</a>(&mut self)<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice.</p> +<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p> +<p>When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable" title="method slice::sort_unstable"><code>sort_unstable</code></a>.</p> +<h5 id="current-implementation-8"><a class="doc-anchor" href="#current-implementation-8">§</a>Current implementation</h5> +<p>The current algorithm is an adaptive, iterative merge sort inspired by +<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.</p> +<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a +non-allocating insertion sort is used instead.</p> +<h5 id="examples-154"><a class="doc-anchor" href="#examples-154">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort(); +<span class="macro">assert!</span>(v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_by" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#263-265">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by" class="fn">sort_by</a><F>(&mut self, compare: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a comparator function.</p> +<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p> +<p>The comparator function must define a total ordering for the elements in the slice. If +the ordering is not total, the order of the elements is unspecified. An order is a +total order if it is (for all <code>a</code>, <code>b</code> and <code>c</code>):</p> +<ul> +<li>total and antisymmetric: exactly one of <code>a < b</code>, <code>a == b</code> or <code>a > b</code> is true, and</li> +<li>transitive, <code>a < b</code> and <code>b < c</code> implies <code>a < c</code>. The same must hold for both <code>==</code> and <code>></code>.</li> +</ul> +<p>For example, while <a href="https://doc.rust-lang.org/1.77.0/std/primitive.f64.html" title="primitive f64"><code>f64</code></a> doesn’t implement <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use +<code>partial_cmp</code> as our sort function when we know the slice doesn’t contain a <code>NaN</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>floats = [<span class="number">5f64</span>, <span class="number">4.0</span>, <span class="number">1.0</span>, <span class="number">3.0</span>, <span class="number">2.0</span>]; +floats.sort_by(|a, b| a.partial_cmp(b).unwrap()); +<span class="macro">assert_eq!</span>(floats, [<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>, <span class="number">4.0</span>, <span class="number">5.0</span>]);</code></pre></div> +<p>When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable_by" title="method slice::sort_unstable_by"><code>sort_unstable_by</code></a>.</p> +<h5 id="current-implementation-9"><a class="doc-anchor" href="#current-implementation-9">§</a>Current implementation</h5> +<p>The current algorithm is an adaptive, iterative merge sort inspired by +<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.</p> +<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a +non-allocating insertion sort is used instead.</p> +<h5 id="examples-155"><a class="doc-anchor" href="#examples-155">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>]; +v.sort_by(|a, b| a.cmp(b)); +<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]); + +<span class="comment">// reverse sorting +</span>v.sort_by(|a, b| b.cmp(a)); +<span class="macro">assert!</span>(v == [<span class="number">5</span>, <span class="number">4</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_by_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#305-308">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by_key" class="fn">sort_by_key</a><K, F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function.</p> +<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>m</em> * <em>n</em> * log(<em>n</em>)) +worst-case, where the key function is <em>O</em>(<em>m</em>).</p> +<p>For expensive key functions (e.g. functions that are not simple property accesses or +basic operations), <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_by_cached_key" title="method slice::sort_by_cached_key"><code>sort_by_cached_key</code></a> is likely to be +significantly faster, as it does not recompute element keys.</p> +<p>When applicable, unstable sorting is preferred because it is generally faster than stable +sorting and it doesn’t allocate auxiliary memory. +See <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_unstable_by_key" title="method slice::sort_unstable_by_key"><code>sort_unstable_by_key</code></a>.</p> +<h5 id="current-implementation-10"><a class="doc-anchor" href="#current-implementation-10">§</a>Current implementation</h5> +<p>The current algorithm is an adaptive, iterative merge sort inspired by +<a href="https://en.wikipedia.org/wiki/Timsort">timsort</a>. +It is designed to be very fast in cases where the slice is nearly sorted, or consists of +two or more sorted sequences concatenated one after another.</p> +<p>Also, it allocates temporary storage half the size of <code>self</code>, but for short slices a +non-allocating insertion sort is used instead.</p> +<h5 id="examples-156"><a class="doc-anchor" href="#examples-156">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort_by_key(|k| k.abs()); +<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sort_by_cached_key" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.34.0">1.34.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#352-355">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_by_cached_key" class="fn">sort_by_cached_key</a><K, F>(&mut self, f: F)<div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a>) -> K, + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</div></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function.</p> +<p>During sorting, the key function is called at most once per element, by using +temporary storage to remember the results of key evaluation. +The order of calls to the key function is unspecified and may change in future versions +of the standard library.</p> +<p>This sort is stable (i.e., does not reorder equal elements) and <em>O</em>(<em>m</em> * <em>n</em> + <em>n</em> * log(<em>n</em>)) +worst-case, where the key function is <em>O</em>(<em>m</em>).</p> +<p>For simple key functions (e.g., functions that are property accesses or +basic operations), <a href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html#method.sort_by_key" title="method slice::sort_by_key"><code>sort_by_key</code></a> is likely to be +faster.</p> +<h5 id="current-implementation-11"><a class="doc-anchor" href="#current-implementation-11">§</a>Current implementation</h5> +<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters, +which combines the fast average case of randomized quicksort with the fast worst case of +heapsort, while achieving linear time on slices with certain patterns. It uses some +randomization to avoid degenerate cases, but with a fixed seed to always provide +deterministic behavior.</p> +<p>In the worst case, the algorithm allocates temporary storage in a <code>Vec<(K, usize)></code> the +length of the slice.</p> +<h5 id="examples-157"><a class="doc-anchor" href="#examples-157">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">32</span>, -<span class="number">3</span>, <span class="number">2</span>]; + +v.sort_by_cached_key(|k| k.to_string()); +<span class="macro">assert!</span>(v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">2</span>, <span class="number">32</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_vec" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#412-414">source</a></span><h4 class="code-header">pub fn <a href="#method.to_vec" class="fn">to_vec</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section></summary><div class="docblock"><p>Copies <code>self</code> into a new <code>Vec</code>.</p> +<h5 id="examples-158"><a class="doc-anchor" href="#examples-158">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="kw">let </span>x = s.to_vec(); +<span class="comment">// Here, `s` and `x` can be modified independently.</span></code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_vec_in" class="method"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#436-438">source</a><h4 class="code-header">pub fn <a href="#method.to_vec_in" class="fn">to_vec_in</a><A>(&self, alloc: A) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T, A><div class="where">where + A: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>, + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>allocator_api</code>)</span></div></span></summary><div class="docblock"><p>Copies <code>self</code> into a new <code>Vec</code> with an allocator.</p> +<h5 id="examples-159"><a class="doc-anchor" href="#examples-159">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(allocator_api)] + +</span><span class="kw">use </span>std::alloc::System; + +<span class="kw">let </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>]; +<span class="kw">let </span>x = s.to_vec_in(System); +<span class="comment">// Here, `s` and `x` can be modified independently.</span></code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.repeat" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.40.0">1.40.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#489-491">source</a></span><h4 class="code-header">pub fn <a href="#method.repeat" class="fn">repeat</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</div></h4></section></summary><div class="docblock"><p>Creates a vector by copying a slice <code>n</code> times.</p> +<h5 id="panics-43"><a class="doc-anchor" href="#panics-43">§</a>Panics</h5> +<p>This function will panic if the capacity would overflow.</p> +<h5 id="examples-160"><a class="doc-anchor" href="#examples-160">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="number">1</span>, <span class="number">2</span>].repeat(<span class="number">3</span>), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div> +<p>A panic upon overflow:</p> + +<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="comment">// this will panic at runtime +</span><span class="string">b"0123456789abcdef"</span>.repeat(usize::MAX);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.concat" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#557-559">source</a></span><h4 class="code-header">pub fn <a href="#method.concat" class="fn">concat</a><Item>(&self) -> <<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Concat.html" title="trait alloc::slice::Concat">Concat</a><Item>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Concat.html#associatedtype.Output" title="type alloc::slice::Concat::Output">Output</a> <a href="#" class="tooltip" data-notable-ty="<[T] as Concat<Item>>::Output">ⓘ</a><div class="where">where + <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Concat.html" title="trait alloc::slice::Concat">Concat</a><Item>, + Item: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>.</p> +<h5 id="examples-161"><a class="doc-anchor" href="#examples-161">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">"hello"</span>, <span class="string">"world"</span>].concat(), <span class="string">"helloworld"</span>); +<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].concat(), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.join" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#576-578">source</a></span><h4 class="code-header">pub fn <a href="#method.join" class="fn">join</a><Separator>( + &self, + sep: Separator +) -> <<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a><Separator>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html#associatedtype.Output" title="type alloc::slice::Join::Output">Output</a> <a href="#" class="tooltip" data-notable-ty="<[T] as Join<Separator>>::Output">ⓘ</a><div class="where">where + <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a><Separator>,</div></h4></section></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a +given separator between each.</p> +<h5 id="examples-162"><a class="doc-anchor" href="#examples-162">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">"hello"</span>, <span class="string">"world"</span>].join(<span class="string">" "</span>), <span class="string">"hello world"</span>); +<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].join(<span class="kw-2">&</span><span class="number">0</span>), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]); +<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].join(<span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">0</span>][..]), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.connect" class="method"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/alloc/slice.rs.html#596-598">source</a></span><h4 class="code-header">pub fn <a href="#method.connect" class="fn">connect</a><Separator>( + &self, + sep: Separator +) -> <<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a><Separator>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html#associatedtype.Output" title="type alloc::slice::Join::Output">Output</a> <a href="#" class="tooltip" data-notable-ty="<[T] as Join<Separator>>::Output">ⓘ</a><div class="where">where + <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[T]</a>: <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/slice/trait.Join.html" title="trait alloc::slice::Join">Join</a><Separator>,</div></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.3.0: renamed to join</span></div></span></summary><div class="docblock"><p>Flattens a slice of <code>T</code> into a single value <code>Self::Output</code>, placing a +given separator between each.</p> +<h5 id="examples-163"><a class="doc-anchor" href="#examples-163">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>([<span class="string">"hello"</span>, <span class="string">"world"</span>].connect(<span class="string">" "</span>), <span class="string">"hello world"</span>); +<span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>]].connect(<span class="kw-2">&</span><span class="number">0</span>), [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">4</span>]);</code></pre></div> +</div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-AsMut%3C%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&mut [u8]">ⓘ</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CBStr%3E-for-BString" class="impl"><a href="#impl-AsMut%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut-1" class="method trait-impl"><a href="#method.as_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-AsRef%3C%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CBStr%3E-for-BString" class="impl"><a href="#impl-AsRef%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref-1" class="method trait-impl"><a href="#method.as_ref-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3C%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-Borrow%3C%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CBStr%3E-for-BString" class="impl"><a href="#impl-Borrow%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3C%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-BorrowMut%3C%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&mut [u8]">ⓘ</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CBStr%3E-for-BString" class="impl"><a href="#impl-BorrowMut%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-BString" class="impl"><a href="#impl-Clone-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-BString" class="impl"><a href="#impl-Debug-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-BString" class="impl"><a href="#impl-Default-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-BString" class="impl"><a href="#impl-Deref-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&self) -> &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="&Vec<u8>">ⓘ</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-BString" class="impl"><a href="#impl-DerefMut-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&mut self) -> &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="&mut Vec<u8>">ⓘ</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-BString" class="impl"><a href="#impl-Display-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-From%3C%26%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26%5Bu8;+N%5D%3E-for-BString" class="impl"><a href="#impl-From%3C%26%5Bu8;+N%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-7" class="method trait-impl"><a href="#method.from-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26BStr%3E-for-BString" class="impl"><a href="#impl-From%3C%26BStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26str%3E-for-BString" class="impl"><a href="#impl-From%3C%26str%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%5Bu8;+N%5D%3E-for-BString" class="impl"><a href="#impl-From%3C%5Bu8;+N%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a href="#method.from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CBString%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-From%3CBString%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CString%3E-for-BString" class="impl"><a href="#impl-From%3CString%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CVec%3Cu8%3E%3E-for-BString" class="impl"><a href="#impl-From%3CVec%3Cu8%3E%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl"><a href="#method.from-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(s: <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C%26%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-FromIterator%3C%26%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter-3" class="method trait-impl"><a href="#method.from_iter-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C%26BStr%3E-for-BString" class="impl"><a href="#impl-FromIterator%3C%26BStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter-1" class="method trait-impl"><a href="#method.from_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C%26str%3E-for-BString" class="impl"><a href="#impl-FromIterator%3C%26str%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CBString%3E-for-BString" class="impl"><a href="#impl-FromIterator%3CBString%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter-4" class="method trait-impl"><a href="#method.from_iter-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3Cchar%3E-for-BString" class="impl"><a href="#impl-FromIterator%3Cchar%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter-2" class="method trait-impl"><a href="#method.from_iter-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3Cu8%3E-for-BString" class="impl"><a href="#impl-FromIterator%3Cu8%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter-5" class="method trait-impl"><a href="#method.from_iter-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-BString" class="impl"><a href="#impl-Hash-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a><__H>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut __H</a>)<div class="where">where + __H: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/hash/mod.rs.html#238-240">source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a><H>(data: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.slice.html">[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut H</a>)<div class="where">where + H: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>, + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-BString" class="impl"><a href="#impl-Ord-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-PartialEq%3C%26%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-6" class="method trait-impl"><a href="#method.eq-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26BStr%3E-for-BString" class="impl"><a href="#impl-PartialEq%3C%26BStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-12" class="method trait-impl"><a href="#method.eq-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26str%3E-for-BString" class="impl"><a href="#impl-PartialEq%3C%26str%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-4" class="method trait-impl"><a href="#method.eq-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-PartialEq%3C%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-10" class="method trait-impl"><a href="#method.eq-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBStr%3E-for-BString" class="impl"><a href="#impl-PartialEq%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-5" class="method trait-impl"><a href="#method.eq-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-%26%5Bu8%5D" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-14" class="method trait-impl"><a href="#method.eq-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-%26BStr" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-11" class="method trait-impl"><a href="#method.eq-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-%26str" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-13" class="method trait-impl"><a href="#method.eq-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-%5Bu8%5D" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-15" class="method trait-impl"><a href="#method.eq-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-BStr" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-9" class="method trait-impl"><a href="#method.eq-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBString%3E-for-str" class="impl"><a href="#impl-PartialEq%3CBString%3E-for-str" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-7" class="method trait-impl"><a href="#method.eq-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CString%3E-for-BString" class="impl"><a href="#impl-PartialEq%3CString%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-3" class="method trait-impl"><a href="#method.eq-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CVec%3Cu8%3E%3E-for-BString" class="impl"><a href="#impl-PartialEq%3CVec%3Cu8%3E%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-8" class="method trait-impl"><a href="#method.eq-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3Cstr%3E-for-BString" class="impl"><a href="#impl-PartialEq%3Cstr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-BString" class="impl"><a href="#impl-PartialEq-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3C%26%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-6" class="method trait-impl"><a href="#method.partial_cmp-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-6" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26BStr%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3C%26BStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-13" class="method trait-impl"><a href="#method.partial_cmp-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &&'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-13" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%26str%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3C%26str%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-12" class="method trait-impl"><a href="#method.partial_cmp-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-12" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3C%5Bu8%5D%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3C%5Bu8%5D%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-4" class="method trait-impl"><a href="#method.partial_cmp-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBStr%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3CBStr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-14" class="method trait-impl"><a href="#method.partial_cmp-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-14" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-%26%5Bu8%5D" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-7" class="method trait-impl"><a href="#method.partial_cmp-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-7" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-%26BStr" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-%26BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-11" class="method trait-impl"><a href="#method.partial_cmp-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-11" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-%26str" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-10" class="method trait-impl"><a href="#method.partial_cmp-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-10" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-%5Bu8%5D" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-BStr" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-BStr" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-15" class="method trait-impl"><a href="#method.partial_cmp-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-15" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-Vec%3Cu8%3E" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-3" class="method trait-impl"><a href="#method.partial_cmp-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBString%3E-for-str" class="impl"><a href="#impl-PartialOrd%3CBString%3E-for-str" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-8" class="method trait-impl"><a href="#method.partial_cmp-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-8" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CString%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3CString%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-5" class="method trait-impl"><a href="#method.partial_cmp-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-5" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-9" class="method trait-impl"><a href="#method.partial_cmp-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-9" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3Cstr%3E-for-BString" class="impl"><a href="#impl-PartialOrd%3Cstr%3E-for-BString" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-BString" class="impl"><a href="#impl-PartialOrd-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3C%26BString%3E-for-%26str" class="impl"><a href="#impl-TryFrom%3C%26BString%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = Utf8Error</h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(s: &'a <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>, Utf8Error></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-Eq-for-BString" class="impl"><a href="#impl-Eq-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-BString" class="impl"><a href="#impl-RefUnwindSafe-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section><section id="impl-Send-for-BString" class="impl"><a href="#impl-Send-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section><section id="impl-Sync-for-BString" class="impl"><a href="#impl-Sync-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section><section id="impl-Unpin-for-BString" class="impl"><a href="#impl-Unpin-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section><section id="impl-UnwindSafe-for-BString" class="impl"><a href="#impl-UnwindSafe-for-BString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BString.html" title="struct ba2::BString">BString</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-8" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2600">source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2606">source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"&Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A></code></h3><pre><code><div class=\"where\">impl<A> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>","&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","&mut Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A></code></h3><pre><code><div class=\"where\">impl<A> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>","&mut [u8]":"<h3>Notable traits for <code>&mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","<[T] as Concat<Item>>::Output":"<h3>Notable traits for <code>&mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","<[T] as Join<Separator>>::Output":"<h3>Notable traits for <code>&mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for &mut [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A></code></h3><pre><code><div class=\"where\">impl<A> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>"}</script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/struct.Borrowed.html b/ba2/struct.Borrowed.html new file mode 100644 index 0000000..91c93a0 --- /dev/null +++ b/ba2/struct.Borrowed.html @@ -0,0 +1,14 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Makes a shallow copy of the input."><title>Borrowed in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Borrowed</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Tuple Fields</a></h3><ul class="block structfield"><li><a href="#structfield.0">0</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E">Reader<Borrowed<'bytes>></a></li><li><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-1">Reader<Borrowed<'bytes>></a></li><li><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-2">Reader<Borrowed<'bytes>></a></li><li><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E">Reader<Borrowed<'bytes>></a></li><li><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E">ReaderWithOptions<Borrowed<'bytes>></a></li><li><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E-1">ReaderWithOptions<Borrowed<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Borrowed%3C'borrow%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Borrowed%3C'borrow%3E">Send</a></li><li><a href="#impl-Sync-for-Borrowed%3C'borrow%3E">Sync</a></li><li><a href="#impl-Unpin-for-Borrowed%3C'borrow%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Borrowed%3C'borrow%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">ba2</a>::<wbr><a class="struct" href="#">Borrowed</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/lib.rs.html#36">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Borrowed<'borrow>(pub &'borrow [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Makes a shallow copy of the input.</p> +<p>The lifetime of the result is tied to the input buffer.</p> +</div></details><h2 id="fields" class="fields section-header">Tuple Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.0" class="structfield section-header"><a href="#structfield.0" class="anchor field">§</a><code>0: &'borrow [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</code></span><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes>, <a class="struct" href="fo4/struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-2" class="method trait-impl"><a class="src rightside" href="../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.read-2" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>) -> <a class="type" href="fo4/type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes>, <a class="struct" href="tes4/struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-3" class="method trait-impl"><a class="src rightside" href="../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.read-3" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>) -> <a class="type" href="tes4/type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-2" class="impl"><a class="src rightside" href="../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-2" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-4" class="associatedtype trait-impl"><a href="#associatedtype.Item-4" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-4" class="method trait-impl"><a class="src rightside" href="../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.read-4" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>) -> <a class="type" href="tes3/type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-5" class="associatedtype trait-impl"><a href="#associatedtype.Item-5" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-5" class="method trait-impl"><a class="src rightside" href="../src/ba2/tes3/file.rs.html#17">source</a><a href="#method.read-5" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>) -> <a class="type" href="tes3/type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h4></section><section id="associatedtype.Options" class="associatedtype trait-impl"><a href="#associatedtype.Options" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="fo4/struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="../src/ba2/fo4/file.rs.html#1023">source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>, options: &Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="fo4/type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h4></section><section id="associatedtype.Options-1" class="associatedtype trait-impl"><a href="#associatedtype.Options-1" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="tes4/struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-1" class="method trait-impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#238">source</a><a href="#method.read-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>, options: &Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="tes4/type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Borrowed%3C'borrow%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Borrowed%3C'borrow%3E" class="anchor">§</a><h3 class="code-header">impl<'borrow> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'borrow></h3></section><section id="impl-Send-for-Borrowed%3C'borrow%3E" class="impl"><a href="#impl-Send-for-Borrowed%3C'borrow%3E" class="anchor">§</a><h3 class="code-header">impl<'borrow> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'borrow></h3></section><section id="impl-Sync-for-Borrowed%3C'borrow%3E" class="impl"><a href="#impl-Sync-for-Borrowed%3C'borrow%3E" class="anchor">§</a><h3 class="code-header">impl<'borrow> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'borrow></h3></section><section id="impl-Unpin-for-Borrowed%3C'borrow%3E" class="impl"><a href="#impl-Unpin-for-Borrowed%3C'borrow%3E" class="anchor">§</a><h3 class="code-header">impl<'borrow> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'borrow></h3></section><section id="impl-UnwindSafe-for-Borrowed%3C'borrow%3E" class="impl"><a href="#impl-UnwindSafe-for-Borrowed%3C'borrow%3E" class="anchor">§</a><h3 class="code-header">impl<'borrow> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'borrow></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-7" class="associatedtype trait-impl"><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/struct.Copied.html b/ba2/struct.Copied.html new file mode 100644 index 0000000..12ee9fa --- /dev/null +++ b/ba2/struct.Copied.html @@ -0,0 +1,14 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Makes a deep copy of the input."><title>Copied in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Copied</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Tuple Fields</a></h3><ul class="block structfield"><li><a href="#structfield.0">0</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E">Reader<Copied<'bytes>></a></li><li><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-1">Reader<Copied<'bytes>></a></li><li><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-2">Reader<Copied<'bytes>></a></li><li><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E">Reader<Copied<'bytes>></a></li><li><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E">ReaderWithOptions<Copied<'bytes>></a></li><li><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E-1">ReaderWithOptions<Copied<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Copied%3C'copy%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Copied%3C'copy%3E">Send</a></li><li><a href="#impl-Sync-for-Copied%3C'copy%3E">Sync</a></li><li><a href="#impl-Unpin-for-Copied%3C'copy%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Copied%3C'copy%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">ba2</a>::<wbr><a class="struct" href="#">Copied</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/lib.rs.html#41">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Copied<'copy>(pub &'copy [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Makes a deep copy of the input.</p> +<p>The lifetime of the result is independent of the input buffer.</p> +</div></details><h2 id="fields" class="fields section-header">Tuple Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.0" class="structfield section-header"><a href="#structfield.0" class="anchor field">§</a><code>0: &'copy [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</code></span><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static>, <a class="struct" href="fo4/struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>) -> <a class="type" href="fo4/type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static>, <a class="struct" href="tes4/struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-1" class="method trait-impl"><a class="src rightside" href="../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.read-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>) -> <a class="type" href="tes4/type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-2" class="impl"><a class="src rightside" href="../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-2" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-2" class="method trait-impl"><a class="src rightside" href="../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.read-2" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>) -> <a class="type" href="tes3/type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'static></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-3" class="method trait-impl"><a class="src rightside" href="../src/ba2/tes3/file.rs.html#17">source</a><a href="#method.read-3" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>) -> <a class="type" href="tes3/type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-4" class="associatedtype trait-impl"><a href="#associatedtype.Item-4" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h4></section><section id="associatedtype.Options" class="associatedtype trait-impl"><a href="#associatedtype.Options" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="tes4/struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-4" class="method trait-impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#238">source</a><a href="#method.read-4" class="anchor">§</a><h4 class="code-header">fn <a href="trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>, options: &Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="tes4/type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E-1" class="impl"><a class="src rightside" href="../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-5" class="associatedtype trait-impl"><a href="#associatedtype.Item-5" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'static></h4></section><section id="associatedtype.Options-1" class="associatedtype trait-impl"><a href="#associatedtype.Options-1" class="anchor">§</a><h4 class="code-header">type <a href="trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="fo4/struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-5" class="method trait-impl"><a class="src rightside" href="../src/ba2/fo4/file.rs.html#1023">source</a><a href="#method.read-5" class="anchor">§</a><h4 class="code-header">fn <a href="trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>, options: &Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="fo4/type.Result.html" title="type ba2::fo4::Result">Result</a><Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Copied%3C'copy%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Copied%3C'copy%3E" class="anchor">§</a><h3 class="code-header">impl<'copy> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'copy></h3></section><section id="impl-Send-for-Copied%3C'copy%3E" class="impl"><a href="#impl-Send-for-Copied%3C'copy%3E" class="anchor">§</a><h3 class="code-header">impl<'copy> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'copy></h3></section><section id="impl-Sync-for-Copied%3C'copy%3E" class="impl"><a href="#impl-Sync-for-Copied%3C'copy%3E" class="anchor">§</a><h3 class="code-header">impl<'copy> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'copy></h3></section><section id="impl-Unpin-for-Copied%3C'copy%3E" class="impl"><a href="#impl-Unpin-for-Copied%3C'copy%3E" class="anchor">§</a><h3 class="code-header">impl<'copy> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'copy></h3></section><section id="impl-UnwindSafe-for-Copied%3C'copy%3E" class="impl"><a href="#impl-UnwindSafe-for-Copied%3C'copy%3E" class="anchor">§</a><h3 class="code-header">impl<'copy> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'copy></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-7" class="associatedtype trait-impl"><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/archive/struct.Archive.html b/ba2/tes3/archive/struct.Archive.html new file mode 100644 index 0000000..67d5b44 --- /dev/null +++ b/ba2/tes3/archive/struct.Archive.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes3/struct.Archive.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes3/struct.Archive.html">../../../ba2/tes3/struct.Archive.html</a>...</p> + <script>location.replace("../../../ba2/tes3/struct.Archive.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes3/archive/struct.Key.html b/ba2/tes3/archive/struct.Key.html new file mode 100644 index 0000000..c9769ef --- /dev/null +++ b/ba2/tes3/archive/struct.Key.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes3/struct.ArchiveKey.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes3/struct.ArchiveKey.html">../../../ba2/tes3/struct.ArchiveKey.html</a>...</p> + <script>location.replace("../../../ba2/tes3/struct.ArchiveKey.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes3/enum.Error.html b/ba2/tes3/enum.Error.html new file mode 100644 index 0000000..1e37b42 --- /dev/null +++ b/ba2/tes3/enum.Error.html @@ -0,0 +1,17 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Error` enum in crate `ba2`."><title>Error in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Error</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.IntegralTruncation">IntegralTruncation</a></li><li><a href="#variant.InvalidMagic">InvalidMagic</a></li><li><a href="#variant.Io">Io</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-Error">Debug</a></li><li><a href="#impl-Display-for-Error">Display</a></li><li><a href="#impl-Error-for-Error">Error</a></li><li><a href="#impl-From%3CError%3E-for-Error">From<Error></a></li><li><a href="#impl-From%3CTryFromIntError%3E-for-Error">From<TryFromIntError></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Error">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-Error">!UnwindSafe</a></li><li><a href="#impl-Send-for-Error">Send</a></li><li><a href="#impl-Sync-for-Error">Sync</a></li><li><a href="#impl-Unpin-for-Error">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToString-for-T">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="enum" href="#">Error</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/mod.rs.html#61-70">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code><div class="code-attribute">#[non_exhaustive]</div>pub enum Error { + IntegralTruncation, + InvalidMagic(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>), + Io(<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>), +}</code></pre><h2 id="variants" class="variants section-header">Variants (Non-exhaustive)<a href="#variants" class="anchor">§</a></h2><details class="toggle non-exhaustive"><summary class="hideme"><span>This enum is marked as non-exhaustive</span></summary><div class="docblock">Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.</div></details><div class="variants"><section id="variant.IntegralTruncation" class="variant"><a href="#variant.IntegralTruncation" class="anchor">§</a><h3 class="code-header">IntegralTruncation</h3></section><section id="variant.InvalidMagic" class="variant"><a href="#variant.InvalidMagic" class="anchor">§</a><h3 class="code-header">InvalidMagic(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>)</h3></section><section id="variant.Io" class="variant"><a href="#variant.Io" class="anchor">§</a><h3 class="code-header">Io(<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>)</h3></section></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#60">source</a><a href="#impl-Debug-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#60">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#60">source</a><a href="#impl-Display-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#60">source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&self, __formatter: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Error-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#60">source</a><a href="#impl-Error-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.source" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#60">source</a><a href="#method.source" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.source" class="fn">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)></h4></section></summary><div class='docblock'>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.source">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.description" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#110">source</a></span><a href="#method.description" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.description" class="fn">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.42.0: use the Display impl or to_string()</span></div></span><div class='docblock'> <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.description">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.cause" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#120">source</a></span><a href="#method.cause" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.cause" class="fn">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.33.0: replaced by Error::source, which can support downcasting</span></div></span></details><details class="toggle method-toggle" open><summary><section id="method.provide" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#184">source</a><a href="#method.provide" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.provide" class="fn">provide</a><'a>(&'a self, request: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/error/struct.Request.html" title="struct core::error::Request">Request</a><'a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>error_generic_member_access</code>)</span></div></span><div class='docblock'>Provides type based access to context intended for error reports. <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.provide">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CError%3E-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#60">source</a><a href="#impl-From%3CError%3E-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#60">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(source: <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CTryFromIntError%3E-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#72-76">source</a><a href="#impl-From%3CTryFromIntError%3E-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html" title="struct core::num::error::TryFromIntError">TryFromIntError</a>> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/mod.rs.html#73-75">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(_: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html" title="struct core::num::error::TryFromIntError">TryFromIntError</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Error" class="impl"><a href="#impl-RefUnwindSafe-for-Error" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section><section id="impl-Send-for-Error" class="impl"><a href="#impl-Send-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section><section id="impl-Sync-for-Error" class="impl"><a href="#impl-Sync-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section><section id="impl-Unpin-for-Error" class="impl"><a href="#impl-Unpin-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section><section id="impl-UnwindSafe-for-Error" class="impl"><a href="#impl-UnwindSafe-for-Error" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2600">source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2606">source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/file/struct.File.html b/ba2/tes3/file/struct.File.html new file mode 100644 index 0000000..af7f67d --- /dev/null +++ b/ba2/tes3/file/struct.File.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes3/struct.File.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes3/struct.File.html">../../../ba2/tes3/struct.File.html</a>...</p> + <script>location.replace("../../../ba2/tes3/struct.File.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes3/fn.hash_file.html b/ba2/tes3/fn.hash_file.html new file mode 100644 index 0000000..b4c18d7 --- /dev/null +++ b/ba2/tes3/fn.hash_file.html @@ -0,0 +1,3 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Produces a hash using the given path."><title>hash_file in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="fn" href="#">hash_file</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/hashing.rs.html#50-53">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn hash_file(path: &<a class="struct" href="../struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> (<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>, <a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Produces a hash using the given path.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/fn.hash_file_in_place.html b/ba2/tes3/fn.hash_file_in_place.html new file mode 100644 index 0000000..6a992f3 --- /dev/null +++ b/ba2/tes3/fn.hash_file_in_place.html @@ -0,0 +1,4 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Produces a hash using the given path."><title>hash_file_in_place in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="fn" href="#">hash_file_in_place</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/hashing.rs.html#59-79">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn hash_file_in_place(path: &mut <a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Produces a hash using the given path.</p> +<p>The path is normalized in place. After the function returns, the path contains the string that would be stored on disk.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/hashing/fn.hash_file.html b/ba2/tes3/hashing/fn.hash_file.html new file mode 100644 index 0000000..d24820c --- /dev/null +++ b/ba2/tes3/hashing/fn.hash_file.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes3/fn.hash_file.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes3/fn.hash_file.html">../../../ba2/tes3/fn.hash_file.html</a>...</p> + <script>location.replace("../../../ba2/tes3/fn.hash_file.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes3/hashing/fn.hash_file_in_place.html b/ba2/tes3/hashing/fn.hash_file_in_place.html new file mode 100644 index 0000000..6c7b749 --- /dev/null +++ b/ba2/tes3/hashing/fn.hash_file_in_place.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes3/fn.hash_file_in_place.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes3/fn.hash_file_in_place.html">../../../ba2/tes3/fn.hash_file_in_place.html</a>...</p> + <script>location.replace("../../../ba2/tes3/fn.hash_file_in_place.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes3/hashing/struct.FileHash.html b/ba2/tes3/hashing/struct.FileHash.html new file mode 100644 index 0000000..5d8a915 --- /dev/null +++ b/ba2/tes3/hashing/struct.FileHash.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes3/struct.FileHash.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes3/struct.FileHash.html">../../../ba2/tes3/struct.FileHash.html</a>...</p> + <script>location.replace("../../../ba2/tes3/struct.FileHash.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes3/hashing/struct.Hash.html b/ba2/tes3/hashing/struct.Hash.html new file mode 100644 index 0000000..651fedb --- /dev/null +++ b/ba2/tes3/hashing/struct.Hash.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes3/struct.Hash.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes3/struct.Hash.html">../../../ba2/tes3/struct.Hash.html</a>...</p> + <script>location.replace("../../../ba2/tes3/struct.Hash.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes3/index.html b/ba2/tes3/index.html new file mode 100644 index 0000000..27e94ba --- /dev/null +++ b/ba2/tes3/index.html @@ -0,0 +1,36 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="TES III: Morrowind"><title>ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Module tes3</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Aliases</a></li></ul></section><h2><a href="../index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">ba2</a>::<wbr><a class="mod" href="#">tes3</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/mod.rs.html#1-78">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>TES III: Morrowind</p> +<p><em>“Ahh yes, we’ve been expecting you. You’ll have to be recorded before you’re officially released. There are a few ways we can do this, and the choice is yours.”</em></p> +<p>This format debuted and sunset with Morrowind. It is the simplest of all the formats, using no compression or special tricks to organize the data.</p> +<h2 id="reading"><a class="doc-anchor" href="#reading">§</a>Reading</h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::{ + prelude::<span class="kw-2">*</span>, + tes3::{Archive, ArchiveKey}, +}; +<span class="kw">use </span>std::{fs, path::Path}; + +<span class="kw">fn </span>example() -> <span class="prelude-ty">Option</span><()> { + <span class="kw">let </span>path = Path::new(<span class="string">"path/to/morrowind/Data Files/Morrowind.bsa"</span>); + <span class="kw">let </span>archive = Archive::read(path).ok()<span class="question-mark">?</span>; + <span class="kw">let </span>key: ArchiveKey = <span class="string">b"icons/gold.dds"</span>.into(); + <span class="kw">let </span>file = archive.get(<span class="kw-2">&</span>key)<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>dst = fs::File::create(<span class="string">"gold.dds"</span>).ok()<span class="question-mark">?</span>; + file.write(<span class="kw-2">&mut </span>dst).ok()<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(()) +}</code></pre></div> +<h2 id="writing"><a class="doc-anchor" href="#writing">§</a>Writing</h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::{ + prelude::<span class="kw-2">*</span>, + tes3::{Archive, ArchiveKey, File}, +}; +<span class="kw">use </span>std::fs; + +<span class="kw">fn </span>example() -> <span class="prelude-ty">Option</span><()> { + <span class="kw">let </span>file: File = <span class="string">b"Hello world!\n"</span>.into(); + <span class="kw">let </span>key: ArchiveKey = <span class="string">b"hello.txt"</span>.into(); + <span class="kw">let </span>archive: Archive = [(key, file)].into_iter().collect(); + <span class="kw">let </span><span class="kw-2">mut </span>dst = fs::File::create(<span class="string">"example.bsa"</span>).ok()<span class="question-mark">?</span>; + archive.write(<span class="kw-2">&mut </span>dst).ok()<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(()) +}</code></pre></div> +</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a></div><div class="desc docblock-short">Represents the TES3 revision of the bsa format.</div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">ArchiveKey</a></div><div class="desc docblock-short">A key for indexing into the relevant mapping.</div></li><li><div class="item-name"><a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a></div><div class="desc docblock-short">Represents a file within the TES3 virtual filesystem.</div></li><li><div class="item-name"><a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></div><div class="desc docblock-short">See also <a href="struct.Hash.html" title="struct ba2::tes3::Hash"><code>Hash</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></div><div class="desc docblock-short">The underlying hash object used to uniquely identify objects within the archive.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.hash_file.html" title="fn ba2::tes3::hash_file">hash_file</a></div><div class="desc docblock-short">Produces a hash using the given path.</div></li><li><div class="item-name"><a class="fn" href="fn.hash_file_in_place.html" title="fn ba2::tes3::hash_file_in_place">hash_file_in_place</a></div><div class="desc docblock-short">Produces a hash using the given path.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a></div></li></ul></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/sidebar-items.js b/ba2/tes3/sidebar-items.js new file mode 100644 index 0000000..43ab054 --- /dev/null +++ b/ba2/tes3/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Error"],"fn":["hash_file","hash_file_in_place"],"struct":["Archive","ArchiveKey","File","FileHash","Hash"],"type":["Result"]}; \ No newline at end of file diff --git a/ba2/tes3/struct.Archive.html b/ba2/tes3/struct.Archive.html new file mode 100644 index 0000000..746cacd --- /dev/null +++ b/ba2/tes3/struct.Archive.html @@ -0,0 +1,27 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents the TES3 revision of the bsa format."><title>Archive in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Archive</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.clear">clear</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_key_value">get_key_value</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.keys">keys</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.remove_entry">remove_entry</a></li><li><a href="#method.values">values</a></li><li><a href="#method.values_mut">values_mut</a></li><li><a href="#method.write">write</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Archive%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-Archive%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Archive%3C'bytes%3E">Default</a></li><li><a href="#impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E">FromIterator<(Key<'bytes>, File<'bytes>)></a></li><li><a href="#impl-IntoIterator-for-%26Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E">Reader<&File></a></li><li><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E">Reader<&Path></a></li><li><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E">Reader<Borrowed<'bytes>></a></li><li><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E">Reader<Copied<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Archive%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Archive%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Archive%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Archive%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Archive%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="struct" href="#">Archive</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Archive<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents the TES3 revision of the bsa format.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.clear" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&mut self)</h4></section><section id="method.get" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a><K>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>>,</div></h4></section><section id="method.get_key_value" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.get_key_value" class="fn">get_key_value</a><K>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, &<a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>)><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>>,</div></h4></section><section id="method.get_mut" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a><K>(&mut self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>>,</div></h4></section><section id="method.insert" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a><K>(&mut self, key: K, value: <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>>,</div></h4></section><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.iter" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, &<a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>)></h4></section><section id="method.iter_mut" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>( + &mut self +) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, &mut <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>)></h4></section><section id="method.keys" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.keys" class="fn">keys</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>></h4></section><section id="method.len" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.remove" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a><K>(&mut self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>>,</div></h4></section><section id="method.remove_entry" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.remove_entry" class="fn">remove_entry</a><K>( + &mut self, + key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>)><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>>,</div></h4></section><section id="method.values" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.values" class="fn">values</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>></h4></section><section id="method.values_mut" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><h4 class="code-header">pub fn <a href="#method.values_mut" class="fn">values_mut</a>(&mut self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &mut <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Archive%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#63-241">source</a><a href="#impl-Archive%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.write" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#64-78">source</a><h4 class="code-header">pub fn <a href="#method.write" class="fn">write</a><Out>(&self, stream: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut Out</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>><div class="where">where + Out: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,</div></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Clone-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Debug-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Default-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><(<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>)> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> Self<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = (<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>)>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-IntoIterator-for-%26Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-5" class="associatedtype trait-impl"><a href="#associatedtype.Item-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-2" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.into_iter-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this mut <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.into_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-IntoIterator-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3C%26File%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-6" class="associatedtype trait-impl"><a href="#associatedtype.Item-6" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.read-3" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-4" class="associatedtype trait-impl"><a href="#associatedtype.Item-4" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.read-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h4></section><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#method.read-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section><section id="impl-Send-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section><section id="impl-Sync-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section><section id="impl-Unpin-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/struct.ArchiveKey.html b/ba2/tes3/struct.ArchiveKey.html new file mode 100644 index 0000000..4736c52 --- /dev/null +++ b/ba2/tes3/struct.ArchiveKey.html @@ -0,0 +1,22 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A key for indexing into the relevant mapping."><title>ArchiveKey in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveKey</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.hash">hash</a></li><li><a href="#method.name">name</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E">Borrow<FileHash></a></li><li><a href="#impl-Clone-for-Key%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-Key%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Key%3C'bytes%3E">Default</a></li><li><a href="#impl-Eq-for-Key%3C'bytes%3E">Eq</a></li><li><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E">From<FileHash></a></li><li><a href="#impl-From%3CT%3E-for-Key%3C'static%3E">From<T></a></li><li><a href="#impl-Ord-for-Key%3C'bytes%3E">Ord</a></li><li><a href="#impl-PartialEq-for-Key%3C'bytes%3E">PartialEq</a></li><li><a href="#impl-PartialOrd-for-Key%3C'bytes%3E">PartialOrd</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Key%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Key%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Key%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Key%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Key%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="struct" href="#">ArchiveKey</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/archive.rs.html#47">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveKey<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A key for indexing into the relevant mapping.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.hash" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><h4 class="code-header">pub fn <a href="#method.hash" class="fn">hash</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h4></section><section id="method.name" class="method"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><h4 class="code-header">pub fn <a href="#method.name" class="fn">name</a>(&self) -> &<a class="struct" href="../struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-Clone-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-Debug-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-Default-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CT%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-From%3CT%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'static><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: T) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-Ord-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-PartialEq-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-PartialOrd-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Eq-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-Eq-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Key%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Send-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Sync-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Unpin-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Key%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/struct.File.html b/ba2/tes3/struct.File.html new file mode 100644 index 0000000..472566d --- /dev/null +++ b/ba2/tes3/struct.File.html @@ -0,0 +1,15 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents a file within the TES3 virtual filesystem."><title>File in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">File</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.as_bytes">as_bytes</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.into_owned">into_owned</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.write">write</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-File%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-File%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-File%3C'bytes%3E">Default</a></li><li><a href="#impl-From%3C%26%5Bu8;+N%5D%3E-for-File%3C'bytes%3E">From<&'bytes [u8; N]></a></li><li><a href="#impl-From%3C%26%5Bu8%5D%3E-for-File%3C'bytes%3E">From<&'bytes [u8]></a></li><li><a href="#impl-From%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C'static%3E">From<Box<[u8]>></a></li><li><a href="#impl-Reader%3C%26File%3E-for-File%3C'static%3E">Reader<&File></a></li><li><a href="#impl-Reader%3C%26Path%3E-for-File%3C'static%3E">Reader<&Path></a></li><li><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E">Reader<Borrowed<'bytes>></a></li><li><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E">Reader<Copied<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-File%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-File%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-File%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-File%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-File%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="struct" href="#">File</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/file.rs.html#11-13">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct File<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents a file within the TES3 virtual filesystem.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#16">source</a><a href="#impl-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.as_bytes" class="method"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#16">source</a><h4 class="code-header">pub fn <a href="#method.as_bytes" class="fn">as_bytes</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><section id="method.as_ptr" class="method"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#16">source</a><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const </a><a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></h4></section><section id="method.into_owned" class="method"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#16">source</a><h4 class="code-header">pub fn <a href="#method.into_owned" class="fn">into_owned</a>(self) -> <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'static></h4></section><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#16">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.len" class="method"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#16">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#16">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-File%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#19-37">source</a><a href="#impl-File%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.write" class="method"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#20-26">source</a><h4 class="code-header">pub fn <a href="#method.write" class="fn">write</a><Out>(&self, stream: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut Out</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>><div class="where">where + Out: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,</div></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#10">source</a><a href="#impl-Clone-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#10">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#10">source</a><a href="#impl-Debug-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#10">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#10">source</a><a href="#impl-Default-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#10">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26%5Bu8%5D%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#45-51">source</a><a href="#impl-From%3C%26%5Bu8%5D%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#46-50">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26%5Bu8;+N%5D%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#39-43">source</a><a href="#impl-From%3C%26%5Bu8;+N%5D%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#40-42">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#53-59">source</a><a href="#impl-From%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#54-58">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3C%26File%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3C%26File%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'static></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#17">source</a><a href="#method.read-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3C%26Path%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3C%26Path%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'static></h4></section><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#17">source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#17">source</a><a href="#method.read-3" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'static></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/file.rs.html#17">source</a><a href="#method.read-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>) -> <a class="type" href="type.Result.html" title="type ba2::tes3::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-File%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section><section id="impl-Send-for-File%3C'bytes%3E" class="impl"><a href="#impl-Send-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section><section id="impl-Sync-for-File%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section><section id="impl-Unpin-for-File%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section><section id="impl-UnwindSafe-for-File%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>"}</script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/struct.FileHash.html b/ba2/tes3/struct.FileHash.html new file mode 100644 index 0000000..e8d3bb2 --- /dev/null +++ b/ba2/tes3/struct.FileHash.html @@ -0,0 +1,29 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `struct@Hash`."><title>FileHash in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileHash</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li></ul><h3><a href="#deref-methods-Hash">Methods from Deref<Target=Hash></a></h3><ul class="block deref-methods"><li><a href="#method.numeric">numeric</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CHash%3E-for-FileHash">AsMut<Hash></a></li><li><a href="#impl-AsRef%3CHash%3E-for-FileHash">AsRef<Hash></a></li><li><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E">Borrow<FileHash></a></li><li><a href="#impl-Borrow%3CHash%3E-for-FileHash">Borrow<Hash></a></li><li><a href="#impl-BorrowMut%3CHash%3E-for-FileHash">BorrowMut<Hash></a></li><li><a href="#impl-Clone-for-FileHash">Clone</a></li><li><a href="#impl-Copy-for-FileHash">Copy</a></li><li><a href="#impl-Debug-for-FileHash">Debug</a></li><li><a href="#impl-Default-for-FileHash">Default</a></li><li><a href="#impl-Deref-for-FileHash">Deref</a></li><li><a href="#impl-DerefMut-for-FileHash">DerefMut</a></li><li><a href="#impl-Eq-for-FileHash">Eq</a></li><li><a href="#impl-From%3CFileHash%3E-for-Hash">From<FileHash></a></li><li><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E">From<FileHash></a></li><li><a href="#impl-From%3CHash%3E-for-FileHash">From<Hash></a></li><li><a href="#impl-Ord-for-FileHash">Ord</a></li><li><a href="#impl-PartialEq-for-FileHash">PartialEq</a></li><li><a href="#impl-PartialEq%3CFileHash%3E-for-Hash">PartialEq<FileHash></a></li><li><a href="#impl-PartialEq%3CHash%3E-for-FileHash">PartialEq<Hash></a></li><li><a href="#impl-PartialOrd-for-FileHash">PartialOrd</a></li><li><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash">PartialOrd<FileHash></a></li><li><a href="#impl-PartialOrd%3CHash%3E-for-FileHash">PartialOrd<Hash></a></li><li><a href="#impl-StructuralPartialEq-for-FileHash">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-FileHash">RefUnwindSafe</a></li><li><a href="#impl-Send-for-FileHash">Send</a></li><li><a href="#impl-Sync-for-FileHash">Sync</a></li><li><a href="#impl-Unpin-for-FileHash">Unpin</a></li><li><a href="#impl-UnwindSafe-for-FileHash">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="struct" href="#">FileHash</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/hashing.rs.html#13">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileHash(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.Hash.html" title="struct ba2::tes3::Hash"><code>Hash</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details></div><h2 id="deref-methods-Hash" class="section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>></span><a href="#deref-methods-Hash" class="anchor">§</a></h2><div id="deref-methods-Hash-1" class="impl-items"><section id="method.numeric" class="method"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#23-25">source</a><h4 class="code-header">pub fn <a href="#method.numeric" class="fn">numeric</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u64.html">u64</a></h4></section></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-AsMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-AsRef%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Borrow%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-BorrowMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Clone-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Debug-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Default-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Deref-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&self) -> &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-DerefMut-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&mut self) -> &mut Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-From%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes3::ArchiveKey">Key</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/archive.rs.html#47">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-From%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Ord-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialEq%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialEq%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialEq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialOrd%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialOrd-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Copy-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section><section id="impl-Eq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Eq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section><section id="impl-StructuralPartialEq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-StructuralPartialEq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-FileHash" class="impl"><a href="#impl-RefUnwindSafe-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section><section id="impl-Send-for-FileHash" class="impl"><a href="#impl-Send-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section><section id="impl-Sync-for-FileHash" class="impl"><a href="#impl-Sync-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section><section id="impl-Unpin-for-FileHash" class="impl"><a href="#impl-Unpin-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section><section id="impl-UnwindSafe-for-FileHash" class="impl"><a href="#impl-UnwindSafe-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/struct.Hash.html b/ba2/tes3/struct.Hash.html new file mode 100644 index 0000000..134ad0b --- /dev/null +++ b/ba2/tes3/struct.Hash.html @@ -0,0 +1,32 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The underlying hash object used to uniquely identify objects within the archive."><title>Hash in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Hash</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.hi">hi</a></li><li><a href="#structfield.lo">lo</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li><li><a href="#method.numeric">numeric</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CHash%3E-for-FileHash">AsMut<Hash></a></li><li><a href="#impl-AsRef%3CHash%3E-for-FileHash">AsRef<Hash></a></li><li><a href="#impl-Borrow%3CHash%3E-for-FileHash">Borrow<Hash></a></li><li><a href="#impl-BorrowMut%3CHash%3E-for-FileHash">BorrowMut<Hash></a></li><li><a href="#impl-Clone-for-Hash">Clone</a></li><li><a href="#impl-Copy-for-Hash">Copy</a></li><li><a href="#impl-Debug-for-Hash">Debug</a></li><li><a href="#impl-Default-for-Hash">Default</a></li><li><a href="#impl-Eq-for-Hash">Eq</a></li><li><a href="#impl-From%3CFileHash%3E-for-Hash">From<FileHash></a></li><li><a href="#impl-From%3CHash%3E-for-FileHash">From<Hash></a></li><li><a href="#impl-Ord-for-Hash">Ord</a></li><li><a href="#impl-PartialEq-for-Hash">PartialEq</a></li><li><a href="#impl-PartialEq%3CFileHash%3E-for-Hash">PartialEq<FileHash></a></li><li><a href="#impl-PartialEq%3CHash%3E-for-FileHash">PartialEq<Hash></a></li><li><a href="#impl-PartialOrd-for-Hash">PartialOrd</a></li><li><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash">PartialOrd<FileHash></a></li><li><a href="#impl-PartialOrd%3CHash%3E-for-FileHash">PartialOrd<Hash></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Hash">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Hash">Send</a></li><li><a href="#impl-Sync-for-Hash">Sync</a></li><li><a href="#impl-Unpin-for-Hash">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Hash">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="struct" href="#">Hash</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/hashing.rs.html#8-11">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code><div class="code-attribute">#[repr(C)]</div>pub struct Hash { + pub lo: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>, + pub hi: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The underlying hash object used to uniquely identify objects within the archive.</p> +</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.lo" class="structfield section-header"><a href="#structfield.lo" class="anchor field">§</a><code>lo: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></code></span><span id="structfield.hi" class="structfield section-header"><a href="#structfield.hi" class="anchor field">§</a><code>hi: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#15-26">source</a><a href="#impl-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#17-19">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.numeric" class="method"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#23-25">source</a><h4 class="code-header">pub fn <a href="#method.numeric" class="fn">numeric</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u64.html">u64</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-AsMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-AsRef%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-Borrow%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-BorrowMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#6">source</a><a href="#impl-Clone-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#6">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#6">source</a><a href="#impl-Debug-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#6">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#6">source</a><a href="#impl-Default-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#6">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-From%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-From%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#42-46">source</a><a href="#impl-Ord-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#43-45">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialEq%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialEq%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#28-32">source</a><a href="#impl-PartialEq-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#29-31">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#impl-PartialOrd%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes3::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#13">source</a><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#36-40">source</a><a href="#impl-PartialOrd-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#37-39">source</a><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#6">source</a><a href="#impl-Copy-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section><section id="impl-Eq-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes3/hashing.rs.html#34">source</a><a href="#impl-Eq-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Hash" class="impl"><a href="#impl-RefUnwindSafe-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section><section id="impl-Send-for-Hash" class="impl"><a href="#impl-Send-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section><section id="impl-Sync-for-Hash" class="impl"><a href="#impl-Sync-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section><section id="impl-Unpin-for-Hash" class="impl"><a href="#impl-Unpin-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section><section id="impl-UnwindSafe-for-Hash" class="impl"><a href="#impl-UnwindSafe-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes3::Hash">Hash</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes3/type.Result.html b/ba2/tes3/type.Result.html new file mode 100644 index 0000000..ac4b6a8 --- /dev/null +++ b/ba2/tes3/type.Result.html @@ -0,0 +1,7 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Result` type in crate `ba2`."><title>Result in ba2::tes3 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Result</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Err">Err</a></li><li><a href="#variant.Ok">Ok</a></li></ul></section><h2><a href="index.html">In ba2::tes3</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes3</a>::<wbr><a class="type" href="#">Result</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes3/mod.rs.html#78">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub type Result<T> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a>>;</code></pre><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>enum Result<T> { + Ok(T), + Err(<a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a>), +}</code></pre><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Ok" class="variant"><a href="#variant.Ok" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Ok(T)</h3></section><div class="docblock"><p>Contains the success value</p> +</div><section id="variant.Err" class="variant"><a href="#variant.Err" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Err(<a class="enum" href="enum.Error.html" title="enum ba2::tes3::Error">Error</a>)</h3></section><div class="docblock"><p>Contains the error value</p> +</div></div><script src="../../type.impl/core/result/enum.Result.js" data-self-path="ba2::tes3::Result" async></script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/archive/struct.Archive.html b/ba2/tes4/archive/struct.Archive.html new file mode 100644 index 0000000..474c821 --- /dev/null +++ b/ba2/tes4/archive/struct.Archive.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.Archive.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.Archive.html">../../../ba2/tes4/struct.Archive.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.Archive.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/archive/struct.Flags.html b/ba2/tes4/archive/struct.Flags.html new file mode 100644 index 0000000..3cdce3c --- /dev/null +++ b/ba2/tes4/archive/struct.Flags.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.ArchiveFlags.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.ArchiveFlags.html">../../../ba2/tes4/struct.ArchiveFlags.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.ArchiveFlags.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/archive/struct.Key.html b/ba2/tes4/archive/struct.Key.html new file mode 100644 index 0000000..b3150f7 --- /dev/null +++ b/ba2/tes4/archive/struct.Key.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.ArchiveKey.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.ArchiveKey.html">../../../ba2/tes4/struct.ArchiveKey.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.ArchiveKey.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/archive/struct.Options.html b/ba2/tes4/archive/struct.Options.html new file mode 100644 index 0000000..de795ae --- /dev/null +++ b/ba2/tes4/archive/struct.Options.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.ArchiveOptions.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.ArchiveOptions.html">../../../ba2/tes4/struct.ArchiveOptions.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.ArchiveOptions.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/archive/struct.OptionsBuilder.html b/ba2/tes4/archive/struct.OptionsBuilder.html new file mode 100644 index 0000000..2a82f69 --- /dev/null +++ b/ba2/tes4/archive/struct.OptionsBuilder.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.ArchiveOptionsBuilder.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.ArchiveOptionsBuilder.html">../../../ba2/tes4/struct.ArchiveOptionsBuilder.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.ArchiveOptionsBuilder.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/archive/struct.Types.html b/ba2/tes4/archive/struct.Types.html new file mode 100644 index 0000000..58ad9e1 --- /dev/null +++ b/ba2/tes4/archive/struct.Types.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.ArchiveTypes.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.ArchiveTypes.html">../../../ba2/tes4/struct.ArchiveTypes.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.ArchiveTypes.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/directory/struct.Directory.html b/ba2/tes4/directory/struct.Directory.html new file mode 100644 index 0000000..ba985d5 --- /dev/null +++ b/ba2/tes4/directory/struct.Directory.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.Directory.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.Directory.html">../../../ba2/tes4/struct.Directory.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.Directory.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/directory/struct.Key.html b/ba2/tes4/directory/struct.Key.html new file mode 100644 index 0000000..ebd7a39 --- /dev/null +++ b/ba2/tes4/directory/struct.Key.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.DirectoryKey.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.DirectoryKey.html">../../../ba2/tes4/struct.DirectoryKey.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.DirectoryKey.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/enum.CompressionCodec.html b/ba2/tes4/enum.CompressionCodec.html new file mode 100644 index 0000000..51a1fc0 --- /dev/null +++ b/ba2/tes4/enum.CompressionCodec.html @@ -0,0 +1,19 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Specifies the codec to use when performing compression/decompression actions on files."><title>CompressionCodec in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">CompressionCodec</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Normal">Normal</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-CompressionCodec">Clone</a></li><li><a href="#impl-Copy-for-CompressionCodec">Copy</a></li><li><a href="#impl-Debug-for-CompressionCodec">Debug</a></li><li><a href="#impl-Default-for-CompressionCodec">Default</a></li><li><a href="#impl-Eq-for-CompressionCodec">Eq</a></li><li><a href="#impl-PartialEq-for-CompressionCodec">PartialEq</a></li><li><a href="#impl-StructuralPartialEq-for-CompressionCodec">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CompressionCodec">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CompressionCodec">Send</a></li><li><a href="#impl-Sync-for-CompressionCodec">Sync</a></li><li><a href="#impl-Unpin-for-CompressionCodec">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CompressionCodec">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="enum" href="#">CompressionCodec</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/mod.rs.html#140-145">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code><div class="code-attribute">#[non_exhaustive]</div>pub enum CompressionCodec { + Normal, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Specifies the codec to use when performing compression/decompression actions on files.</p> +</div></details><h2 id="variants" class="variants section-header">Variants (Non-exhaustive)<a href="#variants" class="anchor">§</a></h2><details class="toggle non-exhaustive"><summary class="hideme"><span>This enum is marked as non-exhaustive</span></summary><div class="docblock">Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.</div></details><div class="variants"><section id="variant.Normal" class="variant"><a href="#variant.Normal" class="anchor">§</a><h3 class="code-header">Normal</h3></section><div class="docblock"><p>The default compression codec.</p> +</div></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-CompressionCodec" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#impl-Clone-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CompressionCodec" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#impl-Debug-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-CompressionCodec" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#impl-Default-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-CompressionCodec" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#impl-PartialEq-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><section id="impl-Copy-for-CompressionCodec" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#impl-Copy-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section><section id="impl-Eq-for-CompressionCodec" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#impl-Eq-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section><section id="impl-StructuralPartialEq-for-CompressionCodec" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#139">source</a><a href="#impl-StructuralPartialEq-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CompressionCodec" class="impl"><a href="#impl-RefUnwindSafe-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section><section id="impl-Send-for-CompressionCodec" class="impl"><a href="#impl-Send-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section><section id="impl-Sync-for-CompressionCodec" class="impl"><a href="#impl-Sync-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section><section id="impl-Unpin-for-CompressionCodec" class="impl"><a href="#impl-Unpin-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section><section id="impl-UnwindSafe-for-CompressionCodec" class="impl"><a href="#impl-UnwindSafe-for-CompressionCodec" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/enum.Error.html b/ba2/tes4/enum.Error.html new file mode 100644 index 0000000..710e3f1 --- /dev/null +++ b/ba2/tes4/enum.Error.html @@ -0,0 +1,27 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Error` enum in crate `ba2`."><title>Error in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Error</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.AlreadyCompressed">AlreadyCompressed</a></li><li><a href="#variant.AlreadyDecompressed">AlreadyDecompressed</a></li><li><a href="#variant.DecompressionSizeMismatch">DecompressionSizeMismatch</a></li><li><a href="#variant.IntegralOverflow">IntegralOverflow</a></li><li><a href="#variant.IntegralTruncation">IntegralTruncation</a></li><li><a href="#variant.InvalidHeaderSize">InvalidHeaderSize</a></li><li><a href="#variant.InvalidMagic">InvalidMagic</a></li><li><a href="#variant.InvalidVersion">InvalidVersion</a></li><li><a href="#variant.Io">Io</a></li><li><a href="#variant.LZ4">LZ4</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-Error">Debug</a></li><li><a href="#impl-Display-for-Error">Display</a></li><li><a href="#impl-Error-for-Error">Error</a></li><li><a href="#impl-From%3CError%3E-for-Error">From<Error></a></li><li><a href="#impl-From%3CError%3E-for-Error-1">From<Error></a></li><li><a href="#impl-From%3CTryFromIntError%3E-for-Error">From<TryFromIntError></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Error">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-Error">!UnwindSafe</a></li><li><a href="#impl-Send-for-Error">Send</a></li><li><a href="#impl-Sync-for-Error">Sync</a></li><li><a href="#impl-Unpin-for-Error">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToString-for-T">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="enum" href="#">Error</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/mod.rs.html#97-127">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code><div class="code-attribute">#[non_exhaustive]</div>pub enum Error { + AlreadyCompressed, + AlreadyDecompressed, + DecompressionSizeMismatch { + expected: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + actual: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + }, + IntegralOverflow, + IntegralTruncation, + InvalidHeaderSize(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>), + InvalidMagic(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>), + InvalidVersion(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>), + Io(<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>), + LZ4(Error), +}</code></pre><h2 id="variants" class="variants section-header">Variants (Non-exhaustive)<a href="#variants" class="anchor">§</a></h2><details class="toggle non-exhaustive"><summary class="hideme"><span>This enum is marked as non-exhaustive</span></summary><div class="docblock">Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.</div></details><div class="variants"><section id="variant.AlreadyCompressed" class="variant"><a href="#variant.AlreadyCompressed" class="anchor">§</a><h3 class="code-header">AlreadyCompressed</h3></section><section id="variant.AlreadyDecompressed" class="variant"><a href="#variant.AlreadyDecompressed" class="anchor">§</a><h3 class="code-header">AlreadyDecompressed</h3></section><section id="variant.DecompressionSizeMismatch" class="variant"><a href="#variant.DecompressionSizeMismatch" class="anchor">§</a><h3 class="code-header">DecompressionSizeMismatch</h3></section><div class="sub-variant" id="variant.DecompressionSizeMismatch.fields"><h4>Fields</h4><div class="sub-variant-field"><span id="variant.DecompressionSizeMismatch.field.expected" class="section-header"><a href="#variant.DecompressionSizeMismatch.field.expected" class="anchor field">§</a><code>expected: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></code></span></div><div class="sub-variant-field"><span id="variant.DecompressionSizeMismatch.field.actual" class="section-header"><a href="#variant.DecompressionSizeMismatch.field.actual" class="anchor field">§</a><code>actual: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></code></span></div></div><section id="variant.IntegralOverflow" class="variant"><a href="#variant.IntegralOverflow" class="anchor">§</a><h3 class="code-header">IntegralOverflow</h3></section><section id="variant.IntegralTruncation" class="variant"><a href="#variant.IntegralTruncation" class="anchor">§</a><h3 class="code-header">IntegralTruncation</h3></section><section id="variant.InvalidHeaderSize" class="variant"><a href="#variant.InvalidHeaderSize" class="anchor">§</a><h3 class="code-header">InvalidHeaderSize(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>)</h3></section><section id="variant.InvalidMagic" class="variant"><a href="#variant.InvalidMagic" class="anchor">§</a><h3 class="code-header">InvalidMagic(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>)</h3></section><section id="variant.InvalidVersion" class="variant"><a href="#variant.InvalidVersion" class="anchor">§</a><h3 class="code-header">InvalidVersion(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>)</h3></section><section id="variant.Io" class="variant"><a href="#variant.Io" class="anchor">§</a><h3 class="code-header">Io(<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>)</h3></section><section id="variant.LZ4" class="variant"><a href="#variant.LZ4" class="anchor">§</a><h3 class="code-header">LZ4(Error)</h3></section></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#impl-Debug-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#impl-Display-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&self, __formatter: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Error-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#impl-Error-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.source" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#method.source" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.source" class="fn">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)></h4></section></summary><div class='docblock'>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.source">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.description" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#110">source</a></span><a href="#method.description" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.description" class="fn">description</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.42.0: use the Display impl or to_string()</span></div></span><div class='docblock'> <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.description">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.cause" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#120">source</a></span><a href="#method.cause" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.cause" class="fn">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>></h4></section></summary><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 1.33.0: replaced by Error::source, which can support downcasting</span></div></span></details><details class="toggle method-toggle" open><summary><section id="method.provide" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/error.rs.html#184">source</a><a href="#method.provide" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.provide" class="fn">provide</a><'a>(&'a self, request: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/error/struct.Request.html" title="struct core::error::Request">Request</a><'a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>error_generic_member_access</code>)</span></div></span><div class='docblock'>Provides type based access to context intended for error reports. <a href="https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html#method.provide">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CError%3E-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#impl-From%3CError%3E-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(source: <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CError%3E-for-Error-1" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#impl-From%3CError%3E-for-Error-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><Error> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#96">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(source: Error) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CTryFromIntError%3E-for-Error" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#129-133">source</a><a href="#impl-From%3CTryFromIntError%3E-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html" title="struct core::num::error::TryFromIntError">TryFromIntError</a>> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#130-132">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(_: <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html" title="struct core::num::error::TryFromIntError">TryFromIntError</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Error" class="impl"><a href="#impl-RefUnwindSafe-for-Error" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section><section id="impl-Send-for-Error" class="impl"><a href="#impl-Send-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section><section id="impl-Sync-for-Error" class="impl"><a href="#impl-Sync-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section><section id="impl-Unpin-for-Error" class="impl"><a href="#impl-Unpin-for-Error" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section><section id="impl-UnwindSafe-for-Error" class="impl"><a href="#impl-UnwindSafe-for-Error" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2600">source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/string.rs.html#2606">source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.77.0/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/enum.Version.html b/ba2/tes4/enum.Version.html new file mode 100644 index 0000000..6ad62d4 --- /dev/null +++ b/ba2/tes4/enum.Version.html @@ -0,0 +1,31 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The archive version."><title>Version in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Version</a></h2><div class="sidebar-elems"><section><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.v103">v103</a></li><li><a href="#variant.v104">v104</a></li><li><a href="#variant.v105">v105</a></li></ul><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.FNV">FNV</a></li><li><a href="#associatedconstant.FO3">FO3</a></li><li><a href="#associatedconstant.SSE">SSE</a></li><li><a href="#associatedconstant.TES4">TES4</a></li><li><a href="#associatedconstant.TES5">TES5</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Version">Clone</a></li><li><a href="#impl-Copy-for-Version">Copy</a></li><li><a href="#impl-Debug-for-Version">Debug</a></li><li><a href="#impl-Default-for-Version">Default</a></li><li><a href="#impl-Eq-for-Version">Eq</a></li><li><a href="#impl-Ord-for-Version">Ord</a></li><li><a href="#impl-PartialEq-for-Version">PartialEq</a></li><li><a href="#impl-PartialOrd-for-Version">PartialOrd</a></li><li><a href="#impl-StructuralPartialEq-for-Version">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Version">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Version">Send</a></li><li><a href="#impl-Sync-for-Version">Sync</a></li><li><a href="#impl-Unpin-for-Version">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Version">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Enum <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="enum" href="#">Version</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/mod.rs.html#152-157">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub enum Version { + v103 = 103, + v104 = 104, + v105 = 105, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The archive version.</p> +<p>Each version has an impact on the abi of the TES4 archive file format.</p> +</div></details><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.v103" class="variant"><a href="#variant.v103" class="anchor">§</a><h3 class="code-header">v103 = 103</h3></section><section id="variant.v104" class="variant"><a href="#variant.v104" class="anchor">§</a><h3 class="code-header">v104 = 104</h3></section><section id="variant.v105" class="variant"><a href="#variant.v105" class="anchor">§</a><h3 class="code-header">v105 = 105</h3></section></div><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#159-170">source</a><a href="#impl-Version" class="anchor">§</a><h3 class="code-header">impl <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.TES4" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#161">source</a><h4 class="code-header">pub const <a href="#associatedconstant.TES4" class="constant">TES4</a>: Self = Self::v103</h4></section></summary><div class="docblock"><p>The Elder Scrolls IV: Oblivion.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.FO3" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#163">source</a><h4 class="code-header">pub const <a href="#associatedconstant.FO3" class="constant">FO3</a>: Self = Self::v104</h4></section></summary><div class="docblock"><p>Fallout 3.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.FNV" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#165">source</a><h4 class="code-header">pub const <a href="#associatedconstant.FNV" class="constant">FNV</a>: Self = Self::v104</h4></section></summary><div class="docblock"><p>Fallout: New Vegas.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.TES5" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#167">source</a><h4 class="code-header">pub const <a href="#associatedconstant.TES5" class="constant">TES5</a>: Self = Self::v104</h4></section></summary><div class="docblock"><p>The Elder Scrolls V: Skyrim.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.SSE" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#169">source</a><h4 class="code-header">pub const <a href="#associatedconstant.SSE" class="constant">SSE</a>: Self = Self::v105</h4></section></summary><div class="docblock"><p>The Elder Scrolls V: Skyrim - Special Edition.</p> +</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-Clone-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-Debug-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-Default-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-Ord-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-PartialEq-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-PartialOrd-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-Copy-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section><section id="impl-Eq-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-Eq-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section><section id="impl-StructuralPartialEq-for-Version" class="impl"><a class="src rightside" href="../../src/ba2/tes4/mod.rs.html#151">source</a><a href="#impl-StructuralPartialEq-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Version" class="impl"><a href="#impl-RefUnwindSafe-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section><section id="impl-Send-for-Version" class="impl"><a href="#impl-Send-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section><section id="impl-Sync-for-Version" class="impl"><a href="#impl-Sync-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section><section id="impl-Unpin-for-Version" class="impl"><a href="#impl-Unpin-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section><section id="impl-UnwindSafe-for-Version" class="impl"><a href="#impl-UnwindSafe-for-Version" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/file/struct.CompressionOptions.html b/ba2/tes4/file/struct.CompressionOptions.html new file mode 100644 index 0000000..0953b95 --- /dev/null +++ b/ba2/tes4/file/struct.CompressionOptions.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.FileCompressionOptions.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.FileCompressionOptions.html">../../../ba2/tes4/struct.FileCompressionOptions.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.FileCompressionOptions.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/file/struct.CompressionOptionsBuilder.html b/ba2/tes4/file/struct.CompressionOptionsBuilder.html new file mode 100644 index 0000000..0d8938f --- /dev/null +++ b/ba2/tes4/file/struct.CompressionOptionsBuilder.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.FileCompressionOptionsBuilder.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.FileCompressionOptionsBuilder.html">../../../ba2/tes4/struct.FileCompressionOptionsBuilder.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.FileCompressionOptionsBuilder.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/file/struct.File.html b/ba2/tes4/file/struct.File.html new file mode 100644 index 0000000..d50ce37 --- /dev/null +++ b/ba2/tes4/file/struct.File.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.File.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.File.html">../../../ba2/tes4/struct.File.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.File.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/file/struct.ReadOptions.html b/ba2/tes4/file/struct.ReadOptions.html new file mode 100644 index 0000000..ab3b3ac --- /dev/null +++ b/ba2/tes4/file/struct.ReadOptions.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.FileReadOptions.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.FileReadOptions.html">../../../ba2/tes4/struct.FileReadOptions.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.FileReadOptions.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/file/struct.ReadOptionsBuilder.html b/ba2/tes4/file/struct.ReadOptionsBuilder.html new file mode 100644 index 0000000..40f22b5 --- /dev/null +++ b/ba2/tes4/file/struct.ReadOptionsBuilder.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.FileReadOptionsBuilder.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.FileReadOptionsBuilder.html">../../../ba2/tes4/struct.FileReadOptionsBuilder.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.FileReadOptionsBuilder.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/fn.hash_directory.html b/ba2/tes4/fn.hash_directory.html new file mode 100644 index 0000000..030c26d --- /dev/null +++ b/ba2/tes4/fn.hash_directory.html @@ -0,0 +1,3 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Produces a hash using the given path."><title>hash_directory in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="fn" href="#">hash_directory</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/hashing.rs.html#70-73">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn hash_directory(path: &<a class="struct" href="../struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> (<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>, <a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Produces a hash using the given path.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/fn.hash_directory_in_place.html b/ba2/tes4/fn.hash_directory_in_place.html new file mode 100644 index 0000000..1b7906b --- /dev/null +++ b/ba2/tes4/fn.hash_directory_in_place.html @@ -0,0 +1,4 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Produces a hash using the given path."><title>hash_directory_in_place in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="fn" href="#">hash_directory_in_place</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/hashing.rs.html#79-103">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn hash_directory_in_place(path: &mut <a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Produces a hash using the given path.</p> +<p>The path is normalized in place. After the function returns, the path contains the string that would be stored on disk.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/fn.hash_file.html b/ba2/tes4/fn.hash_file.html new file mode 100644 index 0000000..dcf5453 --- /dev/null +++ b/ba2/tes4/fn.hash_file.html @@ -0,0 +1,3 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Produces a hash using the given path."><title>hash_file in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="fn" href="#">hash_file</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/hashing.rs.html#107-110">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn hash_file(path: &<a class="struct" href="../struct.BStr.html" title="struct ba2::BStr">BStr</a>) -> (<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>, <a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Produces a hash using the given path.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/fn.hash_file_in_place.html b/ba2/tes4/fn.hash_file_in_place.html new file mode 100644 index 0000000..4bb0a6a --- /dev/null +++ b/ba2/tes4/fn.hash_file_in_place.html @@ -0,0 +1,4 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Produces a hash using the given path."><title>hash_file_in_place in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="fn" href="#">hash_file_in_place</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/hashing.rs.html#116-156">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn hash_file_in_place(path: &mut <a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>) -> <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Produces a hash using the given path.</p> +<p>The path is normalized in place. After the function returns, the path contains the string that would be stored on disk.</p> +</div></details></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/hashing/fn.hash_directory.html b/ba2/tes4/hashing/fn.hash_directory.html new file mode 100644 index 0000000..952d467 --- /dev/null +++ b/ba2/tes4/hashing/fn.hash_directory.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/fn.hash_directory.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/fn.hash_directory.html">../../../ba2/tes4/fn.hash_directory.html</a>...</p> + <script>location.replace("../../../ba2/tes4/fn.hash_directory.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/hashing/fn.hash_directory_in_place.html b/ba2/tes4/hashing/fn.hash_directory_in_place.html new file mode 100644 index 0000000..a2bef63 --- /dev/null +++ b/ba2/tes4/hashing/fn.hash_directory_in_place.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/fn.hash_directory_in_place.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/fn.hash_directory_in_place.html">../../../ba2/tes4/fn.hash_directory_in_place.html</a>...</p> + <script>location.replace("../../../ba2/tes4/fn.hash_directory_in_place.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/hashing/fn.hash_file.html b/ba2/tes4/hashing/fn.hash_file.html new file mode 100644 index 0000000..e0616a3 --- /dev/null +++ b/ba2/tes4/hashing/fn.hash_file.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/fn.hash_file.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/fn.hash_file.html">../../../ba2/tes4/fn.hash_file.html</a>...</p> + <script>location.replace("../../../ba2/tes4/fn.hash_file.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/hashing/fn.hash_file_in_place.html b/ba2/tes4/hashing/fn.hash_file_in_place.html new file mode 100644 index 0000000..d2bb6a9 --- /dev/null +++ b/ba2/tes4/hashing/fn.hash_file_in_place.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/fn.hash_file_in_place.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/fn.hash_file_in_place.html">../../../ba2/tes4/fn.hash_file_in_place.html</a>...</p> + <script>location.replace("../../../ba2/tes4/fn.hash_file_in_place.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/hashing/struct.DirectoryHash.html b/ba2/tes4/hashing/struct.DirectoryHash.html new file mode 100644 index 0000000..26fcfde --- /dev/null +++ b/ba2/tes4/hashing/struct.DirectoryHash.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.DirectoryHash.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.DirectoryHash.html">../../../ba2/tes4/struct.DirectoryHash.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.DirectoryHash.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/hashing/struct.FileHash.html b/ba2/tes4/hashing/struct.FileHash.html new file mode 100644 index 0000000..aeff3e2 --- /dev/null +++ b/ba2/tes4/hashing/struct.FileHash.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.FileHash.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.FileHash.html">../../../ba2/tes4/struct.FileHash.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.FileHash.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/hashing/struct.Hash.html b/ba2/tes4/hashing/struct.Hash.html new file mode 100644 index 0000000..7154b90 --- /dev/null +++ b/ba2/tes4/hashing/struct.Hash.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="refresh" content="0;URL=../../../ba2/tes4/struct.Hash.html"> + <title>Redirection</title> +</head> +<body> + <p>Redirecting to <a href="../../../ba2/tes4/struct.Hash.html">../../../ba2/tes4/struct.Hash.html</a>...</p> + <script>location.replace("../../../ba2/tes4/struct.Hash.html" + location.search + location.hash);</script> +</body> +</html> \ No newline at end of file diff --git a/ba2/tes4/index.html b/ba2/tes4/index.html new file mode 100644 index 0000000..0fdd238 --- /dev/null +++ b/ba2/tes4/index.html @@ -0,0 +1,50 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="TES IV: Oblivion"><title>ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Module tes4</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Aliases</a></li></ul></section><h2><a href="../index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">ba2</a>::<wbr><a class="mod" href="#">tes4</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/mod.rs.html#1-170">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>TES IV: Oblivion</p> +<p><em>“You … I’ve seen you… Let me see your face… You are the one from my dreams… Then the stars were right, and this is the day. Gods give me strength.”</em></p> +<p>This format debuted with Oblivion and sunset with Skyrim: SSE. This is the first format to introduce compression, and primarily utilizes zlib/lz4 for this purpose. Unlike other formats, <a href="index.html" title="mod ba2::tes4"><code>tes4</code></a> utilizes a split architecture where files and directories are tracked as separate paths, rather than combined.</p> +<h2 id="reading"><a class="doc-anchor" href="#reading">§</a>Reading</h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::{ + prelude::<span class="kw-2">*</span>, + tes4::{Archive, ArchiveKey, DirectoryKey, FileCompressionOptions}, +}; +<span class="kw">use </span>std::{fs, path::Path}; + +<span class="kw">fn </span>example() -> <span class="prelude-ty">Option</span><()> { + <span class="kw">let </span>path = Path::new(<span class="string">"path/to/oblivion/Data/Oblivion - Voices2.bsa"</span>); + <span class="kw">let </span>(archive, meta) = Archive::read(path).ok()<span class="question-mark">?</span>; + <span class="kw">let </span>file = archive + .get(<span class="kw-2">&</span>ArchiveKey::from(<span class="string">b"sound/voice/oblivion.esm/imperial/m"</span>))<span class="question-mark">? + </span>.get(<span class="kw-2">&</span>DirectoryKey::from( + <span class="string">b"testtoddquest_testtoddhappy_00027fa2_1.mp3"</span>, + ))<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>dst = fs::File::create(<span class="string">"happy.mp3"</span>).ok()<span class="question-mark">?</span>; + <span class="kw">let </span>options: FileCompressionOptions = meta.into(); + file.write(<span class="kw-2">&mut </span>dst, <span class="kw-2">&</span>options).ok()<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(()) +}</code></pre></div> +<h2 id="writing"><a class="doc-anchor" href="#writing">§</a>Writing</h2> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::{ + prelude::<span class="kw-2">*</span>, + tes4::{ + Archive, ArchiveKey, ArchiveOptions, ArchiveTypes, Directory, DirectoryKey, File, Version, + }, +}; +<span class="kw">use </span>std::fs; + +<span class="kw">fn </span>example() -> <span class="prelude-ty">Option</span><()> { + <span class="kw">let </span>file = File::from_decompressed(<span class="string">b"Hello world!\n"</span>); + <span class="kw">let </span>directory: Directory = [(DirectoryKey::from(<span class="string">b"hello.txt"</span>), file)] + .into_iter() + .collect(); + <span class="kw">let </span>archive: Archive = [(ArchiveKey::from(<span class="string">b"misc"</span>), directory)] + .into_iter() + .collect(); + <span class="kw">let </span><span class="kw-2">mut </span>dst = fs::File::create(<span class="string">"example.bsa"</span>).ok()<span class="question-mark">?</span>; + <span class="kw">let </span>options = ArchiveOptions::builder() + .types(ArchiveTypes::MISC) + .version(Version::SSE) + .build(); + archive.write(<span class="kw-2">&mut </span>dst, <span class="kw-2">&</span>options).ok()<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(()) +}</code></pre></div> +</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a></div><div class="desc docblock-short">Represents the TES4 revision of the bsa format.</div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">ArchiveFlags</a></div><div class="desc docblock-short">Archive flags can impact the layout of an archive, or how it is read.</div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">ArchiveKey</a></div><div class="desc docblock-short">A key for indexing into the relevant mapping.</div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a></div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">ArchiveOptionsBuilder</a></div><div class="desc docblock-short">See also <a href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions"><code>ArchiveOptions</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">ArchiveTypes</a></div><div class="desc docblock-short">Specifies file types contained within an archive.</div></li><li><div class="item-name"><a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a></div><div class="desc docblock-short">Represents a directory within the TES4 virtual filesystem.</div></li><li><div class="item-name"><a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></div><div class="desc docblock-short">See also <a href="struct.Hash.html" title="struct ba2::tes4::Hash"><code>Hash</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">DirectoryKey</a></div><div class="desc docblock-short">A key for indexing into the relevant mapping.</div></li><li><div class="item-name"><a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a></div><div class="desc docblock-short">Represents a file within the TES4 virtual filesystem.</div></li><li><div class="item-name"><a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">FileCompressionOptions</a></div><div class="desc docblock-short">Common parameters to configure how files are compressed/decompressed.</div></li><li><div class="item-name"><a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">FileCompressionOptionsBuilder</a></div><div class="desc docblock-short">See also <a href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions"><code>FileCompressionOptions</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></div><div class="desc docblock-short">See also <a href="struct.Hash.html" title="struct ba2::tes4::Hash"><code>Hash</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">FileReadOptions</a></div><div class="desc docblock-short">Common parameters to configure how files are read.</div></li><li><div class="item-name"><a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">FileReadOptionsBuilder</a></div><div class="desc docblock-short">See also <a href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions"><code>FileReadOptions</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></div><div class="desc docblock-short">The underlying hash object used to uniquely identify objects within the archive.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></div><div class="desc docblock-short">Specifies the codec to use when performing compression/decompression actions on files.</div></li><li><div class="item-name"><a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></div></li><li><div class="item-name"><a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></div><div class="desc docblock-short">The archive version.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.hash_directory.html" title="fn ba2::tes4::hash_directory">hash_directory</a></div><div class="desc docblock-short">Produces a hash using the given path.</div></li><li><div class="item-name"><a class="fn" href="fn.hash_directory_in_place.html" title="fn ba2::tes4::hash_directory_in_place">hash_directory_in_place</a></div><div class="desc docblock-short">Produces a hash using the given path.</div></li><li><div class="item-name"><a class="fn" href="fn.hash_file.html" title="fn ba2::tes4::hash_file">hash_file</a></div><div class="desc docblock-short">Produces a hash using the given path.</div></li><li><div class="item-name"><a class="fn" href="fn.hash_file_in_place.html" title="fn ba2::tes4::hash_file_in_place">hash_file_in_place</a></div><div class="desc docblock-short">Produces a hash using the given path.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a></div></li></ul></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/sidebar-items.js b/ba2/tes4/sidebar-items.js new file mode 100644 index 0000000..3ac7bfd --- /dev/null +++ b/ba2/tes4/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["CompressionCodec","Error","Version"],"fn":["hash_directory","hash_directory_in_place","hash_file","hash_file_in_place"],"struct":["Archive","ArchiveFlags","ArchiveKey","ArchiveOptions","ArchiveOptionsBuilder","ArchiveTypes","Directory","DirectoryHash","DirectoryKey","File","FileCompressionOptions","FileCompressionOptionsBuilder","FileHash","FileReadOptions","FileReadOptionsBuilder","Hash"],"type":["Result"]}; \ No newline at end of file diff --git a/ba2/tes4/struct.Archive.html b/ba2/tes4/struct.Archive.html new file mode 100644 index 0000000..9843db1 --- /dev/null +++ b/ba2/tes4/struct.Archive.html @@ -0,0 +1,34 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents the TES4 revision of the bsa format."><title>Archive in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Archive</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.clear">clear</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_key_value">get_key_value</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.keys">keys</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.remove_entry">remove_entry</a></li><li><a href="#method.values">values</a></li><li><a href="#method.values_mut">values_mut</a></li><li><a href="#method.write">write</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Archive%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-Archive%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Archive%3C'bytes%3E">Default</a></li><li><a href="#impl-FromIterator%3C(Key%3C'bytes%3E,+Directory%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E">FromIterator<(Key<'bytes>, Directory<'bytes>)></a></li><li><a href="#impl-IntoIterator-for-%26Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-Archive%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E">Reader<&File></a></li><li><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E">Reader<&Path></a></li><li><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E">Reader<Borrowed<'bytes>></a></li><li><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E">Reader<Copied<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Archive%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Archive%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Archive%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Archive%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Archive%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">Archive</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Archive<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents the TES4 revision of the bsa format.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.clear" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&mut self)</h4></section><section id="method.get" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a><K>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>>,</div></h4></section><section id="method.get_key_value" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.get_key_value" class="fn">get_key_value</a><K>( + &self, + key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, &<a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>)><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>>,</div></h4></section><section id="method.get_mut" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a><K>(&mut self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>>,</div></h4></section><section id="method.insert" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a><K>( + &mut self, + key: K, + value: <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>>,</div></h4></section><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.iter" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, &<a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>)></h4></section><section id="method.iter_mut" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>( + &mut self +) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (&<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, &mut <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>)></h4></section><section id="method.keys" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.keys" class="fn">keys</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>></h4></section><section id="method.len" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.remove" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a><K>(&mut self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>>,</div></h4></section><section id="method.remove_entry" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.remove_entry" class="fn">remove_entry</a><K>( + &mut self, + key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>)><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>>,</div></h4></section><section id="method.values" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.values" class="fn">values</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>></h4></section><section id="method.values_mut" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><h4 class="code-header">pub fn <a href="#method.values_mut" class="fn">values_mut</a>(&mut self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &mut <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Archive%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#372-903">source</a><a href="#impl-Archive%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.write" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#373-434">source</a><h4 class="code-header">pub fn <a href="#method.write" class="fn">write</a><Out>(&self, stream: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut Out</a>, options: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>><div class="where">where + Out: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,</div></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Clone-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Debug-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Default-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C(Key%3C'bytes%3E,+Directory%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-FromIterator%3C(Key%3C'bytes%3E,+Directory%3C'bytes%3E)%3E-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><(<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>)> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> Self<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = (<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>)>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-IntoIterator-for-%26Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-6" class="associatedtype trait-impl"><a href="#associatedtype.Item-6" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-2" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.into_iter-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-IntoIterator-for-%26mut+Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this mut <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-IntoIterator-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes>, <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.into_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3C%26File%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-5" class="associatedtype trait-impl"><a href="#associatedtype.Item-5" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static>, <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.read-3" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static>, <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-4" class="associatedtype trait-impl"><a href="#associatedtype.Item-4" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes>, <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.read-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.Reader.html#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static>, <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.read-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#method.read-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.Reader.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="../trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section><section id="impl-Send-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section><section id="impl-Sync-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section><section id="impl-Unpin-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Archive%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.ArchiveFlags.html b/ba2/tes4/struct.ArchiveFlags.html new file mode 100644 index 0000000..d068128 --- /dev/null +++ b/ba2/tes4/struct.ArchiveFlags.html @@ -0,0 +1,95 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Archive flags can impact the layout of an archive, or how it is read."><title>ArchiveFlags in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveFlags</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.COMPRESSED">COMPRESSED</a></li><li><a href="#associatedconstant.DIRECTORY_STRINGS">DIRECTORY_STRINGS</a></li><li><a href="#associatedconstant.EMBEDDED_FILE_NAMES">EMBEDDED_FILE_NAMES</a></li><li><a href="#associatedconstant.FILE_STRINGS">FILE_STRINGS</a></li><li><a href="#associatedconstant.RETAIN_DIRECTORY_NAMES">RETAIN_DIRECTORY_NAMES</a></li><li><a href="#associatedconstant.RETAIN_FILE_NAMES">RETAIN_FILE_NAMES</a></li><li><a href="#associatedconstant.RETAIN_FILE_NAME_OFFSETS">RETAIN_FILE_NAME_OFFSETS</a></li><li><a href="#associatedconstant.RETAIN_STRINGS_DURING_STARTUP">RETAIN_STRINGS_DURING_STARTUP</a></li><li><a href="#associatedconstant.XBOX_ARCHIVE">XBOX_ARCHIVE</a></li><li><a href="#associatedconstant.XBOX_COMPRESSED">XBOX_COMPRESSED</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.all">all</a></li><li><a href="#method.bits">bits</a></li><li><a href="#method.complement">complement</a></li><li><a href="#method.compressed">compressed</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.difference">difference</a></li><li><a href="#method.directory_strings">directory_strings</a></li><li><a href="#method.embedded_file_names">embedded_file_names</a></li><li><a href="#method.empty">empty</a></li><li><a href="#method.file_strings">file_strings</a></li><li><a href="#method.from_bits">from_bits</a></li><li><a href="#method.from_bits_retain">from_bits_retain</a></li><li><a href="#method.from_bits_truncate">from_bits_truncate</a></li><li><a href="#method.from_name">from_name</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.intersection">intersection</a></li><li><a href="#method.intersects">intersects</a></li><li><a href="#method.is_all">is_all</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_names">iter_names</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.retain_directory_names">retain_directory_names</a></li><li><a href="#method.retain_file_name_offsets">retain_file_name_offsets</a></li><li><a href="#method.retain_file_names">retain_file_names</a></li><li><a href="#method.retain_strings_during_startup">retain_strings_during_startup</a></li><li><a href="#method.set">set</a></li><li><a href="#method.symmetric_difference">symmetric_difference</a></li><li><a href="#method.toggle">toggle</a></li><li><a href="#method.union">union</a></li><li><a href="#method.xbox_archive">xbox_archive</a></li><li><a href="#method.xbox_compressed">xbox_compressed</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Binary-for-Flags">Binary</a></li><li><a href="#impl-BitAnd-for-Flags">BitAnd</a></li><li><a href="#impl-BitAndAssign-for-Flags">BitAndAssign</a></li><li><a href="#impl-BitOr-for-Flags">BitOr</a></li><li><a href="#impl-BitOrAssign-for-Flags">BitOrAssign</a></li><li><a href="#impl-BitXor-for-Flags">BitXor</a></li><li><a href="#impl-BitXorAssign-for-Flags">BitXorAssign</a></li><li><a href="#impl-Clone-for-Flags">Clone</a></li><li><a href="#impl-Copy-for-Flags">Copy</a></li><li><a href="#impl-Debug-for-Flags">Debug</a></li><li><a href="#impl-Default-for-Flags">Default</a></li><li><a href="#impl-Eq-for-Flags">Eq</a></li><li><a href="#impl-Extend%3CFlags%3E-for-Flags">Extend<Flags></a></li><li><a href="#impl-Flags-for-Flags">Flags</a></li><li><a href="#impl-FromIterator%3CFlags%3E-for-Flags">FromIterator<Flags></a></li><li><a href="#impl-IntoIterator-for-Flags">IntoIterator</a></li><li><a href="#impl-LowerHex-for-Flags">LowerHex</a></li><li><a href="#impl-Not-for-Flags">Not</a></li><li><a href="#impl-Octal-for-Flags">Octal</a></li><li><a href="#impl-PartialEq-for-Flags">PartialEq</a></li><li><a href="#impl-PublicFlags-for-Flags">PublicFlags</a></li><li><a href="#impl-StructuralPartialEq-for-Flags">StructuralPartialEq</a></li><li><a href="#impl-Sub-for-Flags">Sub</a></li><li><a href="#impl-SubAssign-for-Flags">SubAssign</a></li><li><a href="#impl-UpperHex-for-Flags">UpperHex</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Flags">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Flags">Send</a></li><li><a href="#impl-Sync-for-Flags">Sync</a></li><li><a href="#impl-Unpin-for-Flags">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Flags">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">ArchiveFlags</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveFlags(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Archive flags can impact the layout of an archive, or how it is read.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.DIRECTORY_STRINGS" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.DIRECTORY_STRINGS" class="constant">DIRECTORY_STRINGS</a>: Self = _</h4></section></summary><div class="docblock"><p>Includes directory paths within the archive.</p> +<p><code>archive.exe</code> does not let you write archives without this flag set.</p> +<p>This includes only the parent path of all files, and not filenames.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.FILE_STRINGS" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.FILE_STRINGS" class="constant">FILE_STRINGS</a>: Self = _</h4></section></summary><div class="docblock"><p>Includes filenames within the archive.</p> +<p><code>archive.exe</code> does not let you write archives without this flag set.</p> +<p>This includes only the filename of all files, and not the parent path.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.COMPRESSED" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.COMPRESSED" class="constant">COMPRESSED</a>: Self = _</h4></section></summary><div class="docblock"><p>Compresses the data within the archive.</p> +<ul> +<li>The v103 format uses zlib.</li> +<li>The v104 format uses xmem and zlib.</li> +<li>The v105 format uses lz4.</li> +</ul> +</div></details><details class="toggle" open><summary><section id="associatedconstant.RETAIN_DIRECTORY_NAMES" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.RETAIN_DIRECTORY_NAMES" class="constant">RETAIN_DIRECTORY_NAMES</a>: Self = _</h4></section></summary><div class="docblock"><p>Impacts runtime parsing.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.RETAIN_FILE_NAMES" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.RETAIN_FILE_NAMES" class="constant">RETAIN_FILE_NAMES</a>: Self = _</h4></section></summary><div class="docblock"><p>Impacts runtime parsing.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.RETAIN_FILE_NAME_OFFSETS" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.RETAIN_FILE_NAME_OFFSETS" class="constant">RETAIN_FILE_NAME_OFFSETS</a>: Self = _</h4></section></summary><div class="docblock"><p>Impacts runtime parsing.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.XBOX_ARCHIVE" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.XBOX_ARCHIVE" class="constant">XBOX_ARCHIVE</a>: Self = _</h4></section></summary><div class="docblock"><p>Writes the archive in the xbox (big-endian) format.</p> +<p>This flag affects the sort order of files on disk.</p> +<p>Only the crc hash is actually written in big-endian format.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.RETAIN_STRINGS_DURING_STARTUP" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.RETAIN_STRINGS_DURING_STARTUP" class="constant">RETAIN_STRINGS_DURING_STARTUP</a>: Self = _</h4></section></summary><div class="docblock"><p>Impacts runtime parsing.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.EMBEDDED_FILE_NAMES" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.EMBEDDED_FILE_NAMES" class="constant">EMBEDDED_FILE_NAMES</a>: Self = _</h4></section></summary><div class="docblock"><p>Writes the full (virtual) path of a file next to the data blob.</p> +<p>This flag has a different meaning in the v103 format.</p> +</div></details><details class="toggle" open><summary><section id="associatedconstant.XBOX_COMPRESSED" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const <a href="#associatedconstant.XBOX_COMPRESSED" class="constant">XBOX_COMPRESSED</a>: Self = _</h4></section></summary><div class="docblock"><p>Uses the xmem codec from XNA 4.0 to compress the archive.</p> +<p>This flag requires <a href="struct.ArchiveFlags.html#method.compressed" title="method ba2::tes4::ArchiveFlags::compressed"><code>Self::compressed</code></a> to be set as well.</p> +<p>This flag is unused in SSE.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Flags-1" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Flags-1" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.empty" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.empty" class="fn">empty</a>() -> Self</h4></section></summary><div class="docblock"><p>Get a flags value with all bits unset.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.all" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.all" class="fn">all</a>() -> Self</h4></section></summary><div class="docblock"><p>Get a flags value with all known bits set.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.bits" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.bits" class="fn">bits</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Get the underlying bits value.</p> +<p>The returned value is exactly the bits set in this flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.from_bits" class="fn">from_bits</a>(bits: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Convert from a bits value.</p> +<p>This method will return <code>None</code> if any unknown bits are set.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits_truncate" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.from_bits_truncate" class="fn">from_bits_truncate</a>(bits: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>) -> Self</h4></section></summary><div class="docblock"><p>Convert from a bits value, unsetting any unknown bits.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits_retain" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.from_bits_retain" class="fn">from_bits_retain</a>(bits: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>) -> Self</h4></section></summary><div class="docblock"><p>Convert from a bits value exactly.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_name" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub fn <a href="#method.from_name" class="fn">from_name</a>(name: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Get a flags value with the bits of a flag with the given name set.</p> +<p>This method will return <code>None</code> if <code>name</code> is empty or doesn’t +correspond to any named flag.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether all bits in this flags value are unset.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_all" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.is_all" class="fn">is_all</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether all known bits in this flags value are set.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.intersects" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.intersects" class="fn">intersects</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether any set bits in a source flags value are also set in a target flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.contains" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.contains" class="fn">contains</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether all set bits in a source flags value are also set in a target flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.insert" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.remove" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>).</p> +<p>This method is not equivalent to <code>self & !other</code> when <code>other</code> has unknown bits set. +<code>remove</code> won’t truncate <code>other</code>, but the <code>!</code> operator will.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.toggle" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub fn <a href="#method.toggle" class="fn">toggle</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.set" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub fn <a href="#method.set" class="fn">set</a>(&mut self, other: Self, value: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Call <code>insert</code> when <code>value</code> is <code>true</code> or <code>remove</code> when <code>value</code> is <code>false</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.intersection" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.intersection" class="fn">intersection</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise and (<code>&</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.union" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.union" class="fn">union</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.difference" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.difference" class="fn">difference</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>).</p> +<p>This method is not equivalent to <code>self & !other</code> when <code>other</code> has unknown bits set. +<code>difference</code> won’t truncate <code>other</code>, but the <code>!</code> operator will.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.symmetric_difference" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.symmetric_difference" class="fn">symmetric_difference</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.complement" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.complement" class="fn">complement</a>(self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise negation (<code>!</code>) of the bits in a flags value, truncating the result.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Flags-2" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Flags-2" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.iter" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.iter" class="fn">iter</a>(&self) -> Iter<<a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>></h4></section></summary><div class="docblock"><p>Yield a set of contained flags values.</p> +<p>Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.iter_names" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><h4 class="code-header">pub const fn <a href="#method.iter_names" class="fn">iter_names</a>(&self) -> IterNames<<a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>></h4></section></summary><div class="docblock"><p>Yield a set of contained named flags values.</p> +<p>This method is like <a href="#method.iter"><code>iter</code></a>, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Flags-3" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#82-132">source</a><a href="#impl-Flags-3" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><section id="method.directory_strings" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#84-86">source</a><h4 class="code-header">pub fn <a href="#method.directory_strings" class="fn">directory_strings</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.file_strings" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#89-91">source</a><h4 class="code-header">pub fn <a href="#method.file_strings" class="fn">file_strings</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.compressed" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#94-96">source</a><h4 class="code-header">pub fn <a href="#method.compressed" class="fn">compressed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.retain_directory_names" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#99-101">source</a><h4 class="code-header">pub fn <a href="#method.retain_directory_names" class="fn">retain_directory_names</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.retain_file_names" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#104-106">source</a><h4 class="code-header">pub fn <a href="#method.retain_file_names" class="fn">retain_file_names</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.retain_file_name_offsets" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#109-111">source</a><h4 class="code-header">pub fn <a href="#method.retain_file_name_offsets" class="fn">retain_file_name_offsets</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.xbox_archive" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#114-116">source</a><h4 class="code-header">pub fn <a href="#method.xbox_archive" class="fn">xbox_archive</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.retain_strings_during_startup" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#119-121">source</a><h4 class="code-header">pub fn <a href="#method.retain_strings_during_startup" class="fn">retain_strings_during_startup</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.embedded_file_names" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#124-126">source</a><h4 class="code-header">pub fn <a href="#method.embedded_file_names" class="fn">embedded_file_names</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.xbox_compressed" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#129-131">source</a><h4 class="code-header">pub fn <a href="#method.xbox_compressed" class="fn">xbox_compressed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Binary-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Binary-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html" title="trait core::fmt::Binary">Binary</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.fmt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAnd-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-BitAnd-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAnd.html" title="trait core::ops::bit::BitAnd">BitAnd</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitand" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.bitand" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAnd.html#tymethod.bitand" class="fn">bitand</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise and (<code>&</code>) of the bits in two flags values.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl"><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAnd.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>&</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAndAssign-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-BitAndAssign-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitand_assign" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.bitand_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAndAssign.html#tymethod.bitand_assign" class="fn">bitand_assign</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise and (<code>&</code>) of the bits in two flags values.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOr-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-BitOr-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOr.html" title="trait core::ops::bit::BitOr">BitOr</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitor" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.bitor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOr.html#tymethod.bitor" class="fn">bitor</a>(self, other: <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>) -> Self</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in two flags values.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOr.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>|</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOrAssign-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-BitOrAssign-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitor_assign" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.bitor_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign" class="fn">bitor_assign</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in two flags values.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXor-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-BitXor-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXor.html" title="trait core::ops::bit::BitXor">BitXor</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitxor" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.bitxor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXor.html#tymethod.bitxor" class="fn">bitxor</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXor.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>^</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXorAssign-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-BitXorAssign-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitxor_assign" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.bitxor_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXorAssign.html#tymethod.bitxor_assign" class="fn">bitxor_assign</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#impl-Clone-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#impl-Debug-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#76-80">source</a><a href="#impl-Default-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#77-79">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Extend%3CFlags%3E-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Extend%3CFlags%3E-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><<a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.extend" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.extend" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fn">extend</a><T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = Self>>(&mut self, iterator: T)</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in each flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_one" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/iter/traits/collect.rs.html#376">source</a><a href="#method.extend_one" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fn">extend_one</a>(&mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_reserve" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/iter/traits/collect.rs.html#384">source</a><a href="#method.extend_reserve" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fn">extend_reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Flags-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Flags-for-Flags" class="anchor">§</a><h3 class="code-header">impl Flags for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.FLAGS" class="associatedconstant trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#associatedconstant.FLAGS" class="anchor">§</a><h4 class="code-header">const <a class="constant">FLAGS</a>: &'static [Flag<<a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>>] = _</h4></section></summary><div class='docblock'>The set of defined flags.</div></details><details class="toggle" open><summary><section id="associatedtype.Bits" class="associatedtype trait-impl"><a href="#associatedtype.Bits" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Bits</a> = <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>The underlying bits type.</div></details><details class="toggle method-toggle" open><summary><section id="method.bits-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.bits-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bits</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>Get the underlying bits value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits_retain-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.from_bits_retain-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_bits_retain</a>(bits: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section></summary><div class='docblock'>Convert from a bits value exactly.</div></details><details class="toggle method-toggle" open><summary><section id="method.empty-1" class="method trait-impl"><a href="#method.empty-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">empty</a>() -> Self</h4></section></summary><div class='docblock'>Get a flags value with all bits unset.</div></details><details class="toggle method-toggle" open><summary><section id="method.all-1" class="method trait-impl"><a href="#method.all-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">all</a>() -> Self</h4></section></summary><div class='docblock'>Get a flags value with all known bits set.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits-1" class="method trait-impl"><a href="#method.from_bits-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_bits</a>(bits: Self::Bits) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class='docblock'>Convert from a bits value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits_truncate-1" class="method trait-impl"><a href="#method.from_bits_truncate-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_bits_truncate</a>(bits: Self::Bits) -> Self</h4></section></summary><div class='docblock'>Convert from a bits value, unsetting any unknown bits.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_name-1" class="method trait-impl"><a href="#method.from_name-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_name</a>(name: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class='docblock'>Get a flags value with the bits of a flag with the given name set. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.iter-1" class="method trait-impl"><a href="#method.iter-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">iter</a>(&self) -> Iter<Self></h4></section></summary><div class='docblock'>Yield a set of contained flags values. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.iter_names-1" class="method trait-impl"><a href="#method.iter_names-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">iter_names</a>(&self) -> IterNames<Self></h4></section></summary><div class='docblock'>Yield a set of contained named flags values. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty-1" class="method trait-impl"><a href="#method.is_empty-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Whether all bits in this flags value are unset.</div></details><details class="toggle method-toggle" open><summary><section id="method.is_all-1" class="method trait-impl"><a href="#method.is_all-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">is_all</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Whether all known bits in this flags value are set.</div></details><details class="toggle method-toggle" open><summary><section id="method.intersects-1" class="method trait-impl"><a href="#method.intersects-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">intersects</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Whether any set bits in a source flags value are also set in a target flags value.</div></details><details class="toggle method-toggle" open><summary><section id="method.contains-1" class="method trait-impl"><a href="#method.contains-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">contains</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Whether all set bits in a source flags value are also set in a target flags value.</div></details><details class="toggle method-toggle" open><summary><section id="method.insert-1" class="method trait-impl"><a href="#method.insert-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">insert</a>(&mut self, other: Self)<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>The bitwise or (<code>|</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.remove-1" class="method trait-impl"><a href="#method.remove-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">remove</a>(&mut self, other: Self)<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>). <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.toggle-1" class="method trait-impl"><a href="#method.toggle-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">toggle</a>(&mut self, other: Self)<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.set-1" class="method trait-impl"><a href="#method.set-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">set</a>(&mut self, other: Self, value: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>)<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Call [<code>Flags::insert</code>] when <code>value</code> is <code>true</code> or [<code>Flags::remove</code>] when <code>value</code> is <code>false</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.intersection-1" class="method trait-impl"><a href="#method.intersection-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">intersection</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>The bitwise and (<code>&</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.union-1" class="method trait-impl"><a href="#method.union-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">union</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>The bitwise or (<code>|</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.difference-1" class="method trait-impl"><a href="#method.difference-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">difference</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>). <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.symmetric_difference-1" class="method trait-impl"><a href="#method.symmetric_difference-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">symmetric_difference</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.complement-1" class="method trait-impl"><a href="#method.complement-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">complement</a>(self) -> Self</h4></section></summary><div class='docblock'>The bitwise negation (<code>!</code>) of the bits in a flags value, truncating the result.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CFlags%3E-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-FromIterator%3CFlags%3E-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = Self>>(iterator: T) -> Self</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in each flags value.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-IntoIterator-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = Iter<<a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-LowerHex-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-LowerHex-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.fmt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Not-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Not-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.Not.html" title="trait core::ops::bit::Not">Not</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.not" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.not" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.Not.html#tymethod.not" class="fn">not</a>(self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise negation (<code>!</code>) of the bits in a flags value, truncating the result.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.Not.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>!</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Octal-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Octal-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html" title="trait core::fmt::Octal">Octal</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-4" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.fmt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#impl-PartialEq-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PublicFlags-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-PublicFlags-for-Flags" class="anchor">§</a><h3 class="code-header">impl PublicFlags for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Primitive" class="associatedtype trait-impl"><a href="#associatedtype.Primitive" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Primitive" class="associatedtype">Primitive</a> = <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></h4></section></summary><div class='docblock'>The type of the underlying storage.</div></details><details class="toggle" open><summary><section id="associatedtype.Internal" class="associatedtype trait-impl"><a href="#associatedtype.Internal" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Internal" class="associatedtype">Internal</a> = InternalBitFlags</h4></section></summary><div class='docblock'>The type of the internal field on the generated flags type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sub-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-Sub-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sub" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.sub" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.Sub.html#tymethod.sub" class="fn">sub</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>).</p> +<p>This method is not equivalent to <code>self & !other</code> when <code>other</code> has unknown bits set. +<code>difference</code> won’t truncate <code>other</code>, but the <code>!</code> operator will.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-SubAssign-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-SubAssign-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.SubAssign.html" title="trait core::ops::arith::SubAssign">SubAssign</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sub_assign" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.sub_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.SubAssign.html#tymethod.sub_assign" class="fn">sub_assign</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>).</p> +<p>This method is not equivalent to <code>self & !other</code> when <code>other</code> has unknown bits set. +<code>difference</code> won’t truncate <code>other</code>, but the <code>!</code> operator will.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-UpperHex-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#impl-UpperHex-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#15-74">source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><section id="impl-Copy-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#impl-Copy-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section><section id="impl-Eq-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#impl-Eq-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section><section id="impl-StructuralPartialEq-for-Flags" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#18">source</a><a href="#impl-StructuralPartialEq-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Flags" class="impl"><a href="#impl-RefUnwindSafe-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section><section id="impl-Send-for-Flags" class="impl"><a href="#impl-Send-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section><section id="impl-Sync-for-Flags" class="impl"><a href="#impl-Sync-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section><section id="impl-Unpin-for-Flags" class="impl"><a href="#impl-Unpin-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section><section id="impl-UnwindSafe-for-Flags" class="impl"><a href="#impl-UnwindSafe-for-Flags" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.ArchiveKey.html b/ba2/tes4/struct.ArchiveKey.html new file mode 100644 index 0000000..21ee919 --- /dev/null +++ b/ba2/tes4/struct.ArchiveKey.html @@ -0,0 +1,22 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A key for indexing into the relevant mapping."><title>ArchiveKey in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveKey</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.hash">hash</a></li><li><a href="#method.name">name</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Borrow%3CDirectoryHash%3E-for-Key%3C'bytes%3E">Borrow<DirectoryHash></a></li><li><a href="#impl-Clone-for-Key%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-Key%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Key%3C'bytes%3E">Default</a></li><li><a href="#impl-Eq-for-Key%3C'bytes%3E">Eq</a></li><li><a href="#impl-From%3CDirectoryHash%3E-for-Key%3C'static%3E">From<DirectoryHash></a></li><li><a href="#impl-From%3CT%3E-for-Key%3C'static%3E">From<T></a></li><li><a href="#impl-Ord-for-Key%3C'bytes%3E">Ord</a></li><li><a href="#impl-PartialEq-for-Key%3C'bytes%3E">PartialEq</a></li><li><a href="#impl-PartialOrd-for-Key%3C'bytes%3E">PartialOrd</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Key%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Key%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Key%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Key%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Key%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">ArchiveKey</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/archive.rs.html#292">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveKey<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A key for indexing into the relevant mapping.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.hash" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><h4 class="code-header">pub fn <a href="#method.hash" class="fn">hash</a>(&self) -> &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h4></section><section id="method.name" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><h4 class="code-header">pub fn <a href="#method.name" class="fn">name</a>(&self) -> &<a class="struct" href="../struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CDirectoryHash%3E-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-Borrow%3CDirectoryHash%3E-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-Clone-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-Debug-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-Default-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CDirectoryHash%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-From%3CDirectoryHash%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CT%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-From%3CT%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'static><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: T) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-Ord-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-PartialEq-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-PartialOrd-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Eq-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-Eq-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Key%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Send-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Sync-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-Unpin-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Key%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.ArchiveOptions.html b/ba2/tes4/struct.ArchiveOptions.html new file mode 100644 index 0000000..7be9f14 --- /dev/null +++ b/ba2/tes4/struct.ArchiveOptions.html @@ -0,0 +1,13 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ArchiveOptions` struct in crate `ba2`."><title>ArchiveOptions in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveOptions</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.builder">builder</a></li><li><a href="#method.flags">flags</a></li><li><a href="#method.types">types</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Options">Clone</a></li><li><a href="#impl-Copy-for-Options">Copy</a></li><li><a href="#impl-Debug-for-Options">Debug</a></li><li><a href="#impl-Default-for-Options">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-CompressionOptions">From<&Options></a></li><li><a href="#impl-From%3C%26Options%3E-for-CompressionOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3C%26Options%3E-for-ReadOptions">From<&Options></a></li><li><a href="#impl-From%3C%26Options%3E-for-ReadOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-CompressionOptions">From<Options></a></li><li><a href="#impl-From%3COptions%3E-for-CompressionOptionsBuilder">From<Options></a></li><li><a href="#impl-From%3COptions%3E-for-ReadOptions">From<Options></a></li><li><a href="#impl-From%3COptions%3E-for-ReadOptionsBuilder">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Options">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Options">Send</a></li><li><a href="#impl-Sync-for-Options">Sync</a></li><li><a href="#impl-Unpin-for-Options">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Options">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">ArchiveOptions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/archive.rs.html#337-341">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveOptions { <span class="comment">/* private fields */</span> }</code></pre><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Options" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#343-363">source</a><a href="#impl-Options" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section></summary><div class="impl-items"><section id="method.builder" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#345-347">source</a><h4 class="code-header">pub fn <a href="#method.builder" class="fn">builder</a>() -> <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h4></section><section id="method.flags" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#350-352">source</a><h4 class="code-header">pub fn <a href="#method.flags" class="fn">flags</a>(&self) -> <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a></h4></section><section id="method.types" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#355-357">source</a><h4 class="code-header">pub fn <a href="#method.types" class="fn">types</a>(&self) -> <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section><section id="method.version" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#360-362">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(&self) -> <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Options" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#336">source</a><a href="#impl-Clone-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#336">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Options" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#336">source</a><a href="#impl-Debug-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#336">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Options" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#336">source</a><a href="#impl-Default-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#336">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#105-112">source</a><a href="#impl-From%3C%26Options%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#106-111">source</a><a href="#method.from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#50-54">source</a><a href="#impl-From%3C%26Options%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#51-53">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#221-228">source</a><a href="#impl-From%3C%26Options%3E-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-7" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#222-227">source</a><a href="#method.from-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#155-159">source</a><a href="#impl-From%3C%26Options%3E-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#156-158">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#99-103">source</a><a href="#impl-From%3COptions%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#100-102">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#44-48">source</a><a href="#impl-From%3COptions%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#45-47">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#215-219">source</a><a href="#impl-From%3COptions%3E-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#216-218">source</a><a href="#method.from-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#149-153">source</a><a href="#impl-From%3COptions%3E-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#150-152">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><section id="impl-Copy-for-Options" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#336">source</a><a href="#impl-Copy-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Options" class="impl"><a href="#impl-RefUnwindSafe-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section><section id="impl-Send-for-Options" class="impl"><a href="#impl-Send-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section><section id="impl-Sync-for-Options" class="impl"><a href="#impl-Sync-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section><section id="impl-Unpin-for-Options" class="impl"><a href="#impl-Unpin-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section><section id="impl-UnwindSafe-for-Options" class="impl"><a href="#impl-UnwindSafe-for-Options" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-8" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.ArchiveOptionsBuilder.html b/ba2/tes4/struct.ArchiveOptionsBuilder.html new file mode 100644 index 0000000..62656d8 --- /dev/null +++ b/ba2/tes4/struct.ArchiveOptionsBuilder.html @@ -0,0 +1,13 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `ArchiveOptions`."><title>ArchiveOptionsBuilder in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveOptionsBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.build">build</a></li><li><a href="#method.flags">flags</a></li><li><a href="#method.new">new</a></li><li><a href="#method.types">types</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-OptionsBuilder">Debug</a></li><li><a href="#impl-Default-for-OptionsBuilder">Default</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-OptionsBuilder">RefUnwindSafe</a></li><li><a href="#impl-Send-for-OptionsBuilder">Send</a></li><li><a href="#impl-Sync-for-OptionsBuilder">Sync</a></li><li><a href="#impl-Unpin-for-OptionsBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-OptionsBuilder">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">ArchiveOptionsBuilder</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/archive.rs.html#304">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveOptionsBuilder(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions"><code>ArchiveOptions</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-OptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#306-334">source</a><a href="#impl-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></summary><div class="impl-items"><section id="method.build" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#308-310">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) -> <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a></h4></section><section id="method.flags" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#313-316">source</a><h4 class="code-header">pub fn <a href="#method.flags" class="fn">flags</a>(self, flags: <a class="struct" href="struct.ArchiveFlags.html" title="struct ba2::tes4::ArchiveFlags">Flags</a>) -> Self</h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#319-321">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.types" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#324-327">source</a><h4 class="code-header">pub fn <a href="#method.types" class="fn">types</a>(self, types: <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>) -> Self</h4></section><section id="method.version" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#330-333">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(self, version: <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a>) -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-OptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#302">source</a><a href="#impl-Debug-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#302">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-OptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#302">source</a><a href="#impl-Default-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#302">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-OptionsBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section><section id="impl-Send-for-OptionsBuilder" class="impl"><a href="#impl-Send-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section><section id="impl-Sync-for-OptionsBuilder" class="impl"><a href="#impl-Sync-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section><section id="impl-Unpin-for-OptionsBuilder" class="impl"><a href="#impl-Unpin-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section><section id="impl-UnwindSafe-for-OptionsBuilder" class="impl"><a href="#impl-UnwindSafe-for-OptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveOptionsBuilder.html" title="struct ba2::tes4::ArchiveOptionsBuilder">OptionsBuilder</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.ArchiveTypes.html b/ba2/tes4/struct.ArchiveTypes.html new file mode 100644 index 0000000..72780b5 --- /dev/null +++ b/ba2/tes4/struct.ArchiveTypes.html @@ -0,0 +1,72 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Specifies file types contained within an archive."><title>ArchiveTypes in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ArchiveTypes</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.FONTS">FONTS</a></li><li><a href="#associatedconstant.MENUS">MENUS</a></li><li><a href="#associatedconstant.MESHES">MESHES</a></li><li><a href="#associatedconstant.MISC">MISC</a></li><li><a href="#associatedconstant.SHADERS">SHADERS</a></li><li><a href="#associatedconstant.SOUNDS">SOUNDS</a></li><li><a href="#associatedconstant.TEXTURES">TEXTURES</a></li><li><a href="#associatedconstant.TREES">TREES</a></li><li><a href="#associatedconstant.VOICES">VOICES</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.all">all</a></li><li><a href="#method.bits">bits</a></li><li><a href="#method.complement">complement</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.difference">difference</a></li><li><a href="#method.empty">empty</a></li><li><a href="#method.fonts">fonts</a></li><li><a href="#method.from_bits">from_bits</a></li><li><a href="#method.from_bits_retain">from_bits_retain</a></li><li><a href="#method.from_bits_truncate">from_bits_truncate</a></li><li><a href="#method.from_name">from_name</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.intersection">intersection</a></li><li><a href="#method.intersects">intersects</a></li><li><a href="#method.is_all">is_all</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_names">iter_names</a></li><li><a href="#method.menus">menus</a></li><li><a href="#method.meshes">meshes</a></li><li><a href="#method.misc">misc</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.set">set</a></li><li><a href="#method.shaders">shaders</a></li><li><a href="#method.sounds">sounds</a></li><li><a href="#method.symmetric_difference">symmetric_difference</a></li><li><a href="#method.textures">textures</a></li><li><a href="#method.toggle">toggle</a></li><li><a href="#method.trees">trees</a></li><li><a href="#method.union">union</a></li><li><a href="#method.voices">voices</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Binary-for-Types">Binary</a></li><li><a href="#impl-BitAnd-for-Types">BitAnd</a></li><li><a href="#impl-BitAndAssign-for-Types">BitAndAssign</a></li><li><a href="#impl-BitOr-for-Types">BitOr</a></li><li><a href="#impl-BitOrAssign-for-Types">BitOrAssign</a></li><li><a href="#impl-BitXor-for-Types">BitXor</a></li><li><a href="#impl-BitXorAssign-for-Types">BitXorAssign</a></li><li><a href="#impl-Clone-for-Types">Clone</a></li><li><a href="#impl-Copy-for-Types">Copy</a></li><li><a href="#impl-Debug-for-Types">Debug</a></li><li><a href="#impl-Default-for-Types">Default</a></li><li><a href="#impl-Eq-for-Types">Eq</a></li><li><a href="#impl-Extend%3CTypes%3E-for-Types">Extend<Types></a></li><li><a href="#impl-Flags-for-Types">Flags</a></li><li><a href="#impl-FromIterator%3CTypes%3E-for-Types">FromIterator<Types></a></li><li><a href="#impl-IntoIterator-for-Types">IntoIterator</a></li><li><a href="#impl-LowerHex-for-Types">LowerHex</a></li><li><a href="#impl-Not-for-Types">Not</a></li><li><a href="#impl-Octal-for-Types">Octal</a></li><li><a href="#impl-PartialEq-for-Types">PartialEq</a></li><li><a href="#impl-PublicFlags-for-Types">PublicFlags</a></li><li><a href="#impl-StructuralPartialEq-for-Types">StructuralPartialEq</a></li><li><a href="#impl-Sub-for-Types">Sub</a></li><li><a href="#impl-SubAssign-for-Types">SubAssign</a></li><li><a href="#impl-UpperHex-for-Types">UpperHex</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Types">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Types">Send</a></li><li><a href="#impl-Sync-for-Types">Sync</a></li><li><a href="#impl-Unpin-for-Types">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Types">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">ArchiveTypes</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ArchiveTypes(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Specifies file types contained within an archive.</p> +<p>It’s not apparent if the game actually uses these flags for anything.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Types" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><section id="associatedconstant.MESHES" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.MESHES" class="constant">MESHES</a>: Self = _</h4></section><section id="associatedconstant.TEXTURES" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.TEXTURES" class="constant">TEXTURES</a>: Self = _</h4></section><section id="associatedconstant.MENUS" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.MENUS" class="constant">MENUS</a>: Self = _</h4></section><section id="associatedconstant.SOUNDS" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.SOUNDS" class="constant">SOUNDS</a>: Self = _</h4></section><section id="associatedconstant.VOICES" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.VOICES" class="constant">VOICES</a>: Self = _</h4></section><section id="associatedconstant.SHADERS" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.SHADERS" class="constant">SHADERS</a>: Self = _</h4></section><section id="associatedconstant.TREES" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.TREES" class="constant">TREES</a>: Self = _</h4></section><section id="associatedconstant.FONTS" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.FONTS" class="constant">FONTS</a>: Self = _</h4></section><section id="associatedconstant.MISC" class="associatedconstant"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const <a href="#associatedconstant.MISC" class="constant">MISC</a>: Self = _</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Types-1" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Types-1" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.empty" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.empty" class="fn">empty</a>() -> Self</h4></section></summary><div class="docblock"><p>Get a flags value with all bits unset.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.all" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.all" class="fn">all</a>() -> Self</h4></section></summary><div class="docblock"><p>Get a flags value with all known bits set.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.bits" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.bits" class="fn">bits</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Get the underlying bits value.</p> +<p>The returned value is exactly the bits set in this flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.from_bits" class="fn">from_bits</a>(bits: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Convert from a bits value.</p> +<p>This method will return <code>None</code> if any unknown bits are set.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits_truncate" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.from_bits_truncate" class="fn">from_bits_truncate</a>(bits: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>) -> Self</h4></section></summary><div class="docblock"><p>Convert from a bits value, unsetting any unknown bits.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits_retain" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.from_bits_retain" class="fn">from_bits_retain</a>(bits: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>) -> Self</h4></section></summary><div class="docblock"><p>Convert from a bits value exactly.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_name" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub fn <a href="#method.from_name" class="fn">from_name</a>(name: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class="docblock"><p>Get a flags value with the bits of a flag with the given name set.</p> +<p>This method will return <code>None</code> if <code>name</code> is empty or doesn’t +correspond to any named flag.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether all bits in this flags value are unset.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_all" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.is_all" class="fn">is_all</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether all known bits in this flags value are set.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.intersects" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.intersects" class="fn">intersects</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether any set bits in a source flags value are also set in a target flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.contains" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.contains" class="fn">contains</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether all set bits in a source flags value are also set in a target flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.insert" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.remove" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>).</p> +<p>This method is not equivalent to <code>self & !other</code> when <code>other</code> has unknown bits set. +<code>remove</code> won’t truncate <code>other</code>, but the <code>!</code> operator will.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.toggle" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub fn <a href="#method.toggle" class="fn">toggle</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.set" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub fn <a href="#method.set" class="fn">set</a>(&mut self, other: Self, value: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Call <code>insert</code> when <code>value</code> is <code>true</code> or <code>remove</code> when <code>value</code> is <code>false</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.intersection" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.intersection" class="fn">intersection</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise and (<code>&</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.union" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.union" class="fn">union</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.difference" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.difference" class="fn">difference</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>).</p> +<p>This method is not equivalent to <code>self & !other</code> when <code>other</code> has unknown bits set. +<code>difference</code> won’t truncate <code>other</code>, but the <code>!</code> operator will.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.symmetric_difference" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.symmetric_difference" class="fn">symmetric_difference</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.complement" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.complement" class="fn">complement</a>(self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise negation (<code>!</code>) of the bits in a flags value, truncating the result.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Types-2" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Types-2" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.iter" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.iter" class="fn">iter</a>(&self) -> Iter<<a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>></h4></section></summary><div class="docblock"><p>Yield a set of contained flags values.</p> +<p>Each yielded flags value will correspond to a defined named flag. Any unknown bits +will be yielded together as a final flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.iter_names" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><h4 class="code-header">pub const fn <a href="#method.iter_names" class="fn">iter_names</a>(&self) -> IterNames<<a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>></h4></section></summary><div class="docblock"><p>Yield a set of contained named flags values.</p> +<p>This method is like <a href="#method.iter"><code>iter</code></a>, except only yields bits in contained named flags. +Any unknown bits, or bits not corresponding to a contained flag will not be yielded.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Types-3" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#154-199">source</a><a href="#impl-Types-3" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><section id="method.meshes" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#156-158">source</a><h4 class="code-header">pub fn <a href="#method.meshes" class="fn">meshes</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.textures" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#161-163">source</a><h4 class="code-header">pub fn <a href="#method.textures" class="fn">textures</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.menus" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#166-168">source</a><h4 class="code-header">pub fn <a href="#method.menus" class="fn">menus</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.sounds" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#171-173">source</a><h4 class="code-header">pub fn <a href="#method.sounds" class="fn">sounds</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.voices" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#176-178">source</a><h4 class="code-header">pub fn <a href="#method.voices" class="fn">voices</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.shaders" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#181-183">source</a><h4 class="code-header">pub fn <a href="#method.shaders" class="fn">shaders</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.trees" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#186-188">source</a><h4 class="code-header">pub fn <a href="#method.trees" class="fn">trees</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.fonts" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#191-193">source</a><h4 class="code-header">pub fn <a href="#method.fonts" class="fn">fonts</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.misc" class="method"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#196-198">source</a><h4 class="code-header">pub fn <a href="#method.misc" class="fn">misc</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Binary-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Binary-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html" title="trait core::fmt::Binary">Binary</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.fmt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAnd-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-BitAnd-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAnd.html" title="trait core::ops::bit::BitAnd">BitAnd</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitand" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.bitand" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAnd.html#tymethod.bitand" class="fn">bitand</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise and (<code>&</code>) of the bits in two flags values.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAnd.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>&</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitAndAssign-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-BitAndAssign-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAndAssign.html" title="trait core::ops::bit::BitAndAssign">BitAndAssign</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitand_assign" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.bitand_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAndAssign.html#tymethod.bitand_assign" class="fn">bitand_assign</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise and (<code>&</code>) of the bits in two flags values.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOr-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-BitOr-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOr.html" title="trait core::ops::bit::BitOr">BitOr</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitor" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.bitor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOr.html#tymethod.bitor" class="fn">bitor</a>(self, other: <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>) -> Self</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in two flags values.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl"><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOr.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>|</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOrAssign-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-BitOrAssign-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitor_assign" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.bitor_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign" class="fn">bitor_assign</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in two flags values.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXor-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-BitXor-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXor.html" title="trait core::ops::bit::BitXor">BitXor</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitxor" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.bitxor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXor.html#tymethod.bitxor" class="fn">bitxor</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXor.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>^</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitXorAssign-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-BitXorAssign-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXorAssign.html" title="trait core::ops::bit::BitXorAssign">BitXorAssign</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitxor_assign" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.bitxor_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXorAssign.html#tymethod.bitxor_assign" class="fn">bitxor_assign</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#impl-Clone-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#impl-Debug-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#impl-Default-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Extend%3CTypes%3E-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Extend%3CTypes%3E-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html" title="trait core::iter::traits::collect::Extend">Extend</a><<a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.extend" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.extend" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#tymethod.extend" class="fn">extend</a><T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = Self>>(&mut self, iterator: T)</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in each flags value.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_one" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/iter/traits/collect.rs.html#376">source</a><a href="#method.extend_one" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#method.extend_one" class="fn">extend_one</a>(&mut self, item: A)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Extends a collection with exactly one element.</div></details><details class="toggle method-toggle" open><summary><section id="method.extend_reserve" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/iter/traits/collect.rs.html#384">source</a><a href="#method.extend_reserve" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve" class="fn">extend_reserve</a>(&mut self, additional: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>extend_one</code>)</span></div></span><div class='docblock'>Reserves capacity in a collection for the given number of additional elements. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html#method.extend_reserve">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Flags-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Flags-for-Types" class="anchor">§</a><h3 class="code-header">impl Flags for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.FLAGS" class="associatedconstant trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#associatedconstant.FLAGS" class="anchor">§</a><h4 class="code-header">const <a class="constant">FLAGS</a>: &'static [Flag<<a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>>] = _</h4></section></summary><div class='docblock'>The set of defined flags.</div></details><details class="toggle" open><summary><section id="associatedtype.Bits" class="associatedtype trait-impl"><a href="#associatedtype.Bits" class="anchor">§</a><h4 class="code-header">type <a class="associatedtype">Bits</a> = <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>The underlying bits type.</div></details><details class="toggle method-toggle" open><summary><section id="method.bits-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.bits-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">bits</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>Get the underlying bits value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits_retain-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.from_bits_retain-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_bits_retain</a>(bits: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a>) -> <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>Convert from a bits value exactly.</div></details><details class="toggle method-toggle" open><summary><section id="method.empty-1" class="method trait-impl"><a href="#method.empty-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">empty</a>() -> Self</h4></section></summary><div class='docblock'>Get a flags value with all bits unset.</div></details><details class="toggle method-toggle" open><summary><section id="method.all-1" class="method trait-impl"><a href="#method.all-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">all</a>() -> Self</h4></section></summary><div class='docblock'>Get a flags value with all known bits set.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits-1" class="method trait-impl"><a href="#method.from_bits-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_bits</a>(bits: Self::Bits) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class='docblock'>Convert from a bits value. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.from_bits_truncate-1" class="method trait-impl"><a href="#method.from_bits_truncate-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_bits_truncate</a>(bits: Self::Bits) -> Self</h4></section></summary><div class='docblock'>Convert from a bits value, unsetting any unknown bits.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_name-1" class="method trait-impl"><a href="#method.from_name-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">from_name</a>(name: &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self></h4></section></summary><div class='docblock'>Get a flags value with the bits of a flag with the given name set. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.iter-1" class="method trait-impl"><a href="#method.iter-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">iter</a>(&self) -> Iter<Self></h4></section></summary><div class='docblock'>Yield a set of contained flags values. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.iter_names-1" class="method trait-impl"><a href="#method.iter_names-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">iter_names</a>(&self) -> IterNames<Self></h4></section></summary><div class='docblock'>Yield a set of contained named flags values. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_empty-1" class="method trait-impl"><a href="#method.is_empty-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Whether all bits in this flags value are unset.</div></details><details class="toggle method-toggle" open><summary><section id="method.is_all-1" class="method trait-impl"><a href="#method.is_all-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">is_all</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Whether all known bits in this flags value are set.</div></details><details class="toggle method-toggle" open><summary><section id="method.intersects-1" class="method trait-impl"><a href="#method.intersects-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">intersects</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Whether any set bits in a source flags value are also set in a target flags value.</div></details><details class="toggle method-toggle" open><summary><section id="method.contains-1" class="method trait-impl"><a href="#method.contains-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">contains</a>(&self, other: Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Whether all set bits in a source flags value are also set in a target flags value.</div></details><details class="toggle method-toggle" open><summary><section id="method.insert-1" class="method trait-impl"><a href="#method.insert-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">insert</a>(&mut self, other: Self)<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>The bitwise or (<code>|</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.remove-1" class="method trait-impl"><a href="#method.remove-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">remove</a>(&mut self, other: Self)<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>). <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.toggle-1" class="method trait-impl"><a href="#method.toggle-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">toggle</a>(&mut self, other: Self)<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.set-1" class="method trait-impl"><a href="#method.set-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">set</a>(&mut self, other: Self, value: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>)<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Call [<code>Flags::insert</code>] when <code>value</code> is <code>true</code> or [<code>Flags::remove</code>] when <code>value</code> is <code>false</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.intersection-1" class="method trait-impl"><a href="#method.intersection-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">intersection</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>The bitwise and (<code>&</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.union-1" class="method trait-impl"><a href="#method.union-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">union</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>The bitwise or (<code>|</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.difference-1" class="method trait-impl"><a href="#method.difference-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">difference</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>). <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.symmetric_difference-1" class="method trait-impl"><a href="#method.symmetric_difference-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">symmetric_difference</a>(self, other: Self) -> Self</h4></section></summary><div class='docblock'>The bitwise exclusive-or (<code>^</code>) of the bits in two flags values.</div></details><details class="toggle method-toggle" open><summary><section id="method.complement-1" class="method trait-impl"><a href="#method.complement-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">complement</a>(self) -> Self</h4></section></summary><div class='docblock'>The bitwise negation (<code>!</code>) of the bits in a flags value, truncating the result.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CTypes%3E-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-FromIterator%3CTypes%3E-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><<a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = Self>>(iterator: T) -> Self</h4></section></summary><div class="docblock"><p>The bitwise or (<code>|</code>) of the bits in each flags value.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-IntoIterator-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = Iter<<a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-LowerHex-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-LowerHex-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.fmt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Not-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Not-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.Not.html" title="trait core::ops::bit::Not">Not</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.not" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.not" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.Not.html#tymethod.not" class="fn">not</a>(self) -> Self</h4></section></summary><div class="docblock"><p>The bitwise negation (<code>!</code>) of the bits in a flags value, truncating the result.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.Not.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>!</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Octal-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Octal-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html" title="trait core::fmt::Octal">Octal</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#impl-PartialEq-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PublicFlags-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-PublicFlags-for-Types" class="anchor">§</a><h3 class="code-header">impl PublicFlags for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Primitive" class="associatedtype trait-impl"><a href="#associatedtype.Primitive" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Primitive" class="associatedtype">Primitive</a> = <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u16.html">u16</a></h4></section></summary><div class='docblock'>The type of the underlying storage.</div></details><details class="toggle" open><summary><section id="associatedtype.Internal" class="associatedtype trait-impl"><a href="#associatedtype.Internal" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Internal" class="associatedtype">Internal</a> = InternalBitFlags</h4></section></summary><div class='docblock'>The type of the internal field on the generated flags type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Sub-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-Sub-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sub" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.sub" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.Sub.html#tymethod.sub" class="fn">sub</a>(self, other: Self) -> Self</h4></section></summary><div class="docblock"><p>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>).</p> +<p>This method is not equivalent to <code>self & !other</code> when <code>other</code> has unknown bits set. +<code>difference</code> won’t truncate <code>other</code>, but the <code>!</code> operator will.</p> +</div></details><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-SubAssign-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-SubAssign-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.SubAssign.html" title="trait core::ops::arith::SubAssign">SubAssign</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.sub_assign" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.sub_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.SubAssign.html#tymethod.sub_assign" class="fn">sub_assign</a>(&mut self, other: Self)</h4></section></summary><div class="docblock"><p>The intersection of a source flags value with the complement of a target flags value (<code>&!</code>).</p> +<p>This method is not equivalent to <code>self & !other</code> when <code>other</code> has unknown bits set. +<code>difference</code> won’t truncate <code>other</code>, but the <code>!</code> operator will.</p> +</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-UpperHex-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#impl-UpperHex-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-4" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#134-152">source</a><a href="#method.fmt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><section id="impl-Copy-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#impl-Copy-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section><section id="impl-Eq-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#impl-Eq-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section><section id="impl-StructuralPartialEq-for-Types" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#139">source</a><a href="#impl-StructuralPartialEq-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Types" class="impl"><a href="#impl-RefUnwindSafe-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section><section id="impl-Send-for-Types" class="impl"><a href="#impl-Send-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section><section id="impl-Sync-for-Types" class="impl"><a href="#impl-Sync-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section><section id="impl-Unpin-for-Types" class="impl"><a href="#impl-Unpin-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section><section id="impl-UnwindSafe-for-Types" class="impl"><a href="#impl-UnwindSafe-for-Types" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ArchiveTypes.html" title="struct ba2::tes4::ArchiveTypes">Types</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.Directory.html b/ba2/tes4/struct.Directory.html new file mode 100644 index 0000000..9ec187c --- /dev/null +++ b/ba2/tes4/struct.Directory.html @@ -0,0 +1,26 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents a directory within the TES4 virtual filesystem."><title>Directory in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Directory</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.clear">clear</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_key_value">get_key_value</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.insert">insert</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.keys">keys</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.remove">remove</a></li><li><a href="#method.remove_entry">remove_entry</a></li><li><a href="#method.values">values</a></li><li><a href="#method.values_mut">values_mut</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Directory%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-Directory%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Directory%3C'bytes%3E">Default</a></li><li><a href="#impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Directory%3C'bytes%3E">FromIterator<(Key<'bytes>, File<'bytes>)></a></li><li><a href="#impl-IntoIterator-for-%26Directory%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-%26mut+Directory%3C'bytes%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-Directory%3C'bytes%3E">IntoIterator</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Directory%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Directory%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Directory%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Directory%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Directory%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">Directory</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct Directory<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents a directory within the TES4 virtual filesystem.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Directory%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#impl-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.clear" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&mut self)</h4></section><section id="method.get" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a><K>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>>,</div></h4></section><section id="method.get_key_value" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.get_key_value" class="fn">get_key_value</a><K>(&self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, &<a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>)><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>>,</div></h4></section><section id="method.get_mut" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a><K>(&mut self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>>,</div></h4></section><section id="method.insert" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.insert" class="fn">insert</a><K>(&mut self, key: K, value: <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>>,</div></h4></section><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.iter" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (&<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, &<a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>)></h4></section><section id="method.iter_mut" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>( + &mut self +) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (&<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, &mut <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>)></h4></section><section id="method.keys" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.keys" class="fn">keys</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>></h4></section><section id="method.len" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.remove" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.remove" class="fn">remove</a><K>(&mut self, key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>>,</div></h4></section><section id="method.remove_entry" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.remove_entry" class="fn">remove_entry</a><K>( + &mut self, + key: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&K</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>)><div class="where">where + K: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>>,</div></h4></section><section id="method.values" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.values" class="fn">values</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>></h4></section><section id="method.values_mut" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><h4 class="code-header">pub fn <a href="#method.values_mut" class="fn">values_mut</a>(&mut self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &mut <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Directory%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#impl-Clone-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Directory%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#impl-Debug-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Directory%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#impl-Default-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Directory%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#impl-FromIterator%3C(Key%3C'bytes%3E,+File%3C'bytes%3E)%3E-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><(<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>)> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><T>(iter: T) -> Self<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = (<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>)>,</div></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26Directory%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#impl-IntoIterator-for-%26Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26mut+Directory%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#impl-IntoIterator-for-%26mut+Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, 'this> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'this mut <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-2" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <&'this mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#method.into_iter-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-Directory%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#impl-IntoIterator-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a></h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl"><a href="#associatedtype.IntoIter-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes>, <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes>> as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#16-20">source</a><a href="#method.into_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Directory%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section><section id="impl-Send-for-Directory%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section><section id="impl-Sync-for-Directory%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section><section id="impl-Unpin-for-Directory%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Directory%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Directory%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Directory.html" title="struct ba2::tes4::Directory">Directory</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.DirectoryHash.html b/ba2/tes4/struct.DirectoryHash.html new file mode 100644 index 0000000..73430e9 --- /dev/null +++ b/ba2/tes4/struct.DirectoryHash.html @@ -0,0 +1,29 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `struct@Hash`."><title>DirectoryHash in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">DirectoryHash</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li></ul><h3><a href="#deref-methods-Hash">Methods from Deref<Target=Hash></a></h3><ul class="block deref-methods"><li><a href="#method.numeric">numeric</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CHash%3E-for-DirectoryHash">AsMut<Hash></a></li><li><a href="#impl-AsRef%3CHash%3E-for-DirectoryHash">AsRef<Hash></a></li><li><a href="#impl-Borrow%3CDirectoryHash%3E-for-Key%3C'bytes%3E">Borrow<DirectoryHash></a></li><li><a href="#impl-Borrow%3CHash%3E-for-DirectoryHash">Borrow<Hash></a></li><li><a href="#impl-BorrowMut%3CHash%3E-for-DirectoryHash">BorrowMut<Hash></a></li><li><a href="#impl-Clone-for-DirectoryHash">Clone</a></li><li><a href="#impl-Copy-for-DirectoryHash">Copy</a></li><li><a href="#impl-Debug-for-DirectoryHash">Debug</a></li><li><a href="#impl-Default-for-DirectoryHash">Default</a></li><li><a href="#impl-Deref-for-DirectoryHash">Deref</a></li><li><a href="#impl-DerefMut-for-DirectoryHash">DerefMut</a></li><li><a href="#impl-Eq-for-DirectoryHash">Eq</a></li><li><a href="#impl-From%3CDirectoryHash%3E-for-Hash">From<DirectoryHash></a></li><li><a href="#impl-From%3CDirectoryHash%3E-for-Key%3C'static%3E">From<DirectoryHash></a></li><li><a href="#impl-From%3CHash%3E-for-DirectoryHash">From<Hash></a></li><li><a href="#impl-Ord-for-DirectoryHash">Ord</a></li><li><a href="#impl-PartialEq-for-DirectoryHash">PartialEq</a></li><li><a href="#impl-PartialEq%3CDirectoryHash%3E-for-Hash">PartialEq<DirectoryHash></a></li><li><a href="#impl-PartialEq%3CHash%3E-for-DirectoryHash">PartialEq<Hash></a></li><li><a href="#impl-PartialOrd-for-DirectoryHash">PartialOrd</a></li><li><a href="#impl-PartialOrd%3CDirectoryHash%3E-for-Hash">PartialOrd<DirectoryHash></a></li><li><a href="#impl-PartialOrd%3CHash%3E-for-DirectoryHash">PartialOrd<Hash></a></li><li><a href="#impl-StructuralPartialEq-for-DirectoryHash">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-DirectoryHash">RefUnwindSafe</a></li><li><a href="#impl-Send-for-DirectoryHash">Send</a></li><li><a href="#impl-Sync-for-DirectoryHash">Sync</a></li><li><a href="#impl-Unpin-for-DirectoryHash">Unpin</a></li><li><a href="#impl-UnwindSafe-for-DirectoryHash">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">DirectoryHash</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/hashing.rs.html#20">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct DirectoryHash(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.Hash.html" title="struct ba2::tes4::Hash"><code>Hash</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details></div><h2 id="deref-methods-Hash" class="section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>></span><a href="#deref-methods-Hash" class="anchor">§</a></h2><div id="deref-methods-Hash-1" class="impl-items"><section id="method.numeric" class="method"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#31-37">source</a><h4 class="code-header">pub fn <a href="#method.numeric" class="fn">numeric</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u64.html">u64</a></h4></section></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-AsMut%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-AsRef%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CDirectoryHash%3E-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-Borrow%3CDirectoryHash%3E-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Borrow%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-BorrowMut%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Clone-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Debug-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Default-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Deref-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&self) -> &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-DerefMut-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&mut self) -> &mut Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CDirectoryHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-From%3CDirectoryHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CDirectoryHash%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#impl-From%3CDirectoryHash%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.ArchiveKey.html" title="struct ba2::tes4::ArchiveKey">Key</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/archive.rs.html#292">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-From%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Ord-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CDirectoryHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialEq%3CDirectoryHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialEq%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialEq-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CDirectoryHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialOrd%3CDirectoryHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialOrd%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialOrd-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Copy-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section><section id="impl-Eq-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Eq-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section><section id="impl-StructuralPartialEq-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-StructuralPartialEq-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-DirectoryHash" class="impl"><a href="#impl-RefUnwindSafe-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section><section id="impl-Send-for-DirectoryHash" class="impl"><a href="#impl-Send-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section><section id="impl-Sync-for-DirectoryHash" class="impl"><a href="#impl-Sync-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section><section id="impl-Unpin-for-DirectoryHash" class="impl"><a href="#impl-Unpin-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section><section id="impl-UnwindSafe-for-DirectoryHash" class="impl"><a href="#impl-UnwindSafe-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.DirectoryKey.html b/ba2/tes4/struct.DirectoryKey.html new file mode 100644 index 0000000..b658233 --- /dev/null +++ b/ba2/tes4/struct.DirectoryKey.html @@ -0,0 +1,22 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A key for indexing into the relevant mapping."><title>DirectoryKey in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">DirectoryKey</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.hash">hash</a></li><li><a href="#method.name">name</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E">Borrow<FileHash></a></li><li><a href="#impl-Clone-for-Key%3C'bytes%3E">Clone</a></li><li><a href="#impl-Debug-for-Key%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-Key%3C'bytes%3E">Default</a></li><li><a href="#impl-Eq-for-Key%3C'bytes%3E">Eq</a></li><li><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E">From<FileHash></a></li><li><a href="#impl-From%3CT%3E-for-Key%3C'static%3E">From<T></a></li><li><a href="#impl-Ord-for-Key%3C'bytes%3E">Ord</a></li><li><a href="#impl-PartialEq-for-Key%3C'bytes%3E">PartialEq</a></li><li><a href="#impl-PartialOrd-for-Key%3C'bytes%3E">PartialOrd</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Key%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Key%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-Key%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-Key%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Key%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">DirectoryKey</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/directory.rs.html#7">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct DirectoryKey<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A key for indexing into the relevant mapping.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.hash" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><h4 class="code-header">pub fn <a href="#method.hash" class="fn">hash</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h4></section><section id="method.name" class="method"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><h4 class="code-header">pub fn <a href="#method.name" class="fn">name</a>(&self) -> &<a class="struct" href="../struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-Clone-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-Debug-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-Default-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CT%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-From%3CT%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'static><div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../struct.BString.html" title="struct ba2::BString">BString</a>>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: T) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-Ord-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-PartialEq-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-PartialOrd-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Eq-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-Eq-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Key%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section><section id="impl-Send-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Send-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section><section id="impl-Sync-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section><section id="impl-Unpin-for-Key%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section><section id="impl-UnwindSafe-for-Key%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.File.html b/ba2/tes4/struct.File.html new file mode 100644 index 0000000..c4a1c7c --- /dev/null +++ b/ba2/tes4/struct.File.html @@ -0,0 +1,27 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents a file within the TES4 virtual filesystem."><title>File in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">File</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.as_bytes">as_bytes</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.compress">compress</a></li><li><a href="#method.compress_into">compress_into</a></li><li><a href="#method.decompress">decompress</a></li><li><a href="#method.decompress_into">decompress_into</a></li><li><a href="#method.decompressed_len">decompressed_len</a></li><li><a href="#method.into_owned">into_owned</a></li><li><a href="#method.is_compressed">is_compressed</a></li><li><a href="#method.is_decompressed">is_decompressed</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.len">len</a></li><li><a href="#method.new">new</a></li><li><a href="#method.write">write</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-File%3C'bytes%3E">Clone</a></li><li><a href="#impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-File%3C'bytes%3E">CompressableFrom<&'bytes [u8; N]></a></li><li><a href="#impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-File%3C'bytes%3E">CompressableFrom<&'bytes [u8]></a></li><li><a href="#impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C'static%3E">CompressableFrom<Box<[u8]>></a></li><li><a href="#impl-Debug-for-File%3C'bytes%3E">Debug</a></li><li><a href="#impl-Default-for-File%3C'bytes%3E">Default</a></li><li><a href="#impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E">ReaderWithOptions<&File></a></li><li><a href="#impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E">ReaderWithOptions<&Path></a></li><li><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E">ReaderWithOptions<Borrowed<'bytes>></a></li><li><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E">ReaderWithOptions<Copied<'bytes>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-File%3C'bytes%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-File%3C'bytes%3E">Send</a></li><li><a href="#impl-Sync-for-File%3C'bytes%3E">Sync</a></li><li><a href="#impl-Unpin-for-File%3C'bytes%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-File%3C'bytes%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">File</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/file.rs.html#232-234">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct File<'bytes> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents a file within the TES4 virtual filesystem.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#impl-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.as_bytes" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.as_bytes" class="fn">as_bytes</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section><section id="method.as_ptr" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.pointer.html">*const </a><a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></h4></section><section id="method.into_owned" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.into_owned" class="fn">into_owned</a>(self) -> <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static></h4></section><section id="method.is_empty" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.len" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a></h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-File%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#impl-File%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.compress" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.compress" class="fn">compress</a>(&self, options: &<a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><<a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static>></h4></section><section id="method.decompress" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.decompress" class="fn">decompress</a>(&self, options: &<a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><<a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static>></h4></section><section id="method.decompressed_len" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.decompressed_len" class="fn">decompressed_len</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></h4></section><section id="method.is_compressed" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.is_compressed" class="fn">is_compressed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_decompressed" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.is_decompressed" class="fn">is_decompressed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section><section id="method.write" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><h4 class="code-header">pub fn <a href="#method.write" class="fn">write</a><Out>( + &self, + stream: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut Out</a>, + options: &<a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a> +) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>><div class="where">where + Out: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,</div></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-File%3C'bytes%3E-2" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#240-324">source</a><a href="#impl-File%3C'bytes%3E-2" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="method.compress_into" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#241-253">source</a><h4 class="code-header">pub fn <a href="#method.compress_into" class="fn">compress_into</a>( + &self, + out: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>, + options: &<a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a> +) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>></h4></section><section id="method.decompress_into" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#255-277">source</a><h4 class="code-header">pub fn <a href="#method.decompress_into" class="fn">decompress_into</a>( + &self, + out: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>, + options: &<a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a> +) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.unit.html">()</a>></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#231">source</a><a href="#impl-Clone-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#231">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_compressed-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#method.from_compressed-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_compressed" class="fn">from_compressed</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>], decompressed_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class='docblock'>Makes a compressed instance of <code>Self</code> using the given data.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_decompressed-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#method.from_decompressed-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_decompressed" class="fn">from_decompressed</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]) -> Self</h4></section></summary><div class='docblock'>Makes a decompressed instance of <code>Self</code> using the given data.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="../trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_compressed" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#method.from_compressed" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_compressed" class="fn">from_compressed</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>], decompressed_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class='docblock'>Makes a compressed instance of <code>Self</code> using the given data.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_decompressed" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#method.from_decompressed" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_decompressed" class="fn">from_decompressed</a>(value: &'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]) -> Self</h4></section></summary><div class='docblock'>Makes a decompressed instance of <code>Self</code> using the given data.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_compressed-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#method.from_compressed-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_compressed" class="fn">from_compressed</a>(value: <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, decompressed_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class='docblock'>Makes a compressed instance of <code>Self</code> using the given data.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_decompressed-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#237">source</a><a href="#method.from_decompressed-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.CompressableFrom.html#tymethod.from_decompressed" class="fn">from_decompressed</a>(value: <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>) -> Self</h4></section></summary><div class='docblock'>Makes a decompressed instance of <code>Self</code> using the given data.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#231">source</a><a href="#impl-Debug-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#231">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#231">source</a><a href="#impl-Default-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#231">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item" class="associatedtype trait-impl"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static></h4></section><section id="associatedtype.Options" class="associatedtype trait-impl"><a href="#associatedtype.Options" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#238">source</a><a href="#method.read" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>, options: &Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static></h4></section><section id="associatedtype.Options-3" class="associatedtype trait-impl"><a href="#associatedtype.Options-3" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#238">source</a><a href="#method.read-3" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, options: &Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h4></section><section id="associatedtype.Options-1" class="associatedtype trait-impl"><a href="#associatedtype.Options-1" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#238">source</a><a href="#method.read-1" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>, options: &Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="../trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'static></h4></section><section id="associatedtype.Options-2" class="associatedtype trait-impl"><a href="#associatedtype.Options-2" class="anchor">§</a><h4 class="code-header">type <a href="../trait.ReaderWithOptions.html#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.read-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#238">source</a><a href="#method.read-2" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.ReaderWithOptions.html#tymethod.read" class="fn">read</a>(source: <a class="struct" href="../struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>, options: &Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="type" href="type.Result.html" title="type ba2::tes4::Result">Result</a><Self::<a class="associatedtype" href="../trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>></h4></section></summary><div class='docblock'>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-File%3C'bytes%3E" class="impl"><a href="#impl-RefUnwindSafe-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section><section id="impl-Send-for-File%3C'bytes%3E" class="impl"><a href="#impl-Send-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section><section id="impl-Sync-for-File%3C'bytes%3E" class="impl"><a href="#impl-Sync-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section><section id="impl-Unpin-for-File%3C'bytes%3E" class="impl"><a href="#impl-Unpin-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section><section id="impl-UnwindSafe-for-File%3C'bytes%3E" class="impl"><a href="#impl-UnwindSafe-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>"}</script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.FileCompressionOptions.html b/ba2/tes4/struct.FileCompressionOptions.html new file mode 100644 index 0000000..16849ff --- /dev/null +++ b/ba2/tes4/struct.FileCompressionOptions.html @@ -0,0 +1,31 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Common parameters to configure how files are compressed/decompressed."><title>FileCompressionOptions in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileCompressionOptions</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.builder">builder</a></li><li><a href="#method.compression_codec">compression_codec</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-CompressionOptions">Clone</a></li><li><a href="#impl-Copy-for-CompressionOptions">Copy</a></li><li><a href="#impl-Debug-for-CompressionOptions">Debug</a></li><li><a href="#impl-Default-for-CompressionOptions">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-CompressionOptions">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-CompressionOptions">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CompressionOptions">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CompressionOptions">Send</a></li><li><a href="#impl-Sync-for-CompressionOptions">Sync</a></li><li><a href="#impl-Unpin-for-CompressionOptions">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CompressionOptions">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">FileCompressionOptions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/file.rs.html#77-80">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileCompressionOptions { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Common parameters to configure how files are compressed/decompressed.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::tes4::{FileCompressionOptions, Version}; + +<span class="comment">// Configure for TES:IV +</span><span class="kw">let _ </span>= FileCompressionOptions::builder() + .version(Version::TES4) + .build(); + +<span class="comment">// Configure for F3/FNV/TES:V +</span><span class="kw">let _ </span>= FileCompressionOptions::builder() + .version(Version::FO3) + .build(); + +<span class="comment">// Configure for SSE +</span><span class="kw">let _ </span>= FileCompressionOptions::builder() + .version(Version::SSE) + .build();</code></pre></div> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#82-97">source</a><a href="#impl-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><section id="method.builder" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#84-86">source</a><h4 class="code-header">pub fn <a href="#method.builder" class="fn">builder</a>() -> <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h4></section><section id="method.compression_codec" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#89-91">source</a><h4 class="code-header">pub fn <a href="#method.compression_codec" class="fn">compression_codec</a>(&self) -> <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h4></section><section id="method.version" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#94-96">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(&self) -> <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#76">source</a><a href="#impl-Clone-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#76">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#76">source</a><a href="#impl-Debug-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#76">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#76">source</a><a href="#impl-Default-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#76">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#105-112">source</a><a href="#impl-From%3C%26Options%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#106-111">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#99-103">source</a><a href="#impl-From%3COptions%3E-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#100-102">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><section id="impl-Copy-for-CompressionOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#76">source</a><a href="#impl-Copy-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CompressionOptions" class="impl"><a href="#impl-RefUnwindSafe-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section><section id="impl-Send-for-CompressionOptions" class="impl"><a href="#impl-Send-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section><section id="impl-Sync-for-CompressionOptions" class="impl"><a href="#impl-Sync-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section><section id="impl-Unpin-for-CompressionOptions" class="impl"><a href="#impl-Unpin-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section><section id="impl-UnwindSafe-for-CompressionOptions" class="impl"><a href="#impl-UnwindSafe-for-CompressionOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.FileCompressionOptionsBuilder.html b/ba2/tes4/struct.FileCompressionOptionsBuilder.html new file mode 100644 index 0000000..e8eb76b --- /dev/null +++ b/ba2/tes4/struct.FileCompressionOptionsBuilder.html @@ -0,0 +1,13 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `FileCompressionOptions`."><title>FileCompressionOptionsBuilder in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileCompressionOptionsBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.build">build</a></li><li><a href="#method.compression_codec">compression_codec</a></li><li><a href="#method.new">new</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-CompressionOptionsBuilder">Debug</a></li><li><a href="#impl-Default-for-CompressionOptionsBuilder">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-CompressionOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-CompressionOptionsBuilder">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-CompressionOptionsBuilder">RefUnwindSafe</a></li><li><a href="#impl-Send-for-CompressionOptionsBuilder">Send</a></li><li><a href="#impl-Sync-for-CompressionOptionsBuilder">Sync</a></li><li><a href="#impl-Unpin-for-CompressionOptionsBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-CompressionOptionsBuilder">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">FileCompressionOptionsBuilder</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/file.rs.html#18">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileCompressionOptionsBuilder(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions"><code>FileCompressionOptions</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#20-42">source</a><a href="#impl-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><section id="method.build" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#22-24">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) -> <a class="struct" href="struct.FileCompressionOptions.html" title="struct ba2::tes4::FileCompressionOptions">CompressionOptions</a></h4></section><section id="method.compression_codec" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#27-30">source</a><h4 class="code-header">pub fn <a href="#method.compression_codec" class="fn">compression_codec</a>(self, compression_codec: <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a>) -> Self</h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#33-35">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.version" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#38-41">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(self, version: <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a>) -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#16">source</a><a href="#impl-Debug-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#16">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#16">source</a><a href="#impl-Default-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#16">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#50-54">source</a><a href="#impl-From%3C%26Options%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#51-53">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-CompressionOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#44-48">source</a><a href="#impl-From%3COptions%3E-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#45-47">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-CompressionOptionsBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section><section id="impl-Send-for-CompressionOptionsBuilder" class="impl"><a href="#impl-Send-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section><section id="impl-Sync-for-CompressionOptionsBuilder" class="impl"><a href="#impl-Sync-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section><section id="impl-Unpin-for-CompressionOptionsBuilder" class="impl"><a href="#impl-Unpin-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section><section id="impl-UnwindSafe-for-CompressionOptionsBuilder" class="impl"><a href="#impl-UnwindSafe-for-CompressionOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileCompressionOptionsBuilder.html" title="struct ba2::tes4::FileCompressionOptionsBuilder">CompressionOptionsBuilder</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.FileHash.html b/ba2/tes4/struct.FileHash.html new file mode 100644 index 0000000..1d1ca79 --- /dev/null +++ b/ba2/tes4/struct.FileHash.html @@ -0,0 +1,29 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `struct@Hash`."><title>FileHash in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileHash</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li></ul><h3><a href="#deref-methods-Hash">Methods from Deref<Target=Hash></a></h3><ul class="block deref-methods"><li><a href="#method.numeric">numeric</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CHash%3E-for-FileHash">AsMut<Hash></a></li><li><a href="#impl-AsRef%3CHash%3E-for-FileHash">AsRef<Hash></a></li><li><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E">Borrow<FileHash></a></li><li><a href="#impl-Borrow%3CHash%3E-for-FileHash">Borrow<Hash></a></li><li><a href="#impl-BorrowMut%3CHash%3E-for-FileHash">BorrowMut<Hash></a></li><li><a href="#impl-Clone-for-FileHash">Clone</a></li><li><a href="#impl-Copy-for-FileHash">Copy</a></li><li><a href="#impl-Debug-for-FileHash">Debug</a></li><li><a href="#impl-Default-for-FileHash">Default</a></li><li><a href="#impl-Deref-for-FileHash">Deref</a></li><li><a href="#impl-DerefMut-for-FileHash">DerefMut</a></li><li><a href="#impl-Eq-for-FileHash">Eq</a></li><li><a href="#impl-From%3CFileHash%3E-for-Hash">From<FileHash></a></li><li><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E">From<FileHash></a></li><li><a href="#impl-From%3CHash%3E-for-FileHash">From<Hash></a></li><li><a href="#impl-Ord-for-FileHash">Ord</a></li><li><a href="#impl-PartialEq-for-FileHash">PartialEq</a></li><li><a href="#impl-PartialEq%3CFileHash%3E-for-Hash">PartialEq<FileHash></a></li><li><a href="#impl-PartialEq%3CHash%3E-for-FileHash">PartialEq<Hash></a></li><li><a href="#impl-PartialOrd-for-FileHash">PartialOrd</a></li><li><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash">PartialOrd<FileHash></a></li><li><a href="#impl-PartialOrd%3CHash%3E-for-FileHash">PartialOrd<Hash></a></li><li><a href="#impl-StructuralPartialEq-for-FileHash">StructuralPartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-FileHash">RefUnwindSafe</a></li><li><a href="#impl-Send-for-FileHash">Send</a></li><li><a href="#impl-Sync-for-FileHash">Sync</a></li><li><a href="#impl-Unpin-for-FileHash">Unpin</a></li><li><a href="#impl-UnwindSafe-for-FileHash">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">FileHash</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/hashing.rs.html#21">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileHash(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.Hash.html" title="struct ba2::tes4::Hash"><code>Hash</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></div></details></div><h2 id="deref-methods-Hash" class="section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>></span><a href="#deref-methods-Hash" class="anchor">§</a></h2><div id="deref-methods-Hash-1" class="impl-items"><section id="method.numeric" class="method"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#31-37">source</a><h4 class="code-header">pub fn <a href="#method.numeric" class="fn">numeric</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u64.html">u64</a></h4></section></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-AsMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-AsRef%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-Borrow%3CFileHash%3E-for-Key%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'bytes></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Borrow%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-BorrowMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Clone-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Debug-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Default-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Deref-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&self) -> &Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-DerefMut-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&mut self) -> &mut Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-From%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#impl-From%3CFileHash%3E-for-Key%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.DirectoryKey.html" title="struct ba2::tes4::DirectoryKey">Key</a><'static></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/directory.rs.html#7">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-From%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Ord-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialEq%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialEq%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialEq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialOrd%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialOrd-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Copy-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section><section id="impl-Eq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Eq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section><section id="impl-StructuralPartialEq-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-StructuralPartialEq-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-FileHash" class="impl"><a href="#impl-RefUnwindSafe-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section><section id="impl-Send-for-FileHash" class="impl"><a href="#impl-Send-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section><section id="impl-Sync-for-FileHash" class="impl"><a href="#impl-Sync-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section><section id="impl-Unpin-for-FileHash" class="impl"><a href="#impl-Unpin-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section><section id="impl-UnwindSafe-for-FileHash" class="impl"><a href="#impl-UnwindSafe-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.FileReadOptions.html b/ba2/tes4/struct.FileReadOptions.html new file mode 100644 index 0000000..284b39f --- /dev/null +++ b/ba2/tes4/struct.FileReadOptions.html @@ -0,0 +1,37 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Common parameters to configure how files are read."><title>FileReadOptions in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileReadOptions</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.builder">builder</a></li><li><a href="#method.compression_codec">compression_codec</a></li><li><a href="#method.compression_result">compression_result</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-ReadOptions">Clone</a></li><li><a href="#impl-Copy-for-ReadOptions">Copy</a></li><li><a href="#impl-Debug-for-ReadOptions">Debug</a></li><li><a href="#impl-Default-for-ReadOptions">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-ReadOptions">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-ReadOptions">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-ReadOptions">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ReadOptions">Send</a></li><li><a href="#impl-Sync-for-ReadOptions">Sync</a></li><li><a href="#impl-Unpin-for-ReadOptions">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ReadOptions">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">FileReadOptions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/file.rs.html#188-191">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileReadOptions { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Common parameters to configure how files are read.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>ba2::{ + tes4::{FileReadOptions, Version}, + CompressionResult, +}; + +<span class="comment">// Read and compress a file for TES:IV +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .version(Version::TES4) + .compression_result(CompressionResult::Compressed) + .build(); + +<span class="comment">// Read and compress a file for F3/FNV/TES:V +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .version(Version::FO3) + .compression_result(CompressionResult::Compressed) + .build(); + +<span class="comment">// Read and compress a file for SSE +</span><span class="kw">let _ </span>= FileReadOptions::builder() + .version(Version::SSE) + .compression_result(CompressionResult::Compressed) + .build();</code></pre></div> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#193-213">source</a><a href="#impl-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><section id="method.builder" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#195-197">source</a><h4 class="code-header">pub fn <a href="#method.builder" class="fn">builder</a>() -> <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h4></section><section id="method.compression_codec" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#200-202">source</a><h4 class="code-header">pub fn <a href="#method.compression_codec" class="fn">compression_codec</a>(&self) -> <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a></h4></section><section id="method.compression_result" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#205-207">source</a><h4 class="code-header">pub fn <a href="#method.compression_result" class="fn">compression_result</a>(&self) -> <a class="enum" href="../enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a></h4></section><section id="method.version" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#210-212">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(&self) -> <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#187">source</a><a href="#impl-Clone-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#187">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#187">source</a><a href="#impl-Debug-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#187">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#187">source</a><a href="#impl-Default-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#187">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#221-228">source</a><a href="#impl-From%3C%26Options%3E-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#222-227">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#215-219">source</a><a href="#impl-From%3COptions%3E-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#216-218">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><section id="impl-Copy-for-ReadOptions" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#187">source</a><a href="#impl-Copy-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ReadOptions" class="impl"><a href="#impl-RefUnwindSafe-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section><section id="impl-Send-for-ReadOptions" class="impl"><a href="#impl-Send-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section><section id="impl-Sync-for-ReadOptions" class="impl"><a href="#impl-Sync-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section><section id="impl-Unpin-for-ReadOptions" class="impl"><a href="#impl-Unpin-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section><section id="impl-UnwindSafe-for-ReadOptions" class="impl"><a href="#impl-UnwindSafe-for-ReadOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.FileReadOptionsBuilder.html b/ba2/tes4/struct.FileReadOptionsBuilder.html new file mode 100644 index 0000000..00ad5c0 --- /dev/null +++ b/ba2/tes4/struct.FileReadOptionsBuilder.html @@ -0,0 +1,13 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="See also `FileReadOptions`."><title>FileReadOptionsBuilder in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">FileReadOptionsBuilder</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.build">build</a></li><li><a href="#method.compression_codec">compression_codec</a></li><li><a href="#method.compression_result">compression_result</a></li><li><a href="#method.new">new</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-ReadOptionsBuilder">Debug</a></li><li><a href="#impl-Default-for-ReadOptionsBuilder">Default</a></li><li><a href="#impl-From%3C%26Options%3E-for-ReadOptionsBuilder">From<&Options></a></li><li><a href="#impl-From%3COptions%3E-for-ReadOptionsBuilder">From<Options></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-ReadOptionsBuilder">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ReadOptionsBuilder">Send</a></li><li><a href="#impl-Sync-for-ReadOptionsBuilder">Sync</a></li><li><a href="#impl-Unpin-for-ReadOptionsBuilder">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ReadOptionsBuilder">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">FileReadOptionsBuilder</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/file.rs.html#117">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct FileReadOptionsBuilder(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>See also <a href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions"><code>FileReadOptions</code></a>.</p> +</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#119-147">source</a><a href="#impl-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><section id="method.build" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#121-123">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) -> <a class="struct" href="struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section><section id="method.compression_codec" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#126-129">source</a><h4 class="code-header">pub fn <a href="#method.compression_codec" class="fn">compression_codec</a>(self, compression_codec: <a class="enum" href="enum.CompressionCodec.html" title="enum ba2::tes4::CompressionCodec">CompressionCodec</a>) -> Self</h4></section><section id="method.compression_result" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#132-135">source</a><h4 class="code-header">pub fn <a href="#method.compression_result" class="fn">compression_result</a>(self, compression_result: <a class="enum" href="../enum.CompressionResult.html" title="enum ba2::CompressionResult">CompressionResult</a>) -> Self</h4></section><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#138-140">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.version" class="method"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#143-146">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(self, version: <a class="enum" href="enum.Version.html" title="enum ba2::tes4::Version">Version</a>) -> Self</h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#115">source</a><a href="#impl-Debug-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#115">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#115">source</a><a href="#impl-Default-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#115">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3C%26Options%3E-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#155-159">source</a><a href="#impl-From%3C%26Options%3E-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#156-158">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: &<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3COptions%3E-for-ReadOptionsBuilder" class="impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#149-153">source</a><a href="#impl-From%3COptions%3E-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/file.rs.html#150-152">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">ArchiveOptions</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ReadOptionsBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section><section id="impl-Send-for-ReadOptionsBuilder" class="impl"><a href="#impl-Send-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section><section id="impl-Sync-for-ReadOptionsBuilder" class="impl"><a href="#impl-Sync-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section><section id="impl-Unpin-for-ReadOptionsBuilder" class="impl"><a href="#impl-Unpin-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section><section id="impl-UnwindSafe-for-ReadOptionsBuilder" class="impl"><a href="#impl-UnwindSafe-for-ReadOptionsBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.FileReadOptionsBuilder.html" title="struct ba2::tes4::FileReadOptionsBuilder">ReadOptionsBuilder</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/struct.Hash.html b/ba2/tes4/struct.Hash.html new file mode 100644 index 0000000..979c8e1 --- /dev/null +++ b/ba2/tes4/struct.Hash.html @@ -0,0 +1,47 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The underlying hash object used to uniquely identify objects within the archive."><title>Hash in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Hash</a></h2><div class="sidebar-elems"><section><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.crc">crc</a></li><li><a href="#structfield.first">first</a></li><li><a href="#structfield.last">last</a></li><li><a href="#structfield.last2">last2</a></li><li><a href="#structfield.length">length</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li><li><a href="#method.numeric">numeric</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-AsMut%3CHash%3E-for-DirectoryHash">AsMut<Hash></a></li><li><a href="#impl-AsMut%3CHash%3E-for-FileHash">AsMut<Hash></a></li><li><a href="#impl-AsRef%3CHash%3E-for-DirectoryHash">AsRef<Hash></a></li><li><a href="#impl-AsRef%3CHash%3E-for-FileHash">AsRef<Hash></a></li><li><a href="#impl-Borrow%3CHash%3E-for-DirectoryHash">Borrow<Hash></a></li><li><a href="#impl-Borrow%3CHash%3E-for-FileHash">Borrow<Hash></a></li><li><a href="#impl-BorrowMut%3CHash%3E-for-DirectoryHash">BorrowMut<Hash></a></li><li><a href="#impl-BorrowMut%3CHash%3E-for-FileHash">BorrowMut<Hash></a></li><li><a href="#impl-Clone-for-Hash">Clone</a></li><li><a href="#impl-Copy-for-Hash">Copy</a></li><li><a href="#impl-Debug-for-Hash">Debug</a></li><li><a href="#impl-Default-for-Hash">Default</a></li><li><a href="#impl-Eq-for-Hash">Eq</a></li><li><a href="#impl-From%3CDirectoryHash%3E-for-Hash">From<DirectoryHash></a></li><li><a href="#impl-From%3CFileHash%3E-for-Hash">From<FileHash></a></li><li><a href="#impl-From%3CHash%3E-for-DirectoryHash">From<Hash></a></li><li><a href="#impl-From%3CHash%3E-for-FileHash">From<Hash></a></li><li><a href="#impl-Ord-for-Hash">Ord</a></li><li><a href="#impl-PartialEq-for-Hash">PartialEq</a></li><li><a href="#impl-PartialEq%3CDirectoryHash%3E-for-Hash">PartialEq<DirectoryHash></a></li><li><a href="#impl-PartialEq%3CFileHash%3E-for-Hash">PartialEq<FileHash></a></li><li><a href="#impl-PartialEq%3CHash%3E-for-DirectoryHash">PartialEq<Hash></a></li><li><a href="#impl-PartialEq%3CHash%3E-for-FileHash">PartialEq<Hash></a></li><li><a href="#impl-PartialOrd-for-Hash">PartialOrd</a></li><li><a href="#impl-PartialOrd%3CDirectoryHash%3E-for-Hash">PartialOrd<DirectoryHash></a></li><li><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash">PartialOrd<FileHash></a></li><li><a href="#impl-PartialOrd%3CHash%3E-for-DirectoryHash">PartialOrd<Hash></a></li><li><a href="#impl-PartialOrd%3CHash%3E-for-FileHash">PartialOrd<Hash></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Hash">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Hash">Send</a></li><li><a href="#impl-Sync-for-Hash">Sync</a></li><li><a href="#impl-Unpin-for-Hash">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Hash">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="struct" href="#">Hash</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/hashing.rs.html#8-18">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code><div class="code-attribute">#[repr(C)]</div>pub struct Hash { + pub last: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>, + pub last2: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>, + pub length: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>, + pub first: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>, + pub crc: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a>, +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The underlying hash object used to uniquely identify objects within the archive.</p> +</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.last" class="structfield section-header"><a href="#structfield.last" class="anchor field">§</a><code>last: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></code></span><div class="docblock"><p>The last character of the path (directory) or stem (file).</p> +</div><span id="structfield.last2" class="structfield section-header"><a href="#structfield.last2" class="anchor field">§</a><code>last2: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></code></span><div class="docblock"><p>The second to last character of the path (directory) or stem (file).</p> +</div><span id="structfield.length" class="structfield section-header"><a href="#structfield.length" class="anchor field">§</a><code>length: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></code></span><div class="docblock"><p>The length of the path (directory) or stem (file).</p> +</div><span id="structfield.first" class="structfield section-header"><a href="#structfield.first" class="anchor field">§</a><code>first: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a></code></span><div class="docblock"><p>The first character of the path (directory) or stem (file).</p> +</div><span id="structfield.crc" class="structfield section-header"><a href="#structfield.crc" class="anchor field">§</a><code>crc: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u32.html">u32</a></code></span><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#23-38">source</a><a href="#impl-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><section id="method.new" class="method"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#25-27">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section><section id="method.numeric" class="method"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#31-37">source</a><h4 class="code-header">pub fn <a href="#method.numeric" class="fn">numeric</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u64.html">u64</a></h4></section></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-AsMut%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-AsMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_mut-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.as_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-AsRef%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-AsRef%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-AsRef%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ref-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.as_ref-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-Borrow%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Borrow%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-Borrow%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-BorrowMut%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-BorrowMut%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#6">source</a><a href="#impl-Clone-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#6">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#6">source</a><a href="#impl-Debug-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#6">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.77.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#6">source</a><a href="#impl-Default-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#6">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CDirectoryHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-From%3CDirectoryHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-From%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-From%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-From%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#54-58">source</a><a href="#impl-Ord-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#55-57">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CDirectoryHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialEq%3CDirectoryHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialEq%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialEq%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialEq%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.eq-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#40-44">source</a><a href="#impl-PartialEq-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-4" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#41-43">source</a><a href="#method.eq-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used +by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242">source</a></span><a href="#method.ne-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always +sufficient, and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CDirectoryHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialOrd%3CDirectoryHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CFileHash%3E-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialOrd%3CFileHash%3E-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-3" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.partial_cmp-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-3" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CHash%3E-for-DirectoryHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#impl-PartialOrd%3CHash%3E-for-DirectoryHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.DirectoryHash.html" title="struct ba2::tes4::DirectoryHash">DirectoryHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-4" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#20">source</a><a href="#method.partial_cmp-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-4" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CHash%3E-for-FileHash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#impl-PartialOrd%3CHash%3E-for-FileHash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>> for <a class="struct" href="struct.FileHash.html" title="struct ba2::tes4::FileHash">FileHash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#21">source</a><a href="#method.partial_cmp-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialOrd-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#48-52">source</a><a href="#impl-PartialOrd-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#49-51">source</a><a href="#method.partial_cmp-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Self</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127">source</a></span><a href="#method.lt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144">source</a></span><a href="#method.le-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160">source</a></span><a href="#method.gt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177">source</a></span><a href="#method.ge-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> +operator. <a href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><section id="impl-Copy-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#6">source</a><a href="#impl-Copy-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section><section id="impl-Eq-for-Hash" class="impl"><a class="src rightside" href="../../src/ba2/tes4/hashing.rs.html#46">source</a><a href="#impl-Eq-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-Hash" class="impl"><a href="#impl-RefUnwindSafe-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section><section id="impl-Send-for-Hash" class="impl"><a href="#impl-Send-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section><section id="impl-Sync-for-Hash" class="impl"><a href="#impl-Sync-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section><section id="impl-Unpin-for-Hash" class="impl"><a href="#impl-Unpin-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section><section id="impl-UnwindSafe-for-Hash" class="impl"><a href="#impl-UnwindSafe-for-Hash" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Hash.html" title="struct ba2::tes4::Hash">Hash</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where + T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.77.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where + T: ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#764">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#767">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#757">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> +<p>That is, this conversion is whatever the implementation of +<code><a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p> +</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where + T: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.77.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#804-806">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#811">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#789-791">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where + U: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.77.0/src/core/convert/mod.rs.html#796">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/tes4/type.Result.html b/ba2/tes4/type.Result.html new file mode 100644 index 0000000..56b68eb --- /dev/null +++ b/ba2/tes4/type.Result.html @@ -0,0 +1,7 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Result` type in crate `ba2`."><title>Result in ba2::tes4 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Result</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Err">Err</a></li><li><a href="#variant.Ok">Ok</a></li></ul></section><h2><a href="index.html">In ba2::tes4</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../index.html">ba2</a>::<wbr><a href="index.html">tes4</a>::<wbr><a class="type" href="#">Result</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/ba2/tes4/mod.rs.html#135">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub type Result<T> = <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a>>;</code></pre><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>enum Result<T> { + Ok(T), + Err(<a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a>), +}</code></pre><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Ok" class="variant"><a href="#variant.Ok" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Ok(T)</h3></section><div class="docblock"><p>Contains the success value</p> +</div><section id="variant.Err" class="variant"><a href="#variant.Err" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Err(<a class="enum" href="enum.Error.html" title="enum ba2::tes4::Error">Error</a>)</h3></section><div class="docblock"><p>Contains the error value</p> +</div></div><script src="../../type.impl/core/result/enum.Result.js" data-self-path="ba2::tes4::Result" async></script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/trait.ByteSlice.html b/ba2/trait.ByteSlice.html new file mode 100644 index 0000000..5fca90e --- /dev/null +++ b/ba2/trait.ByteSlice.html @@ -0,0 +1,1884 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A trait that extends `&[u8]` with string oriented methods."><title>ByteSlice in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ByteSlice</a></h2><div class="sidebar-elems"><section><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.as_bstr">as_bstr</a></li><li><a href="#method.as_bstr_mut">as_bstr_mut</a></li><li><a href="#method.bytes">bytes</a></li><li><a href="#method.char_indices">char_indices</a></li><li><a href="#method.chars">chars</a></li><li><a href="#method.contains_str">contains_str</a></li><li><a href="#method.ends_with_str">ends_with_str</a></li><li><a href="#method.escape_bytes">escape_bytes</a></li><li><a href="#method.fields">fields</a></li><li><a href="#method.fields_with">fields_with</a></li><li><a href="#method.find">find</a></li><li><a href="#method.find_byte">find_byte</a></li><li><a href="#method.find_byteset">find_byteset</a></li><li><a href="#method.find_char">find_char</a></li><li><a href="#method.find_iter">find_iter</a></li><li><a href="#method.find_non_ascii_byte">find_non_ascii_byte</a></li><li><a href="#method.find_not_byteset">find_not_byteset</a></li><li><a href="#method.from_os_str">from_os_str</a></li><li><a href="#method.from_path">from_path</a></li><li><a href="#method.grapheme_indices">grapheme_indices</a></li><li><a href="#method.graphemes">graphemes</a></li><li><a href="#method.is_ascii">is_ascii</a></li><li><a href="#method.is_utf8">is_utf8</a></li><li><a href="#method.last_byte">last_byte</a></li><li><a href="#method.lines">lines</a></li><li><a href="#method.lines_with_terminator">lines_with_terminator</a></li><li><a href="#method.make_ascii_lowercase">make_ascii_lowercase</a></li><li><a href="#method.make_ascii_uppercase">make_ascii_uppercase</a></li><li><a href="#method.repeatn">repeatn</a></li><li><a href="#method.replace">replace</a></li><li><a href="#method.replace_into">replace_into</a></li><li><a href="#method.replacen">replacen</a></li><li><a href="#method.replacen_into">replacen_into</a></li><li><a href="#method.reverse_bytes">reverse_bytes</a></li><li><a href="#method.reverse_chars">reverse_chars</a></li><li><a href="#method.reverse_graphemes">reverse_graphemes</a></li><li><a href="#method.rfind">rfind</a></li><li><a href="#method.rfind_byte">rfind_byte</a></li><li><a href="#method.rfind_byteset">rfind_byteset</a></li><li><a href="#method.rfind_char">rfind_char</a></li><li><a href="#method.rfind_iter">rfind_iter</a></li><li><a href="#method.rfind_not_byteset">rfind_not_byteset</a></li><li><a href="#method.rsplit_once_str">rsplit_once_str</a></li><li><a href="#method.rsplit_str">rsplit_str</a></li><li><a href="#method.rsplitn_str">rsplitn_str</a></li><li><a href="#method.sentence_indices">sentence_indices</a></li><li><a href="#method.sentences">sentences</a></li><li><a href="#method.split_once_str">split_once_str</a></li><li><a href="#method.split_str">split_str</a></li><li><a href="#method.splitn_str">splitn_str</a></li><li><a href="#method.starts_with_str">starts_with_str</a></li><li><a href="#method.to_ascii_lowercase">to_ascii_lowercase</a></li><li><a href="#method.to_ascii_uppercase">to_ascii_uppercase</a></li><li><a href="#method.to_lowercase">to_lowercase</a></li><li><a href="#method.to_lowercase_into">to_lowercase_into</a></li><li><a href="#method.to_os_str">to_os_str</a></li><li><a href="#method.to_os_str_lossy">to_os_str_lossy</a></li><li><a href="#method.to_path">to_path</a></li><li><a href="#method.to_path_lossy">to_path_lossy</a></li><li><a href="#method.to_str">to_str</a></li><li><a href="#method.to_str_lossy">to_str_lossy</a></li><li><a href="#method.to_str_lossy_into">to_str_lossy_into</a></li><li><a href="#method.to_str_unchecked">to_str_unchecked</a></li><li><a href="#method.to_uppercase">to_uppercase</a></li><li><a href="#method.to_uppercase_into">to_uppercase_into</a></li><li><a href="#method.trim">trim</a></li><li><a href="#method.trim_end">trim_end</a></li><li><a href="#method.trim_end_with">trim_end_with</a></li><li><a href="#method.trim_start">trim_start</a></li><li><a href="#method.trim_start_with">trim_start_with</a></li><li><a href="#method.trim_with">trim_with</a></li><li><a href="#method.utf8_chunks">utf8_chunks</a></li><li><a href="#method.word_indices">word_indices</a></li><li><a href="#method.words">words</a></li><li><a href="#method.words_with_break_indices">words_with_break_indices</a></li><li><a href="#method.words_with_breaks">words_with_breaks</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-ByteSlice-for-%5Bu8;+N%5D">[u8; N]</a></li><li><a href="#impl-ByteSlice-for-%5Bu8%5D">[u8]</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="index.html">ba2</a>::<wbr><a class="trait" href="#">ByteSlice</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait ByteSlice: Sealed { +<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 76 methods</span></summary> // Provided methods + fn <a href="#method.as_bstr" class="fn">as_bstr</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.as_bstr_mut" class="fn">as_bstr_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.from_os_str" class="fn">from_os_str</a>(os_str: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> { ... } +<span class="item-spacer"></span> fn <a href="#method.from_path" class="fn">from_path</a>(path: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_str" class="fn">to_str</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>, Utf8Error> { ... } +<span class="item-spacer"></span> unsafe fn <a href="#method.to_str_unchecked" class="fn">to_str_unchecked</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_str_lossy" class="fn">to_str_lossy</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_str_lossy_into" class="fn">to_str_lossy_into</a>(&self, dest: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) { ... } +<span class="item-spacer"></span> fn <a href="#method.to_os_str" class="fn">to_os_str</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>, Utf8Error> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_os_str_lossy" class="fn">to_os_str_lossy</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_path" class="fn">to_path</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, Utf8Error> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_path_lossy" class="fn">to_path_lossy</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.repeatn" class="fn">repeatn</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.contains_str" class="fn">contains_str</a><B>(&self, needle: B) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.starts_with_str" class="fn">starts_with_str</a><B>(&self, prefix: B) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.ends_with_str" class="fn">ends_with_str</a><B>(&self, suffix: B) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.find" class="fn">find</a><B>(&self, needle: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.rfind" class="fn">rfind</a><B>(&self, needle: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.find_iter" class="fn">find_iter</a><B, 'h, 'n>(&'h self, needle: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'n B</a>) -> Find<'h, 'n> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.rfind_iter" class="fn">rfind_iter</a><B, 'h, 'n>(&'h self, needle: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'n B</a>) -> FindReverse<'h, 'n> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.find_byte" class="fn">find_byte</a>(&self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.rfind_byte" class="fn">rfind_byte</a>(&self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.find_char" class="fn">find_char</a>(&self, ch: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.rfind_char" class="fn">rfind_char</a>(&self, ch: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.find_byteset" class="fn">find_byteset</a><B>(&self, byteset: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.find_not_byteset" class="fn">find_not_byteset</a><B>(&self, byteset: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.rfind_byteset" class="fn">rfind_byteset</a><B>(&self, byteset: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.rfind_not_byteset" class="fn">rfind_not_byteset</a><B>(&self, byteset: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.fields" class="fn">fields</a>(&self) -> Fields<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.fields_with" class="fn">fields_with</a><F>(&self, f: F) -> FieldsWith<'_, F> + <span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.split_str" class="fn">split_str</a><B, 'h, 's>(&'h self, splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'s B</a>) -> Split<'h, 's> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.rsplit_str" class="fn">rsplit_str</a><B, 'h, 's>(&'h self, splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'s B</a>) -> SplitReverse<'h, 's> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.split_once_str" class="fn">split_once_str</a><B, 'a>( + &'a self, + splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&B</a> + ) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>], &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>])> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.rsplit_once_str" class="fn">rsplit_once_str</a><B, 'a>( + &'a self, + splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&B</a> + ) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>], &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>])> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.splitn_str" class="fn">splitn_str</a><B, 'h, 's>( + &'h self, + limit: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'s B</a> + ) -> SplitN<'h, 's> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.rsplitn_str" class="fn">rsplitn_str</a><B, 'h, 's>( + &'h self, + limit: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'s B</a> + ) -> SplitNReverse<'h, 's> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.replace" class="fn">replace</a><N, R>(&self, needle: N, replacement: R) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> + <span class="where">where N: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.replacen" class="fn">replacen</a><N, R>(&self, needle: N, replacement: R, limit: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> + <span class="where">where N: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.replace_into" class="fn">replace_into</a><N, R>(&self, needle: N, replacement: R, dest: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) + <span class="where">where N: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.replacen_into" class="fn">replacen_into</a><N, R>( + &self, + needle: N, + replacement: R, + limit: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + dest: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> + ) + <span class="where">where N: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.bytes" class="fn">bytes</a>(&self) -> Bytes<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.chars" class="fn">chars</a>(&self) -> Chars<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.char_indices" class="fn">char_indices</a>(&self) -> CharIndices<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.utf8_chunks" class="fn">utf8_chunks</a>(&self) -> Utf8Chunks<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.graphemes" class="fn">graphemes</a>(&self) -> Graphemes<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.grapheme_indices" class="fn">grapheme_indices</a>(&self) -> GraphemeIndices<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.words" class="fn">words</a>(&self) -> Words<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.word_indices" class="fn">word_indices</a>(&self) -> WordIndices<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.words_with_breaks" class="fn">words_with_breaks</a>(&self) -> WordsWithBreaks<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.words_with_break_indices" class="fn">words_with_break_indices</a>(&self) -> WordsWithBreakIndices<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.sentences" class="fn">sentences</a>(&self) -> Sentences<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.sentence_indices" class="fn">sentence_indices</a>(&self) -> SentenceIndices<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.lines" class="fn">lines</a>(&self) -> Lines<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.lines_with_terminator" class="fn">lines_with_terminator</a>(&self) -> LinesWithTerminator<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.trim" class="fn">trim</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.trim_start" class="fn">trim_start</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.trim_end" class="fn">trim_end</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.trim_with" class="fn">trim_with</a><F>(&self, trim: F) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a> + <span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.trim_start_with" class="fn">trim_start_with</a><F>(&self, trim: F) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a> + <span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.trim_end_with" class="fn">trim_end_with</a><F>(&self, trim: F) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a> + <span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_lowercase" class="fn">to_lowercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_lowercase_into" class="fn">to_lowercase_into</a>(&self, buf: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) { ... } +<span class="item-spacer"></span> fn <a href="#method.to_ascii_lowercase" class="fn">to_ascii_lowercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.make_ascii_lowercase" class="fn">make_ascii_lowercase</a>(&mut self) { ... } +<span class="item-spacer"></span> fn <a href="#method.to_uppercase" class="fn">to_uppercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.to_uppercase_into" class="fn">to_uppercase_into</a>(&self, buf: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>) { ... } +<span class="item-spacer"></span> fn <a href="#method.to_ascii_uppercase" class="fn">to_ascii_uppercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.make_ascii_uppercase" class="fn">make_ascii_uppercase</a>(&mut self) { ... } +<span class="item-spacer"></span> fn <a href="#method.escape_bytes" class="fn">escape_bytes</a>(&self) -> EscapeBytes<'_> { ... } +<span class="item-spacer"></span> fn <a href="#method.reverse_bytes" class="fn">reverse_bytes</a>(&mut self) { ... } +<span class="item-spacer"></span> fn <a href="#method.reverse_chars" class="fn">reverse_chars</a>(&mut self) { ... } +<span class="item-spacer"></span> fn <a href="#method.reverse_graphemes" class="fn">reverse_graphemes</a>(&mut self) { ... } +<span class="item-spacer"></span> fn <a href="#method.is_ascii" class="fn">is_ascii</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.is_utf8" class="fn">is_utf8</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.last_byte" class="fn">last_byte</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.find_non_ascii_byte" class="fn">find_non_ascii_byte</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> { ... } +</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait that extends <code>&[u8]</code> with string oriented methods.</p> +<p>This trait is sealed and cannot be implemented outside of <code>bstr</code>.</p> +</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.as_bstr" class="method"><h4 class="code-header">fn <a href="#method.as_bstr" class="fn">as_bstr</a>(&self) -> &<a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class="docblock"><p>Return this byte slice as a <code>&BStr</code>.</p> +<p>Use <code>&BStr</code> is useful because of its <code>fmt::Debug</code> representation +and various other trait implementations (such as <code>PartialEq</code> and +<code>PartialOrd</code>). In particular, the <code>Debug</code> implementation for <code>BStr</code> +shows its bytes as a normal string. For invalid UTF-8, hex escape +sequences are used.</p> +<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">println!</span>(<span class="string">"{:?}"</span>, <span class="string">b"foo\xFFbar"</span>.as_bstr());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.as_bstr_mut" class="method"><h4 class="code-header">fn <a href="#method.as_bstr_mut" class="fn">as_bstr_mut</a>(&mut self) -> &mut <a class="struct" href="struct.BStr.html" title="struct ba2::BStr">BStr</a></h4></section></summary><div class="docblock"><p>Return this byte slice as a <code>&mut BStr</code>.</p> +<p>Use <code>&mut BStr</code> is useful because of its <code>fmt::Debug</code> representation +and various other trait implementations (such as <code>PartialEq</code> and +<code>PartialOrd</code>). In particular, the <code>Debug</code> implementation for <code>BStr</code> +shows its bytes as a normal string. For invalid UTF-8, hex escape +sequences are used.</p> +<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>bytes = <span class="kw-2">*</span><span class="string">b"foo\xFFbar"</span>; +<span class="macro">println!</span>(<span class="string">"{:?}"</span>, <span class="kw-2">&mut </span>bytes.as_bstr_mut());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_os_str" class="method"><h4 class="code-header">fn <a href="#method.from_os_str" class="fn">from_os_str</a>(os_str: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Create an immutable byte string from an OS string slice.</p> +<p>When the underlying bytes of OS strings are accessible, then this +always succeeds and is zero cost. Otherwise, this returns <code>None</code> if the +given OS string is not valid UTF-8. (For example, when the underlying +bytes are inaccessible on Windows, file paths are allowed to be a +sequence of arbitrary 16-bit integers. Not all such sequences can be +transcoded to valid UTF-8.)</p> +<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::ffi::OsStr; + +<span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>os_str = OsStr::new(<span class="string">"foo"</span>); +<span class="kw">let </span>bs = <[u8]>::from_os_str(os_str).expect(<span class="string">"should be valid UTF-8"</span>); +<span class="macro">assert_eq!</span>(bs, B(<span class="string">"foo"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_path" class="method"><h4 class="code-header">fn <a href="#method.from_path" class="fn">from_path</a>(path: &<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Create an immutable byte string from a file path.</p> +<p>When the underlying bytes of paths are accessible, then this always +succeeds and is zero cost. Otherwise, this returns <code>None</code> if the given +path is not valid UTF-8. (For example, when the underlying bytes are +inaccessible on Windows, file paths are allowed to be a sequence of +arbitrary 16-bit integers. Not all such sequences can be transcoded to +valid UTF-8.)</p> +<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path; + +<span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>path = Path::new(<span class="string">"foo"</span>); +<span class="kw">let </span>bs = <[u8]>::from_path(path).expect(<span class="string">"should be valid UTF-8"</span>); +<span class="macro">assert_eq!</span>(bs, B(<span class="string">"foo"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_str" class="method"><h4 class="code-header">fn <a href="#method.to_str" class="fn">to_str</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>, Utf8Error></h4></section></summary><div class="docblock"><p>Safely convert this byte string into a <code>&str</code> if it’s valid UTF-8.</p> +<p>If this byte string is not valid UTF-8, then an error is returned. The +error returned indicates the first invalid byte found and the length +of the error.</p> +<p>In cases where a lossy conversion to <code>&str</code> is acceptable, then use one +of the <a href="trait.ByteSlice.html#method.to_str_lossy"><code>to_str_lossy</code></a> or +<a href="trait.ByteSlice.html#method.to_str_lossy_into"><code>to_str_lossy_into</code></a> +methods.</p> +<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice, ByteVec}; + +<span class="kw">let </span>s = B(<span class="string">"☃βツ"</span>).to_str()<span class="question-mark">?</span>; +<span class="macro">assert_eq!</span>(<span class="string">"☃βツ"</span>, s); + +<span class="kw">let </span><span class="kw-2">mut </span>bstring = <Vec<u8>>::from(<span class="string">"☃βツ"</span>); +bstring.push(<span class="string">b'\xFF'</span>); +<span class="kw">let </span>err = bstring.to_str().unwrap_err(); +<span class="macro">assert_eq!</span>(<span class="number">8</span>, err.valid_up_to());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_str_unchecked" class="method"><h4 class="code-header">unsafe fn <a href="#method.to_str_unchecked" class="fn">to_str_unchecked</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a></h4></section></summary><div class="docblock"><p>Unsafely convert this byte string into a <code>&str</code>, without checking for +valid UTF-8.</p> +<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5> +<p>Callers <em>must</em> ensure that this byte string is valid UTF-8 before +calling this method. Converting a byte string into a <code>&str</code> that is +not valid UTF-8 is considered undefined behavior.</p> +<p>This routine is useful in performance sensitive contexts where the +UTF-8 validity of the byte string is already known and it is +undesirable to pay the cost of an additional UTF-8 validation check +that <a href="trait.ByteSlice.html#method.to_str"><code>to_str</code></a> performs.</p> +<h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="comment">// SAFETY: This is safe because string literals are guaranteed to be +// valid UTF-8 by the Rust compiler. +</span><span class="kw">let </span>s = <span class="kw">unsafe </span>{ B(<span class="string">"☃βツ"</span>).to_str_unchecked() }; +<span class="macro">assert_eq!</span>(<span class="string">"☃βツ"</span>, s);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_str_lossy" class="method"><h4 class="code-header">fn <a href="#method.to_str_lossy" class="fn">to_str_lossy</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Convert this byte string to a valid UTF-8 string by replacing invalid +UTF-8 bytes with the Unicode replacement codepoint (<code>U+FFFD</code>).</p> +<p>If the byte string is already valid UTF-8, then no copying or +allocation is performed and a borrrowed string slice is returned. If +the byte string is not valid UTF-8, then an owned string buffer is +returned with invalid bytes replaced by the replacement codepoint.</p> +<p>This method uses the “substitution of maximal subparts” (Unicode +Standard, Chapter 3, Section 9) strategy for inserting the replacement +codepoint. Specifically, a replacement codepoint is inserted whenever a +byte is found that cannot possibly lead to a valid code unit sequence. +If there were previous bytes that represented a prefix of a well-formed +code unit sequence, then all of those bytes are substituted with a +single replacement codepoint. The “substitution of maximal subparts” +strategy is the same strategy used by +<a href="https://www.w3.org/TR/encoding/">W3C’s Encoding standard</a>. +For a more precise description of the maximal subpart strategy, see +the Unicode Standard, Chapter 3, Section 9. See also +<a href="https://www.unicode.org/review/pr-121.html">Public Review Issue #121</a>.</p> +<p>N.B. Rust’s standard library also appears to use the same strategy, +but it does not appear to be an API guarantee.</p> +<h5 id="examples-6"><a class="doc-anchor" href="#examples-6">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::borrow::Cow; + +<span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>bstring = <Vec<u8>>::from(<span class="string">"☃βツ"</span>); +<span class="macro">assert_eq!</span>(Cow::Borrowed(<span class="string">"☃βツ"</span>), bstring.to_str_lossy()); + +<span class="comment">// Add a byte that makes the sequence invalid. +</span>bstring.push(<span class="string">b'\xFF'</span>); +<span class="macro">assert_eq!</span>(Cow::Borrowed(<span class="string">"☃βツ\u{FFFD}"</span>), bstring.to_str_lossy());</code></pre></div> +<p>This demonstrates the “maximal subpart” substitution logic.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="comment">// \x61 is the ASCII codepoint for 'a'. +// \xF1\x80\x80 is a valid 3-byte code unit prefix. +// \xE1\x80 is a valid 2-byte code unit prefix. +// \xC2 is a valid 1-byte code unit prefix. +// \x62 is the ASCII codepoint for 'b'. +// +// In sum, each of the prefixes is replaced by a single replacement +// codepoint since none of the prefixes are properly completed. This +// is in contrast to other strategies that might insert a replacement +// codepoint for every single byte. +</span><span class="kw">let </span>bs = B(<span class="string">b"\x61\xF1\x80\x80\xE1\x80\xC2\x62"</span>); +<span class="macro">assert_eq!</span>(<span class="string">"a\u{FFFD}\u{FFFD}\u{FFFD}b"</span>, bs.to_str_lossy());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_str_lossy_into" class="method"><h4 class="code-header">fn <a href="#method.to_str_lossy_into" class="fn">to_str_lossy_into</a>(&self, dest: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</h4></section></summary><div class="docblock"><p>Copy the contents of this byte string into the given owned string +buffer, while replacing invalid UTF-8 code unit sequences with the +Unicode replacement codepoint (<code>U+FFFD</code>).</p> +<p>This method uses the same “substitution of maximal subparts” strategy +for inserting the replacement codepoint as the +<a href="trait.ByteSlice.html#method.to_str_lossy"><code>to_str_lossy</code></a> method.</p> +<p>This routine is useful for amortizing allocation. However, unlike +<code>to_str_lossy</code>, this routine will <em>always</em> copy the contents of this +byte string into the destination buffer, even if this byte string is +valid UTF-8.</p> +<h5 id="examples-7"><a class="doc-anchor" href="#examples-7">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::borrow::Cow; + +<span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>bstring = <Vec<u8>>::from(<span class="string">"☃βツ"</span>); +<span class="comment">// Add a byte that makes the sequence invalid. +</span>bstring.push(<span class="string">b'\xFF'</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>dest = String::new(); +bstring.to_str_lossy_into(<span class="kw-2">&mut </span>dest); +<span class="macro">assert_eq!</span>(<span class="string">"☃βツ\u{FFFD}"</span>, dest);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_os_str" class="method"><h4 class="code-header">fn <a href="#method.to_os_str" class="fn">to_os_str</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>, Utf8Error></h4></section></summary><div class="docblock"><p>Create an OS string slice from this byte string.</p> +<p>When OS strings can be constructed from arbitrary byte sequences, this +always succeeds and is zero cost. Otherwise, this returns a UTF-8 +decoding error if this byte string is not valid UTF-8. (For example, +assuming the representation of <code>OsStr</code> is opaque on Windows, file paths +are allowed to be a sequence of arbitrary 16-bit integers. There is +no obvious mapping from an arbitrary sequence of 8-bit integers to an +arbitrary sequence of 16-bit integers. If the representation of <code>OsStr</code> +is even opened up, then this will convert any sequence of bytes to an +<code>OsStr</code> without cost.)</p> +<h5 id="examples-8"><a class="doc-anchor" href="#examples-8">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>os_str = <span class="string">b"foo"</span>.to_os_str().expect(<span class="string">"should be valid UTF-8"</span>); +<span class="macro">assert_eq!</span>(os_str, <span class="string">"foo"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_os_str_lossy" class="method"><h4 class="code-header">fn <a href="#method.to_os_str_lossy" class="fn">to_os_str_lossy</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>></h4></section></summary><div class="docblock"><p>Lossily create an OS string slice from this byte string.</p> +<p>When OS strings can be constructed from arbitrary byte sequences, this +is zero cost and always returns a slice. Otherwise, this will perform a +UTF-8 check and lossily convert this byte string into valid UTF-8 using +the Unicode replacement codepoint.</p> +<p>Note that this can prevent the correct roundtripping of file paths when +the representation of <code>OsStr</code> is opaque.</p> +<h5 id="examples-9"><a class="doc-anchor" href="#examples-9">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>os_str = <span class="string">b"foo\xFFbar"</span>.to_os_str_lossy(); +<span class="macro">assert_eq!</span>(os_str.to_string_lossy(), <span class="string">"foo\u{FFFD}bar"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_path" class="method"><h4 class="code-header">fn <a href="#method.to_path" class="fn">to_path</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>, Utf8Error></h4></section></summary><div class="docblock"><p>Create a path slice from this byte string.</p> +<p>When paths can be constructed from arbitrary byte sequences, this +always succeeds and is zero cost. Otherwise, this returns a UTF-8 +decoding error if this byte string is not valid UTF-8. (For example, +assuming the representation of <code>Path</code> is opaque on Windows, file paths +are allowed to be a sequence of arbitrary 16-bit integers. There is +no obvious mapping from an arbitrary sequence of 8-bit integers to an +arbitrary sequence of 16-bit integers. If the representation of <code>Path</code> +is even opened up, then this will convert any sequence of bytes to an +<code>Path</code> without cost.)</p> +<h5 id="examples-10"><a class="doc-anchor" href="#examples-10">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>path = <span class="string">b"foo"</span>.to_path().expect(<span class="string">"should be valid UTF-8"</span>); +<span class="macro">assert_eq!</span>(path.as_os_str(), <span class="string">"foo"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_path_lossy" class="method"><h4 class="code-header">fn <a href="#method.to_path_lossy" class="fn">to_path_lossy</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'_, <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>></h4></section></summary><div class="docblock"><p>Lossily create a path slice from this byte string.</p> +<p>When paths can be constructed from arbitrary byte sequences, this is +zero cost and always returns a slice. Otherwise, this will perform a +UTF-8 check and lossily convert this byte string into valid UTF-8 using +the Unicode replacement codepoint.</p> +<p>Note that this can prevent the correct roundtripping of file paths when +the representation of <code>Path</code> is opaque.</p> +<h5 id="examples-11"><a class="doc-anchor" href="#examples-11">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"foo\xFFbar"</span>; +<span class="kw">let </span>path = bs.to_path_lossy(); +<span class="macro">assert_eq!</span>(path.to_string_lossy(), <span class="string">"foo\u{FFFD}bar"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.repeatn" class="method"><h4 class="code-header">fn <a href="#method.repeatn" class="fn">repeatn</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Create a new byte string by repeating this byte string <code>n</code> times.</p> +<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5> +<p>This function panics if the capacity of the new byte string would +overflow.</p> +<h5 id="examples-12"><a class="doc-anchor" href="#examples-12">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert_eq!</span>(<span class="string">b"foo"</span>.repeatn(<span class="number">4</span>), B(<span class="string">"foofoofoofoo"</span>)); +<span class="macro">assert_eq!</span>(<span class="string">b"foo"</span>.repeatn(<span class="number">0</span>), B(<span class="string">""</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.contains_str" class="method"><h4 class="code-header">fn <a href="#method.contains_str" class="fn">contains_str</a><B>(&self, needle: B) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns true if and only if this byte string contains the given needle.</p> +<h5 id="examples-13"><a class="doc-anchor" href="#examples-13">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert!</span>(<span class="string">b"foo bar"</span>.contains_str(<span class="string">"foo"</span>)); +<span class="macro">assert!</span>(<span class="string">b"foo bar"</span>.contains_str(<span class="string">"bar"</span>)); +<span class="macro">assert!</span>(!<span class="string">b"foo"</span>.contains_str(<span class="string">"foobar"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.starts_with_str" class="method"><h4 class="code-header">fn <a href="#method.starts_with_str" class="fn">starts_with_str</a><B>(&self, prefix: B) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns true if and only if this byte string has the given prefix.</p> +<h5 id="examples-14"><a class="doc-anchor" href="#examples-14">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert!</span>(<span class="string">b"foo bar"</span>.starts_with_str(<span class="string">"foo"</span>)); +<span class="macro">assert!</span>(!<span class="string">b"foo bar"</span>.starts_with_str(<span class="string">"bar"</span>)); +<span class="macro">assert!</span>(!<span class="string">b"foo"</span>.starts_with_str(<span class="string">"foobar"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.ends_with_str" class="method"><h4 class="code-header">fn <a href="#method.ends_with_str" class="fn">ends_with_str</a><B>(&self, suffix: B) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns true if and only if this byte string has the given suffix.</p> +<h5 id="examples-15"><a class="doc-anchor" href="#examples-15">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert!</span>(<span class="string">b"foo bar"</span>.ends_with_str(<span class="string">"bar"</span>)); +<span class="macro">assert!</span>(!<span class="string">b"foo bar"</span>.ends_with_str(<span class="string">"foo"</span>)); +<span class="macro">assert!</span>(!<span class="string">b"bar"</span>.ends_with_str(<span class="string">"foobar"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.find" class="method"><h4 class="code-header">fn <a href="#method.find" class="fn">find</a><B>(&self, needle: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns the index of the first occurrence of the given needle.</p> +<p>The needle may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>.</p> +<p>Note that if you’re are searching for the same needle in many +different small haystacks, it may be faster to initialize a +<a href="struct.Finder.html"><code>Finder</code></a> once, and reuse it for each search.</p> +<h5 id="complexity"><a class="doc-anchor" href="#complexity">§</a>Complexity</h5> +<p>This routine is guaranteed to have worst case linear time complexity +with respect to both the needle and the haystack. That is, this runs +in <code>O(needle.len() + haystack.len())</code> time.</p> +<p>This routine is also guaranteed to have worst case constant space +complexity.</p> +<h5 id="examples-16"><a class="doc-anchor" href="#examples-16">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foo bar baz"</span>; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">0</span>), s.find(<span class="string">"foo"</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">4</span>), s.find(<span class="string">"bar"</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, s.find(<span class="string">"quux"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rfind" class="method"><h4 class="code-header">fn <a href="#method.rfind" class="fn">rfind</a><B>(&self, needle: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns the index of the last occurrence of the given needle.</p> +<p>The needle may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>.</p> +<p>Note that if you’re are searching for the same needle in many +different small haystacks, it may be faster to initialize a +<a href="struct.FinderReverse.html"><code>FinderReverse</code></a> once, and reuse it for +each search.</p> +<h5 id="complexity-1"><a class="doc-anchor" href="#complexity-1">§</a>Complexity</h5> +<p>This routine is guaranteed to have worst case linear time complexity +with respect to both the needle and the haystack. That is, this runs +in <code>O(needle.len() + haystack.len())</code> time.</p> +<p>This routine is also guaranteed to have worst case constant space +complexity.</p> +<h5 id="examples-17"><a class="doc-anchor" href="#examples-17">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foo bar baz"</span>; +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">0</span>), s.rfind(<span class="string">"foo"</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">4</span>), s.rfind(<span class="string">"bar"</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">8</span>), s.rfind(<span class="string">"ba"</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, s.rfind(<span class="string">"quux"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.find_iter" class="method"><h4 class="code-header">fn <a href="#method.find_iter" class="fn">find_iter</a><B, 'h, 'n>(&'h self, needle: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'n B</a>) -> Find<'h, 'n><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator of the non-overlapping occurrences of the given +needle. The iterator yields byte offset positions indicating the start +of each match.</p> +<h5 id="complexity-2"><a class="doc-anchor" href="#complexity-2">§</a>Complexity</h5> +<p>This routine is guaranteed to have worst case linear time complexity +with respect to both the needle and the haystack. That is, this runs +in <code>O(needle.len() + haystack.len())</code> time.</p> +<p>This routine is also guaranteed to have worst case constant space +complexity.</p> +<h5 id="examples-18"><a class="doc-anchor" href="#examples-18">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foo bar foo foo quux foo"</span>; +<span class="kw">let </span>matches: Vec<usize> = s.find_iter(<span class="string">"foo"</span>).collect(); +<span class="macro">assert_eq!</span>(matches, <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">8</span>, <span class="number">12</span>, <span class="number">21</span>]);</code></pre></div> +<p>An empty string matches at every position, including the position +immediately following the last byte:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>matches: Vec<usize> = <span class="string">b"foo"</span>.find_iter(<span class="string">""</span>).collect(); +<span class="macro">assert_eq!</span>(matches, <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]); + +<span class="kw">let </span>matches: Vec<usize> = <span class="string">b""</span>.find_iter(<span class="string">""</span>).collect(); +<span class="macro">assert_eq!</span>(matches, <span class="macro">vec!</span>[<span class="number">0</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rfind_iter" class="method"><h4 class="code-header">fn <a href="#method.rfind_iter" class="fn">rfind_iter</a><B, 'h, 'n>(&'h self, needle: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'n B</a>) -> FindReverse<'h, 'n><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator of the non-overlapping occurrences of the given +needle in reverse. The iterator yields byte offset positions indicating +the start of each match.</p> +<h5 id="complexity-3"><a class="doc-anchor" href="#complexity-3">§</a>Complexity</h5> +<p>This routine is guaranteed to have worst case linear time complexity +with respect to both the needle and the haystack. That is, this runs +in <code>O(needle.len() + haystack.len())</code> time.</p> +<p>This routine is also guaranteed to have worst case constant space +complexity.</p> +<h5 id="examples-19"><a class="doc-anchor" href="#examples-19">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foo bar foo foo quux foo"</span>; +<span class="kw">let </span>matches: Vec<usize> = s.rfind_iter(<span class="string">"foo"</span>).collect(); +<span class="macro">assert_eq!</span>(matches, <span class="macro">vec!</span>[<span class="number">21</span>, <span class="number">12</span>, <span class="number">8</span>, <span class="number">0</span>]);</code></pre></div> +<p>An empty string matches at every position, including the position +immediately following the last byte:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>matches: Vec<usize> = <span class="string">b"foo"</span>.rfind_iter(<span class="string">""</span>).collect(); +<span class="macro">assert_eq!</span>(matches, <span class="macro">vec!</span>[<span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">0</span>]); + +<span class="kw">let </span>matches: Vec<usize> = <span class="string">b""</span>.rfind_iter(<span class="string">""</span>).collect(); +<span class="macro">assert_eq!</span>(matches, <span class="macro">vec!</span>[<span class="number">0</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.find_byte" class="method"><h4 class="code-header">fn <a href="#method.find_byte" class="fn">find_byte</a>(&self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></h4></section></summary><div class="docblock"><p>Returns the index of the first occurrence of the given byte. If the +byte does not occur in this byte string, then <code>None</code> is returned.</p> +<h5 id="examples-20"><a class="doc-anchor" href="#examples-20">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">10</span>), <span class="string">b"foo bar baz"</span>.find_byte(<span class="string">b'z'</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b"foo bar baz"</span>.find_byte(<span class="string">b'y'</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rfind_byte" class="method"><h4 class="code-header">fn <a href="#method.rfind_byte" class="fn">rfind_byte</a>(&self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></h4></section></summary><div class="docblock"><p>Returns the index of the last occurrence of the given byte. If the +byte does not occur in this byte string, then <code>None</code> is returned.</p> +<h5 id="examples-21"><a class="doc-anchor" href="#examples-21">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">10</span>), <span class="string">b"foo bar baz"</span>.rfind_byte(<span class="string">b'z'</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b"foo bar baz"</span>.rfind_byte(<span class="string">b'y'</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.find_char" class="method"><h4 class="code-header">fn <a href="#method.find_char" class="fn">find_char</a>(&self, ch: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></h4></section></summary><div class="docblock"><p>Returns the index of the first occurrence of the given codepoint. +If the codepoint does not occur in this byte string, then <code>None</code> is +returned.</p> +<p>Note that if one searches for the replacement codepoint, <code>\u{FFFD}</code>, +then only explicit occurrences of that encoding will be found. Invalid +UTF-8 sequences will not be matched.</p> +<h5 id="examples-22"><a class="doc-anchor" href="#examples-22">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">10</span>), <span class="string">b"foo bar baz"</span>.find_char(<span class="string">'z'</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">4</span>), B(<span class="string">"αβγγδ"</span>).find_char(<span class="string">'γ'</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b"foo bar baz"</span>.find_char(<span class="string">'y'</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rfind_char" class="method"><h4 class="code-header">fn <a href="#method.rfind_char" class="fn">rfind_char</a>(&self, ch: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></h4></section></summary><div class="docblock"><p>Returns the index of the last occurrence of the given codepoint. +If the codepoint does not occur in this byte string, then <code>None</code> is +returned.</p> +<p>Note that if one searches for the replacement codepoint, <code>\u{FFFD}</code>, +then only explicit occurrences of that encoding will be found. Invalid +UTF-8 sequences will not be matched.</p> +<h5 id="examples-23"><a class="doc-anchor" href="#examples-23">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">10</span>), <span class="string">b"foo bar baz"</span>.rfind_char(<span class="string">'z'</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">6</span>), B(<span class="string">"αβγγδ"</span>).rfind_char(<span class="string">'γ'</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b"foo bar baz"</span>.rfind_char(<span class="string">'y'</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.find_byteset" class="method"><h4 class="code-header">fn <a href="#method.find_byteset" class="fn">find_byteset</a><B>(&self, byteset: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns the index of the first occurrence of any of the bytes in the +provided set.</p> +<p>The <code>byteset</code> may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>, but +note that passing a <code>&str</code> which contains multibyte characters may not +behave as you expect: each byte in the <code>&str</code> is treated as an +individual member of the byte set.</p> +<p>Note that order is irrelevant for the <code>byteset</code> parameter, and +duplicate bytes present in its body are ignored.</p> +<h5 id="complexity-4"><a class="doc-anchor" href="#complexity-4">§</a>Complexity</h5> +<p>This routine is guaranteed to have worst case linear time complexity +with respect to both the set of bytes and the haystack. That is, this +runs in <code>O(byteset.len() + haystack.len())</code> time.</p> +<p>This routine is also guaranteed to have worst case constant space +complexity.</p> +<h5 id="examples-24"><a class="doc-anchor" href="#examples-24">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert_eq!</span>(<span class="string">b"foo bar baz"</span>.find_byteset(<span class="string">b"zr"</span>), <span class="prelude-val">Some</span>(<span class="number">6</span>)); +<span class="macro">assert_eq!</span>(<span class="string">b"foo baz bar"</span>.find_byteset(<span class="string">b"bzr"</span>), <span class="prelude-val">Some</span>(<span class="number">4</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b"foo baz bar"</span>.find_byteset(<span class="string">b"\t\n"</span>)); +<span class="comment">// The empty byteset never matches. +</span><span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b"abc"</span>.find_byteset(<span class="string">b""</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b""</span>.find_byteset(<span class="string">b""</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.find_not_byteset" class="method"><h4 class="code-header">fn <a href="#method.find_not_byteset" class="fn">find_not_byteset</a><B>(&self, byteset: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns the index of the first occurrence of a byte that is not a +member of the provided set.</p> +<p>The <code>byteset</code> may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>, but +note that passing a <code>&str</code> which contains multibyte characters may not +behave as you expect: each byte in the <code>&str</code> is treated as an +individual member of the byte set.</p> +<p>Note that order is irrelevant for the <code>byteset</code> parameter, and +duplicate bytes present in its body are ignored.</p> +<h5 id="complexity-5"><a class="doc-anchor" href="#complexity-5">§</a>Complexity</h5> +<p>This routine is guaranteed to have worst case linear time complexity +with respect to both the set of bytes and the haystack. That is, this +runs in <code>O(byteset.len() + haystack.len())</code> time.</p> +<p>This routine is also guaranteed to have worst case constant space +complexity.</p> +<h5 id="examples-25"><a class="doc-anchor" href="#examples-25">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert_eq!</span>(<span class="string">b"foo bar baz"</span>.find_not_byteset(<span class="string">b"fo "</span>), <span class="prelude-val">Some</span>(<span class="number">4</span>)); +<span class="macro">assert_eq!</span>(<span class="string">b"\t\tbaz bar"</span>.find_not_byteset(<span class="string">b" \t\r\n"</span>), <span class="prelude-val">Some</span>(<span class="number">2</span>)); +<span class="macro">assert_eq!</span>(<span class="string">b"foo\nbaz\tbar"</span>.find_not_byteset(<span class="string">b"\t\n"</span>), <span class="prelude-val">Some</span>(<span class="number">0</span>)); +<span class="comment">// The negation of the empty byteset matches everything. +</span><span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">0</span>), <span class="string">b"abc"</span>.find_not_byteset(<span class="string">b""</span>)); +<span class="comment">// But an empty string never contains anything. +</span><span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b""</span>.find_not_byteset(<span class="string">b""</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rfind_byteset" class="method"><h4 class="code-header">fn <a href="#method.rfind_byteset" class="fn">rfind_byteset</a><B>(&self, byteset: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns the index of the last occurrence of any of the bytes in the +provided set.</p> +<p>The <code>byteset</code> may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>, but +note that passing a <code>&str</code> which contains multibyte characters may not +behave as you expect: each byte in the <code>&str</code> is treated as an +individual member of the byte set.</p> +<p>Note that order is irrelevant for the <code>byteset</code> parameter, and duplicate +bytes present in its body are ignored.</p> +<h5 id="complexity-6"><a class="doc-anchor" href="#complexity-6">§</a>Complexity</h5> +<p>This routine is guaranteed to have worst case linear time complexity +with respect to both the set of bytes and the haystack. That is, this +runs in <code>O(byteset.len() + haystack.len())</code> time.</p> +<p>This routine is also guaranteed to have worst case constant space +complexity.</p> +<h5 id="examples-26"><a class="doc-anchor" href="#examples-26">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert_eq!</span>(<span class="string">b"foo bar baz"</span>.rfind_byteset(<span class="string">b"agb"</span>), <span class="prelude-val">Some</span>(<span class="number">9</span>)); +<span class="macro">assert_eq!</span>(<span class="string">b"foo baz bar"</span>.rfind_byteset(<span class="string">b"rabz "</span>), <span class="prelude-val">Some</span>(<span class="number">10</span>)); +<span class="macro">assert_eq!</span>(<span class="string">b"foo baz bar"</span>.rfind_byteset(<span class="string">b"\n123"</span>), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rfind_not_byteset" class="method"><h4 class="code-header">fn <a href="#method.rfind_not_byteset" class="fn">rfind_not_byteset</a><B>(&self, byteset: B) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Returns the index of the last occurrence of a byte that is not a member +of the provided set.</p> +<p>The <code>byteset</code> may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>, but +note that passing a <code>&str</code> which contains multibyte characters may not +behave as you expect: each byte in the <code>&str</code> is treated as an +individual member of the byte set.</p> +<p>Note that order is irrelevant for the <code>byteset</code> parameter, and +duplicate bytes present in its body are ignored.</p> +<h5 id="complexity-7"><a class="doc-anchor" href="#complexity-7">§</a>Complexity</h5> +<p>This routine is guaranteed to have worst case linear time complexity +with respect to both the set of bytes and the haystack. That is, this +runs in <code>O(byteset.len() + haystack.len())</code> time.</p> +<p>This routine is also guaranteed to have worst case constant space +complexity.</p> +<h5 id="examples-27"><a class="doc-anchor" href="#examples-27">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert_eq!</span>(<span class="string">b"foo bar baz,\t"</span>.rfind_not_byteset(<span class="string">b",\t"</span>), <span class="prelude-val">Some</span>(<span class="number">10</span>)); +<span class="macro">assert_eq!</span>(<span class="string">b"foo baz bar"</span>.rfind_not_byteset(<span class="string">b"rabz "</span>), <span class="prelude-val">Some</span>(<span class="number">2</span>)); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b"foo baz bar"</span>.rfind_not_byteset(<span class="string">b"barfoz "</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.fields" class="method"><h4 class="code-header">fn <a href="#method.fields" class="fn">fields</a>(&self) -> Fields<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the fields in a byte string, separated +by contiguous whitespace (according to the Unicode property +<code>White_Space</code>).</p> +<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">" foo\tbar\t\u{2003}\nquux \n"</span>); +<span class="kw">let </span>fields: Vec<<span class="kw-2">&</span>[u8]> = s.fields().collect(); +<span class="macro">assert_eq!</span>(fields, <span class="macro">vec!</span>[B(<span class="string">"foo"</span>), B(<span class="string">"bar"</span>), B(<span class="string">"quux"</span>)]);</code></pre></div> +<p>A byte string consisting of just whitespace yields no elements:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert_eq!</span>(<span class="number">0</span>, B(<span class="string">" \n\t\u{2003}\n \t"</span>).fields().count());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.fields_with" class="method"><h4 class="code-header">fn <a href="#method.fields_with" class="fn">fields_with</a><F>(&self, f: F) -> FieldsWith<'_, F><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over the fields in a byte string, separated by +contiguous codepoints satisfying the given predicate.</p> +<p>If this byte string is not valid UTF-8, then the given closure will +be called with a Unicode replacement codepoint when invalid UTF-8 +bytes are seen.</p> +<h5 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = <span class="string">b"123foo999999bar1quux123456"</span>; +<span class="kw">let </span>fields: Vec<<span class="kw-2">&</span>[u8]> = s.fields_with(|c| c.is_numeric()).collect(); +<span class="macro">assert_eq!</span>(fields, <span class="macro">vec!</span>[B(<span class="string">"foo"</span>), B(<span class="string">"bar"</span>), B(<span class="string">"quux"</span>)]);</code></pre></div> +<p>A byte string consisting of all codepoints satisfying the predicate +yields no elements:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert_eq!</span>(<span class="number">0</span>, <span class="string">b"1911354563"</span>.fields_with(|c| c.is_numeric()).count());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_str" class="method"><h4 class="code-header">fn <a href="#method.split_str" class="fn">split_str</a><B, 'h, 's>(&'h self, splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'s B</a>) -> Split<'h, 's><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over substrings of this byte string, separated +by the given byte string. Each element yielded is guaranteed not to +include the splitter substring.</p> +<p>The splitter may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>.</p> +<h5 id="examples-28"><a class="doc-anchor" href="#examples-28">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"Mary had a little lamb"</span>.split_str(<span class="string">" "</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">"Mary"</span>), B(<span class="string">"had"</span>), B(<span class="string">"a"</span>), B(<span class="string">"little"</span>), B(<span class="string">"lamb"</span>), +]); + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b""</span>.split_str(<span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[<span class="string">b""</span>]); + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"lionXXtigerXleopard"</span>.split_str(<span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"lion"</span>), B(<span class="string">""</span>), B(<span class="string">"tiger"</span>), B(<span class="string">"leopard"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"lion::tiger::leopard"</span>.split_str(<span class="string">"::"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"lion"</span>), B(<span class="string">"tiger"</span>), B(<span class="string">"leopard"</span>)]);</code></pre></div> +<p>If a string contains multiple contiguous separators, you will end up +with empty strings yielded by the iterator:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"||||a||b|c"</span>.split_str(<span class="string">"|"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">"a"</span>), B(<span class="string">""</span>), B(<span class="string">"b"</span>), B(<span class="string">"c"</span>), +]); + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"(///)"</span>.split_str(<span class="string">"/"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"("</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">")"</span>)]);</code></pre></div> +<p>Separators at the start or end of a string are neighbored by empty +strings.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"010"</span>.split_str(<span class="string">"0"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">""</span>), B(<span class="string">"1"</span>), B(<span class="string">""</span>)]);</code></pre></div> +<p>When the empty string is used as a separator, it splits every <strong>byte</strong> +in the byte string, along with the beginning and end of the byte +string.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"rust"</span>.split_str(<span class="string">""</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">""</span>), B(<span class="string">"r"</span>), B(<span class="string">"u"</span>), B(<span class="string">"s"</span>), B(<span class="string">"t"</span>), B(<span class="string">""</span>), +]); + +<span class="comment">// Splitting by an empty string is not UTF-8 aware. Elements yielded +// may not be valid UTF-8! +</span><span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = B(<span class="string">"☃"</span>).split_str(<span class="string">""</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">""</span>), B(<span class="string">b"\xE2"</span>), B(<span class="string">b"\x98"</span>), B(<span class="string">b"\x83"</span>), B(<span class="string">""</span>), +]);</code></pre></div> +<p>Contiguous separators, especially whitespace, can lead to possibly +surprising behavior. For example, this code is correct:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b" a b c"</span>.split_str(<span class="string">" "</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">"a"</span>), B(<span class="string">""</span>), B(<span class="string">"b"</span>), B(<span class="string">"c"</span>), +]);</code></pre></div> +<p>It does <em>not</em> give you <code>["a", "b", "c"]</code>. For that behavior, use +<a href="#method.fields"><code>fields</code></a> instead.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit_str" class="method"><h4 class="code-header">fn <a href="#method.rsplit_str" class="fn">rsplit_str</a><B, 'h, 's>(&'h self, splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'s B</a>) -> SplitReverse<'h, 's><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator over substrings of this byte string, separated by +the given byte string, in reverse. Each element yielded is guaranteed +not to include the splitter substring.</p> +<p>The splitter may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>.</p> +<h5 id="examples-29"><a class="doc-anchor" href="#examples-29">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = + <span class="string">b"Mary had a little lamb"</span>.rsplit_str(<span class="string">" "</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">"lamb"</span>), B(<span class="string">"little"</span>), B(<span class="string">"a"</span>), B(<span class="string">"had"</span>), B(<span class="string">"Mary"</span>), +]); + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b""</span>.rsplit_str(<span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[<span class="string">b""</span>]); + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"lionXXtigerXleopard"</span>.rsplit_str(<span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"leopard"</span>), B(<span class="string">"tiger"</span>), B(<span class="string">""</span>), B(<span class="string">"lion"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"lion::tiger::leopard"</span>.rsplit_str(<span class="string">"::"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"leopard"</span>), B(<span class="string">"tiger"</span>), B(<span class="string">"lion"</span>)]);</code></pre></div> +<p>If a string contains multiple contiguous separators, you will end up +with empty strings yielded by the iterator:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"||||a||b|c"</span>.rsplit_str(<span class="string">"|"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">"c"</span>), B(<span class="string">"b"</span>), B(<span class="string">""</span>), B(<span class="string">"a"</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), +]); + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"(///)"</span>.rsplit_str(<span class="string">"/"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">")"</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">"("</span>)]);</code></pre></div> +<p>Separators at the start or end of a string are neighbored by empty +strings.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"010"</span>.rsplit_str(<span class="string">"0"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">""</span>), B(<span class="string">"1"</span>), B(<span class="string">""</span>)]);</code></pre></div> +<p>When the empty string is used as a separator, it splits every <strong>byte</strong> +in the byte string, along with the beginning and end of the byte +string.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b"rust"</span>.rsplit_str(<span class="string">""</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">""</span>), B(<span class="string">"t"</span>), B(<span class="string">"s"</span>), B(<span class="string">"u"</span>), B(<span class="string">"r"</span>), B(<span class="string">""</span>), +]); + +<span class="comment">// Splitting by an empty string is not UTF-8 aware. Elements yielded +// may not be valid UTF-8! +</span><span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = B(<span class="string">"☃"</span>).rsplit_str(<span class="string">""</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">""</span>), B(<span class="string">b"\x83"</span>), B(<span class="string">b"\x98"</span>), B(<span class="string">b"\xE2"</span>), B(<span class="string">""</span>)]);</code></pre></div> +<p>Contiguous separators, especially whitespace, can lead to possibly +surprising behavior. For example, this code is correct:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw-2">&</span>[u8]> = <span class="string">b" a b c"</span>.rsplit_str(<span class="string">" "</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[ + B(<span class="string">"c"</span>), B(<span class="string">"b"</span>), B(<span class="string">""</span>), B(<span class="string">"a"</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), +]);</code></pre></div> +<p>It does <em>not</em> give you <code>["a", "b", "c"]</code>.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.split_once_str" class="method"><h4 class="code-header">fn <a href="#method.split_once_str" class="fn">split_once_str</a><B, 'a>(&'a self, splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&B</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>], &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>])><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Split this byte string at the first occurrence of <code>splitter</code>.</p> +<p>If the <code>splitter</code> is found in the byte string, returns a tuple +containing the parts of the string before and after the first occurrence +of <code>splitter</code> respectively. Otherwise, if there are no occurrences of +<code>splitter</code> in the byte string, returns <code>None</code>.</p> +<p>The splitter may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>.</p> +<p>If you need to split on the <em>last</em> instance of a delimiter instead, see +the <a href="#method.rsplit_once_str"><code>ByteSlice::rsplit_once_str</code></a> method .</p> +<h5 id="examples-30"><a class="doc-anchor" href="#examples-30">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert_eq!</span>( + B(<span class="string">"foo,bar"</span>).split_once_str(<span class="string">","</span>), + <span class="prelude-val">Some</span>((B(<span class="string">"foo"</span>), B(<span class="string">"bar"</span>))), +); +<span class="macro">assert_eq!</span>( + B(<span class="string">"foo,bar,baz"</span>).split_once_str(<span class="string">","</span>), + <span class="prelude-val">Some</span>((B(<span class="string">"foo"</span>), B(<span class="string">"bar,baz"</span>))), +); +<span class="macro">assert_eq!</span>(B(<span class="string">"foo"</span>).split_once_str(<span class="string">","</span>), <span class="prelude-val">None</span>); +<span class="macro">assert_eq!</span>(B(<span class="string">"foo,"</span>).split_once_str(<span class="string">b","</span>), <span class="prelude-val">Some</span>((B(<span class="string">"foo"</span>), B(<span class="string">""</span>)))); +<span class="macro">assert_eq!</span>(B(<span class="string">",foo"</span>).split_once_str(<span class="string">b","</span>), <span class="prelude-val">Some</span>((B(<span class="string">""</span>), B(<span class="string">"foo"</span>))));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplit_once_str" class="method"><h4 class="code-header">fn <a href="#method.rsplit_once_str" class="fn">rsplit_once_str</a><B, 'a>( + &'a self, + splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&B</a> +) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(&'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>], &'a [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>])><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Split this byte string at the last occurrence of <code>splitter</code>.</p> +<p>If the <code>splitter</code> is found in the byte string, returns a tuple +containing the parts of the string before and after the last occurrence +of <code>splitter</code>, respectively. Otherwise, if there are no occurrences of +<code>splitter</code> in the byte string, returns <code>None</code>.</p> +<p>The splitter may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>.</p> +<p>If you need to split on the <em>first</em> instance of a delimiter instead, see +the <a href="#method.split_once_str"><code>ByteSlice::split_once_str</code></a> method.</p> +<h5 id="examples-31"><a class="doc-anchor" href="#examples-31">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert_eq!</span>( + B(<span class="string">"foo,bar"</span>).rsplit_once_str(<span class="string">","</span>), + <span class="prelude-val">Some</span>((B(<span class="string">"foo"</span>), B(<span class="string">"bar"</span>))), +); +<span class="macro">assert_eq!</span>( + B(<span class="string">"foo,bar,baz"</span>).rsplit_once_str(<span class="string">","</span>), + <span class="prelude-val">Some</span>((B(<span class="string">"foo,bar"</span>), B(<span class="string">"baz"</span>))), +); +<span class="macro">assert_eq!</span>(B(<span class="string">"foo"</span>).rsplit_once_str(<span class="string">","</span>), <span class="prelude-val">None</span>); +<span class="macro">assert_eq!</span>(B(<span class="string">"foo,"</span>).rsplit_once_str(<span class="string">b","</span>), <span class="prelude-val">Some</span>((B(<span class="string">"foo"</span>), B(<span class="string">""</span>)))); +<span class="macro">assert_eq!</span>(B(<span class="string">",foo"</span>).rsplit_once_str(<span class="string">b","</span>), <span class="prelude-val">Some</span>((B(<span class="string">""</span>), B(<span class="string">"foo"</span>))));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.splitn_str" class="method"><h4 class="code-header">fn <a href="#method.splitn_str" class="fn">splitn_str</a><B, 'h, 's>( + &'h self, + limit: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'s B</a> +) -> SplitN<'h, 's><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator of at most <code>limit</code> substrings of this byte string, +separated by the given byte string. If <code>limit</code> substrings are yielded, +then the last substring will contain the remainder of this byte string.</p> +<p>The needle may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>.</p> +<h5 id="examples-32"><a class="doc-anchor" href="#examples-32">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"Mary had a little lamb"</span>.splitn_str(<span class="number">3</span>, <span class="string">" "</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"Mary"</span>), B(<span class="string">"had"</span>), B(<span class="string">"a little lamb"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b""</span>.splitn_str(<span class="number">3</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[<span class="string">b""</span>]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"lionXXtigerXleopard"</span>.splitn_str(<span class="number">3</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"lion"</span>), B(<span class="string">""</span>), B(<span class="string">"tigerXleopard"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"lion::tiger::leopard"</span>.splitn_str(<span class="number">2</span>, <span class="string">"::"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"lion"</span>), B(<span class="string">"tiger::leopard"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"abcXdef"</span>.splitn_str(<span class="number">1</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"abcXdef"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"abcdef"</span>.splitn_str(<span class="number">2</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"abcdef"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"abcXdef"</span>.splitn_str(<span class="number">0</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert!</span>(x.is_empty());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.rsplitn_str" class="method"><h4 class="code-header">fn <a href="#method.rsplitn_str" class="fn">rsplitn_str</a><B, 'h, 's>( + &'h self, + limit: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + splitter: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.reference.html">&'s B</a> +) -> SplitNReverse<'h, 's><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> + ?<a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Returns an iterator of at most <code>limit</code> substrings of this byte string, +separated by the given byte string, in reverse. If <code>limit</code> substrings +are yielded, then the last substring will contain the remainder of this +byte string.</p> +<p>The needle may be any type that can be cheaply converted into a +<code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and <code>&[u8]</code>.</p> +<h5 id="examples-33"><a class="doc-anchor" href="#examples-33">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = + <span class="string">b"Mary had a little lamb"</span>.rsplitn_str(<span class="number">3</span>, <span class="string">" "</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"lamb"</span>), B(<span class="string">"little"</span>), B(<span class="string">"Mary had a"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b""</span>.rsplitn_str(<span class="number">3</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[<span class="string">b""</span>]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"lionXXtigerXleopard"</span>.rsplitn_str(<span class="number">3</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"leopard"</span>), B(<span class="string">"tiger"</span>), B(<span class="string">"lionX"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"lion::tiger::leopard"</span>.rsplitn_str(<span class="number">2</span>, <span class="string">"::"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"leopard"</span>), B(<span class="string">"lion::tiger"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"abcXdef"</span>.rsplitn_str(<span class="number">1</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"abcXdef"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"abcdef"</span>.rsplitn_str(<span class="number">2</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert_eq!</span>(x, <span class="macro">vec!</span>[B(<span class="string">"abcdef"</span>)]); + +<span class="kw">let </span>x: Vec<<span class="kw">_</span>> = <span class="string">b"abcXdef"</span>.rsplitn_str(<span class="number">0</span>, <span class="string">"X"</span>).collect(); +<span class="macro">assert!</span>(x.is_empty());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.replace" class="method"><h4 class="code-header">fn <a href="#method.replace" class="fn">replace</a><N, R>(&self, needle: N, replacement: R) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a><div class="where">where + N: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Replace all matches of the given needle with the given replacement, and +the result as a new <code>Vec<u8></code>.</p> +<p>This routine is useful as a convenience. If you need to reuse an +allocation, use <a href="#method.replace_into"><code>replace_into</code></a> instead.</p> +<h5 id="examples-34"><a class="doc-anchor" href="#examples-34">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"this is old"</span>.replace(<span class="string">"old"</span>, <span class="string">"new"</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"this is new"</span>.as_bytes());</code></pre></div> +<p>When the pattern doesn’t match:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"this is old"</span>.replace(<span class="string">"nada nada"</span>, <span class="string">"limonada"</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"this is old"</span>.as_bytes());</code></pre></div> +<p>When the needle is an empty string:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foo"</span>.replace(<span class="string">""</span>, <span class="string">"Z"</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"ZfZoZoZ"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.replacen" class="method"><h4 class="code-header">fn <a href="#method.replacen" class="fn">replacen</a><N, R>(&self, needle: N, replacement: R, limit: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a><div class="where">where + N: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Replace up to <code>limit</code> matches of the given needle with the given +replacement, and the result as a new <code>Vec<u8></code>.</p> +<p>This routine is useful as a convenience. If you need to reuse an +allocation, use <a href="#method.replacen_into"><code>replacen_into</code></a> instead.</p> +<h5 id="examples-35"><a class="doc-anchor" href="#examples-35">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foofoo"</span>.replacen(<span class="string">"o"</span>, <span class="string">"z"</span>, <span class="number">2</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"fzzfoo"</span>.as_bytes());</code></pre></div> +<p>When the pattern doesn’t match:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foofoo"</span>.replacen(<span class="string">"a"</span>, <span class="string">"z"</span>, <span class="number">2</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"foofoo"</span>.as_bytes());</code></pre></div> +<p>When the needle is an empty string:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foo"</span>.replacen(<span class="string">""</span>, <span class="string">"Z"</span>, <span class="number">2</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"ZfZoo"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.replace_into" class="method"><h4 class="code-header">fn <a href="#method.replace_into" class="fn">replace_into</a><N, R>(&self, needle: N, replacement: R, dest: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>)<div class="where">where + N: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Replace all matches of the given needle with the given replacement, +and write the result into the provided <code>Vec<u8></code>.</p> +<p>This does <strong>not</strong> clear <code>dest</code> before writing to it.</p> +<p>This routine is useful for reusing allocation. For a more convenient +API, use <a href="#method.replace"><code>replace</code></a> instead.</p> +<h5 id="examples-36"><a class="doc-anchor" href="#examples-36">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"this is old"</span>; + +<span class="kw">let </span><span class="kw-2">mut </span>dest = <span class="macro">vec!</span>[]; +s.replace_into(<span class="string">"old"</span>, <span class="string">"new"</span>, <span class="kw-2">&mut </span>dest); +<span class="macro">assert_eq!</span>(dest, <span class="string">"this is new"</span>.as_bytes());</code></pre></div> +<p>When the pattern doesn’t match:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"this is old"</span>; + +<span class="kw">let </span><span class="kw-2">mut </span>dest = <span class="macro">vec!</span>[]; +s.replace_into(<span class="string">"nada nada"</span>, <span class="string">"limonada"</span>, <span class="kw-2">&mut </span>dest); +<span class="macro">assert_eq!</span>(dest, <span class="string">"this is old"</span>.as_bytes());</code></pre></div> +<p>When the needle is an empty string:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foo"</span>; + +<span class="kw">let </span><span class="kw-2">mut </span>dest = <span class="macro">vec!</span>[]; +s.replace_into(<span class="string">""</span>, <span class="string">"Z"</span>, <span class="kw-2">&mut </span>dest); +<span class="macro">assert_eq!</span>(dest, <span class="string">"ZfZoZoZ"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.replacen_into" class="method"><h4 class="code-header">fn <a href="#method.replacen_into" class="fn">replacen_into</a><N, R>( + &self, + needle: N, + replacement: R, + limit: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, + dest: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> +)<div class="where">where + N: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>, + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Replace up to <code>limit</code> matches of the given needle with the given +replacement, and write the result into the provided <code>Vec<u8></code>.</p> +<p>This does <strong>not</strong> clear <code>dest</code> before writing to it.</p> +<p>This routine is useful for reusing allocation. For a more convenient +API, use <a href="#method.replacen"><code>replacen</code></a> instead.</p> +<h5 id="examples-37"><a class="doc-anchor" href="#examples-37">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foofoo"</span>; + +<span class="kw">let </span><span class="kw-2">mut </span>dest = <span class="macro">vec!</span>[]; +s.replacen_into(<span class="string">"o"</span>, <span class="string">"z"</span>, <span class="number">2</span>, <span class="kw-2">&mut </span>dest); +<span class="macro">assert_eq!</span>(dest, <span class="string">"fzzfoo"</span>.as_bytes());</code></pre></div> +<p>When the pattern doesn’t match:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foofoo"</span>; + +<span class="kw">let </span><span class="kw-2">mut </span>dest = <span class="macro">vec!</span>[]; +s.replacen_into(<span class="string">"a"</span>, <span class="string">"z"</span>, <span class="number">2</span>, <span class="kw-2">&mut </span>dest); +<span class="macro">assert_eq!</span>(dest, <span class="string">"foofoo"</span>.as_bytes());</code></pre></div> +<p>When the needle is an empty string:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>s = <span class="string">b"foo"</span>; + +<span class="kw">let </span><span class="kw-2">mut </span>dest = <span class="macro">vec!</span>[]; +s.replacen_into(<span class="string">""</span>, <span class="string">"Z"</span>, <span class="number">2</span>, <span class="kw-2">&mut </span>dest); +<span class="macro">assert_eq!</span>(dest, <span class="string">"ZfZoo"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.bytes" class="method"><h4 class="code-header">fn <a href="#method.bytes" class="fn">bytes</a>(&self) -> Bytes<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the bytes in this byte string.</p> +<h5 id="examples-38"><a class="doc-anchor" href="#examples-38">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"foobar"</span>; +<span class="kw">let </span>bytes: Vec<u8> = bs.bytes().collect(); +<span class="macro">assert_eq!</span>(bytes, bs);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.chars" class="method"><h4 class="code-header">fn <a href="#method.chars" class="fn">chars</a>(&self) -> Chars<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the Unicode scalar values in this byte string. +If invalid UTF-8 is encountered, then the Unicode replacement codepoint +is yielded instead.</p> +<h5 id="examples-39"><a class="doc-anchor" href="#examples-39">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"\xE2\x98\x83\xFF\xF0\x9D\x9E\x83\xE2\x98\x61"</span>; +<span class="kw">let </span>chars: Vec<char> = bs.chars().collect(); +<span class="macro">assert_eq!</span>(<span class="macro">vec!</span>[<span class="string">'☃'</span>, <span class="string">'\u{FFFD}'</span>, <span class="string">'𝞃'</span>, <span class="string">'\u{FFFD}'</span>, <span class="string">'a'</span>], chars);</code></pre></div> +<p>Codepoints can also be iterated over in reverse:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"\xE2\x98\x83\xFF\xF0\x9D\x9E\x83\xE2\x98\x61"</span>; +<span class="kw">let </span>chars: Vec<char> = bs.chars().rev().collect(); +<span class="macro">assert_eq!</span>(<span class="macro">vec!</span>[<span class="string">'a'</span>, <span class="string">'\u{FFFD}'</span>, <span class="string">'𝞃'</span>, <span class="string">'\u{FFFD}'</span>, <span class="string">'☃'</span>], chars);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.char_indices" class="method"><h4 class="code-header">fn <a href="#method.char_indices" class="fn">char_indices</a>(&self) -> CharIndices<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the Unicode scalar values in this byte string +along with their starting and ending byte index positions. If invalid +UTF-8 is encountered, then the Unicode replacement codepoint is yielded +instead.</p> +<p>Note that this is slightly different from the <code>CharIndices</code> iterator +provided by the standard library. Aside from working on possibly +invalid UTF-8, this iterator provides both the corresponding starting +and ending byte indices of each codepoint yielded. The ending position +is necessary to slice the original byte string when invalid UTF-8 bytes +are converted into a Unicode replacement codepoint, since a single +replacement codepoint can substitute anywhere from 1 to 3 invalid bytes +(inclusive).</p> +<h5 id="examples-40"><a class="doc-anchor" href="#examples-40">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"\xE2\x98\x83\xFF\xF0\x9D\x9E\x83\xE2\x98\x61"</span>; +<span class="kw">let </span>chars: Vec<(usize, usize, char)> = bs.char_indices().collect(); +<span class="macro">assert_eq!</span>(chars, <span class="macro">vec!</span>[ + (<span class="number">0</span>, <span class="number">3</span>, <span class="string">'☃'</span>), + (<span class="number">3</span>, <span class="number">4</span>, <span class="string">'\u{FFFD}'</span>), + (<span class="number">4</span>, <span class="number">8</span>, <span class="string">'𝞃'</span>), + (<span class="number">8</span>, <span class="number">10</span>, <span class="string">'\u{FFFD}'</span>), + (<span class="number">10</span>, <span class="number">11</span>, <span class="string">'a'</span>), +]);</code></pre></div> +<p>Codepoints can also be iterated over in reverse:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"\xE2\x98\x83\xFF\xF0\x9D\x9E\x83\xE2\x98\x61"</span>; +<span class="kw">let </span>chars: Vec<(usize, usize, char)> = bs + .char_indices() + .rev() + .collect(); +<span class="macro">assert_eq!</span>(chars, <span class="macro">vec!</span>[ + (<span class="number">10</span>, <span class="number">11</span>, <span class="string">'a'</span>), + (<span class="number">8</span>, <span class="number">10</span>, <span class="string">'\u{FFFD}'</span>), + (<span class="number">4</span>, <span class="number">8</span>, <span class="string">'𝞃'</span>), + (<span class="number">3</span>, <span class="number">4</span>, <span class="string">'\u{FFFD}'</span>), + (<span class="number">0</span>, <span class="number">3</span>, <span class="string">'☃'</span>), +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.utf8_chunks" class="method"><h4 class="code-header">fn <a href="#method.utf8_chunks" class="fn">utf8_chunks</a>(&self) -> Utf8Chunks<'_></h4></section></summary><div class="docblock"><p>Iterate over chunks of valid UTF-8.</p> +<p>The iterator returned yields chunks of valid UTF-8 separated by invalid +UTF-8 bytes, if they exist. Invalid UTF-8 bytes are always 1-3 bytes, +which are determined via the “substitution of maximal subparts” +strategy described in the docs for the +<a href="trait.ByteSlice.html#method.to_str_lossy"><code>ByteSlice::to_str_lossy</code></a> +method.</p> +<h5 id="examples-41"><a class="doc-anchor" href="#examples-41">§</a>Examples</h5> +<p>This example shows how to gather all valid and invalid chunks from a +byte slice:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{ByteSlice, Utf8Chunk}; + +<span class="kw">let </span>bytes = <span class="string">b"foo\xFD\xFEbar\xFF"</span>; + +<span class="kw">let </span>(<span class="kw-2">mut </span>valid_chunks, <span class="kw-2">mut </span>invalid_chunks) = (<span class="macro">vec!</span>[], <span class="macro">vec!</span>[]); +<span class="kw">for </span>chunk <span class="kw">in </span>bytes.utf8_chunks() { + <span class="kw">if </span>!chunk.valid().is_empty() { + valid_chunks.push(chunk.valid()); + } + <span class="kw">if </span>!chunk.invalid().is_empty() { + invalid_chunks.push(chunk.invalid()); + } +} + +<span class="macro">assert_eq!</span>(valid_chunks, <span class="macro">vec!</span>[<span class="string">"foo"</span>, <span class="string">"bar"</span>]); +<span class="macro">assert_eq!</span>(invalid_chunks, <span class="macro">vec!</span>[<span class="string">b"\xFD"</span>, <span class="string">b"\xFE"</span>, <span class="string">b"\xFF"</span>]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.graphemes" class="method"><h4 class="code-header">fn <a href="#method.graphemes" class="fn">graphemes</a>(&self) -> Graphemes<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the grapheme clusters in this byte string. +If invalid UTF-8 is encountered, then the Unicode replacement codepoint +is yielded instead.</p> +<h5 id="examples-42"><a class="doc-anchor" href="#examples-42">§</a>Examples</h5> +<p>This example shows how multiple codepoints can combine to form a +single grapheme cluster:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">"a\u{0300}\u{0316}\u{1F1FA}\u{1F1F8}"</span>.as_bytes(); +<span class="kw">let </span>graphemes: Vec<<span class="kw-2">&</span>str> = bs.graphemes().collect(); +<span class="macro">assert_eq!</span>(<span class="macro">vec!</span>[<span class="string">"à̖"</span>, <span class="string">"🇺🇸"</span>], graphemes);</code></pre></div> +<p>This shows that graphemes can be iterated over in reverse:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">"a\u{0300}\u{0316}\u{1F1FA}\u{1F1F8}"</span>.as_bytes(); +<span class="kw">let </span>graphemes: Vec<<span class="kw-2">&</span>str> = bs.graphemes().rev().collect(); +<span class="macro">assert_eq!</span>(<span class="macro">vec!</span>[<span class="string">"🇺🇸"</span>, <span class="string">"à̖"</span>], graphemes);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.grapheme_indices" class="method"><h4 class="code-header">fn <a href="#method.grapheme_indices" class="fn">grapheme_indices</a>(&self) -> GraphemeIndices<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the grapheme clusters in this byte string +along with their starting and ending byte index positions. If invalid +UTF-8 is encountered, then the Unicode replacement codepoint is yielded +instead.</p> +<h5 id="examples-43"><a class="doc-anchor" href="#examples-43">§</a>Examples</h5> +<p>This example shows how to get the byte offsets of each individual +grapheme cluster:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">"a\u{0300}\u{0316}\u{1F1FA}\u{1F1F8}"</span>.as_bytes(); +<span class="kw">let </span>graphemes: Vec<(usize, usize, <span class="kw-2">&</span>str)> = + bs.grapheme_indices().collect(); +<span class="macro">assert_eq!</span>(<span class="macro">vec!</span>[(<span class="number">0</span>, <span class="number">5</span>, <span class="string">"à̖"</span>), (<span class="number">5</span>, <span class="number">13</span>, <span class="string">"🇺🇸"</span>)], graphemes);</code></pre></div> +<p>This example shows what happens when invalid UTF-8 is encountered. Note +that the offsets are valid indices into the original string, and do +not necessarily correspond to the length of the <code>&str</code> returned!</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{ByteSlice, ByteVec}; + +<span class="kw">let </span><span class="kw-2">mut </span>bytes = <span class="macro">vec!</span>[]; +bytes.push_str(<span class="string">"a\u{0300}\u{0316}"</span>); +bytes.push(<span class="string">b'\xFF'</span>); +bytes.push_str(<span class="string">"\u{1F1FA}\u{1F1F8}"</span>); + +<span class="kw">let </span>graphemes: Vec<(usize, usize, <span class="kw-2">&</span>str)> = + bytes.grapheme_indices().collect(); +<span class="macro">assert_eq!</span>( + graphemes, + <span class="macro">vec!</span>[(<span class="number">0</span>, <span class="number">5</span>, <span class="string">"à̖"</span>), (<span class="number">5</span>, <span class="number">6</span>, <span class="string">"\u{FFFD}"</span>), (<span class="number">6</span>, <span class="number">14</span>, <span class="string">"🇺🇸"</span>)] +);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.words" class="method"><h4 class="code-header">fn <a href="#method.words" class="fn">words</a>(&self) -> Words<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the words in this byte string. If invalid +UTF-8 is encountered, then the Unicode replacement codepoint is yielded +instead.</p> +<p>This is similar to +<a href="trait.ByteSlice.html#method.words_with_breaks"><code>words_with_breaks</code></a>, +except it only returns elements that contain a “word” character. A word +character is defined by UTS #18 (Annex C) to be the combination of the +<code>Alphabetic</code> and <code>Join_Control</code> properties, along with the +<code>Decimal_Number</code>, <code>Mark</code> and <code>Connector_Punctuation</code> general +categories.</p> +<p>Since words are made up of one or more codepoints, this iterator +yields <code>&str</code> elements. When invalid UTF-8 is encountered, replacement +codepoints are <a href="index.html#handling-of-invalid-utf-8">substituted</a>.</p> +<h5 id="examples-44"><a class="doc-anchor" href="#examples-44">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">br#"The quick ("brown") fox can't jump 32.3 feet, right?"#</span>; +<span class="kw">let </span>words: Vec<<span class="kw-2">&</span>str> = bs.words().collect(); +<span class="macro">assert_eq!</span>(words, <span class="macro">vec!</span>[ + <span class="string">"The"</span>, <span class="string">"quick"</span>, <span class="string">"brown"</span>, <span class="string">"fox"</span>, <span class="string">"can't"</span>, + <span class="string">"jump"</span>, <span class="string">"32.3"</span>, <span class="string">"feet"</span>, <span class="string">"right"</span>, +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.word_indices" class="method"><h4 class="code-header">fn <a href="#method.word_indices" class="fn">word_indices</a>(&self) -> WordIndices<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the words in this byte string along with +their starting and ending byte index positions.</p> +<p>This is similar to +<a href="trait.ByteSlice.html#method.words_with_break_indices"><code>words_with_break_indices</code></a>, +except it only returns elements that contain a “word” character. A word +character is defined by UTS #18 (Annex C) to be the combination of the +<code>Alphabetic</code> and <code>Join_Control</code> properties, along with the +<code>Decimal_Number</code>, <code>Mark</code> and <code>Connector_Punctuation</code> general +categories.</p> +<p>Since words are made up of one or more codepoints, this iterator +yields <code>&str</code> elements. When invalid UTF-8 is encountered, replacement +codepoints are <a href="index.html#handling-of-invalid-utf-8">substituted</a>.</p> +<h5 id="examples-45"><a class="doc-anchor" href="#examples-45">§</a>Examples</h5> +<p>This example shows how to get the byte offsets of each individual +word:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"can't jump 32.3 feet"</span>; +<span class="kw">let </span>words: Vec<(usize, usize, <span class="kw-2">&</span>str)> = bs.word_indices().collect(); +<span class="macro">assert_eq!</span>(words, <span class="macro">vec!</span>[ + (<span class="number">0</span>, <span class="number">5</span>, <span class="string">"can't"</span>), + (<span class="number">6</span>, <span class="number">10</span>, <span class="string">"jump"</span>), + (<span class="number">11</span>, <span class="number">15</span>, <span class="string">"32.3"</span>), + (<span class="number">16</span>, <span class="number">20</span>, <span class="string">"feet"</span>), +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.words_with_breaks" class="method"><h4 class="code-header">fn <a href="#method.words_with_breaks" class="fn">words_with_breaks</a>(&self) -> WordsWithBreaks<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the words in this byte string, along with +all breaks between the words. Concatenating all elements yielded by +the iterator results in the original string (modulo Unicode replacement +codepoint substitutions if invalid UTF-8 is encountered).</p> +<p>Since words are made up of one or more codepoints, this iterator +yields <code>&str</code> elements. When invalid UTF-8 is encountered, replacement +codepoints are <a href="index.html#handling-of-invalid-utf-8">substituted</a>.</p> +<h5 id="examples-46"><a class="doc-anchor" href="#examples-46">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">br#"The quick ("brown") fox can't jump 32.3 feet, right?"#</span>; +<span class="kw">let </span>words: Vec<<span class="kw-2">&</span>str> = bs.words_with_breaks().collect(); +<span class="macro">assert_eq!</span>(words, <span class="macro">vec!</span>[ + <span class="string">"The"</span>, <span class="string">" "</span>, <span class="string">"quick"</span>, <span class="string">" "</span>, <span class="string">"("</span>, <span class="string">"\""</span>, <span class="string">"brown"</span>, <span class="string">"\""</span>, <span class="string">")"</span>, + <span class="string">" "</span>, <span class="string">"fox"</span>, <span class="string">" "</span>, <span class="string">"can't"</span>, <span class="string">" "</span>, <span class="string">"jump"</span>, <span class="string">" "</span>, <span class="string">"32.3"</span>, <span class="string">" "</span>, <span class="string">"feet"</span>, + <span class="string">","</span>, <span class="string">" "</span>, <span class="string">"right"</span>, <span class="string">"?"</span>, +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.words_with_break_indices" class="method"><h4 class="code-header">fn <a href="#method.words_with_break_indices" class="fn">words_with_break_indices</a>(&self) -> WordsWithBreakIndices<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the words and their byte offsets in this +byte string, along with all breaks between the words. Concatenating +all elements yielded by the iterator results in the original string +(modulo Unicode replacement codepoint substitutions if invalid UTF-8 is +encountered).</p> +<p>Since words are made up of one or more codepoints, this iterator +yields <code>&str</code> elements. When invalid UTF-8 is encountered, replacement +codepoints are <a href="index.html#handling-of-invalid-utf-8">substituted</a>.</p> +<h5 id="examples-47"><a class="doc-anchor" href="#examples-47">§</a>Examples</h5> +<p>This example shows how to get the byte offsets of each individual +word:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"can't jump 32.3 feet"</span>; +<span class="kw">let </span>words: Vec<(usize, usize, <span class="kw-2">&</span>str)> = + bs.words_with_break_indices().collect(); +<span class="macro">assert_eq!</span>(words, <span class="macro">vec!</span>[ + (<span class="number">0</span>, <span class="number">5</span>, <span class="string">"can't"</span>), + (<span class="number">5</span>, <span class="number">6</span>, <span class="string">" "</span>), + (<span class="number">6</span>, <span class="number">10</span>, <span class="string">"jump"</span>), + (<span class="number">10</span>, <span class="number">11</span>, <span class="string">" "</span>), + (<span class="number">11</span>, <span class="number">15</span>, <span class="string">"32.3"</span>), + (<span class="number">15</span>, <span class="number">16</span>, <span class="string">" "</span>), + (<span class="number">16</span>, <span class="number">20</span>, <span class="string">"feet"</span>), +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sentences" class="method"><h4 class="code-header">fn <a href="#method.sentences" class="fn">sentences</a>(&self) -> Sentences<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the sentences in this byte string.</p> +<p>Typically, a sentence will include its trailing punctuation and +whitespace. Concatenating all elements yielded by the iterator +results in the original string (modulo Unicode replacement codepoint +substitutions if invalid UTF-8 is encountered).</p> +<p>Since sentences are made up of one or more codepoints, this iterator +yields <code>&str</code> elements. When invalid UTF-8 is encountered, replacement +codepoints are <a href="index.html#handling-of-invalid-utf-8">substituted</a>.</p> +<h5 id="examples-48"><a class="doc-anchor" href="#examples-48">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"I want this. Not that. Right now."</span>; +<span class="kw">let </span>sentences: Vec<<span class="kw-2">&</span>str> = bs.sentences().collect(); +<span class="macro">assert_eq!</span>(sentences, <span class="macro">vec!</span>[ + <span class="string">"I want this. "</span>, + <span class="string">"Not that. "</span>, + <span class="string">"Right now."</span>, +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.sentence_indices" class="method"><h4 class="code-header">fn <a href="#method.sentence_indices" class="fn">sentence_indices</a>(&self) -> SentenceIndices<'_></h4></section></summary><div class="docblock"><p>Returns an iterator over the sentences in this byte string along with +their starting and ending byte index positions.</p> +<p>Typically, a sentence will include its trailing punctuation and +whitespace. Concatenating all elements yielded by the iterator +results in the original string (modulo Unicode replacement codepoint +substitutions if invalid UTF-8 is encountered).</p> +<p>Since sentences are made up of one or more codepoints, this iterator +yields <code>&str</code> elements. When invalid UTF-8 is encountered, replacement +codepoints are <a href="index.html#handling-of-invalid-utf-8">substituted</a>.</p> +<h5 id="examples-49"><a class="doc-anchor" href="#examples-49">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span>bs = <span class="string">b"I want this. Not that. Right now."</span>; +<span class="kw">let </span>sentences: Vec<(usize, usize, <span class="kw-2">&</span>str)> = + bs.sentence_indices().collect(); +<span class="macro">assert_eq!</span>(sentences, <span class="macro">vec!</span>[ + (<span class="number">0</span>, <span class="number">13</span>, <span class="string">"I want this. "</span>), + (<span class="number">13</span>, <span class="number">23</span>, <span class="string">"Not that. "</span>), + (<span class="number">23</span>, <span class="number">33</span>, <span class="string">"Right now."</span>), +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.lines" class="method"><h4 class="code-header">fn <a href="#method.lines" class="fn">lines</a>(&self) -> Lines<'_></h4></section></summary><div class="docblock"><p>An iterator over all lines in a byte string, without their +terminators.</p> +<p>For this iterator, the only line terminators recognized are <code>\r\n</code> and +<code>\n</code>.</p> +<h5 id="examples-50"><a class="doc-anchor" href="#examples-50">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = <span class="string">b"\ +foo + +bar\r +baz + + +quux"</span>; +<span class="kw">let </span>lines: Vec<<span class="kw-2">&</span>[u8]> = s.lines().collect(); +<span class="macro">assert_eq!</span>(lines, <span class="macro">vec!</span>[ + B(<span class="string">"foo"</span>), B(<span class="string">""</span>), B(<span class="string">"bar"</span>), B(<span class="string">"baz"</span>), B(<span class="string">""</span>), B(<span class="string">""</span>), B(<span class="string">"quux"</span>), +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.lines_with_terminator" class="method"><h4 class="code-header">fn <a href="#method.lines_with_terminator" class="fn">lines_with_terminator</a>(&self) -> LinesWithTerminator<'_></h4></section></summary><div class="docblock"><p>An iterator over all lines in a byte string, including their +terminators.</p> +<p>For this iterator, the only line terminator recognized is <code>\n</code>. (Since +line terminators are included, this also handles <code>\r\n</code> line endings.)</p> +<p>Line terminators are only included if they are present in the original +byte string. For example, the last line in a byte string may not end +with a line terminator.</p> +<p>Concatenating all elements yielded by this iterator is guaranteed to +yield the original byte string.</p> +<h5 id="examples-51"><a class="doc-anchor" href="#examples-51">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = <span class="string">b"\ +foo + +bar\r +baz + + +quux"</span>; +<span class="kw">let </span>lines: Vec<<span class="kw-2">&</span>[u8]> = s.lines_with_terminator().collect(); +<span class="macro">assert_eq!</span>(lines, <span class="macro">vec!</span>[ + B(<span class="string">"foo\n"</span>), + B(<span class="string">"\n"</span>), + B(<span class="string">"bar\r\n"</span>), + B(<span class="string">"baz\n"</span>), + B(<span class="string">"\n"</span>), + B(<span class="string">"\n"</span>), + B(<span class="string">"quux"</span>), +]);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim" class="method"><h4 class="code-header">fn <a href="#method.trim" class="fn">trim</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class="docblock"><p>Return a byte string slice with leading and trailing whitespace +removed.</p> +<p>Whitespace is defined according to the terms of the <code>White_Space</code> +Unicode property.</p> +<h5 id="examples-52"><a class="doc-anchor" href="#examples-52">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">" foo\tbar\t\u{2003}\n"</span>); +<span class="macro">assert_eq!</span>(s.trim(), B(<span class="string">"foo\tbar"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_start" class="method"><h4 class="code-header">fn <a href="#method.trim_start" class="fn">trim_start</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class="docblock"><p>Return a byte string slice with leading whitespace removed.</p> +<p>Whitespace is defined according to the terms of the <code>White_Space</code> +Unicode property.</p> +<h5 id="examples-53"><a class="doc-anchor" href="#examples-53">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">" foo\tbar\t\u{2003}\n"</span>); +<span class="macro">assert_eq!</span>(s.trim_start(), B(<span class="string">"foo\tbar\t\u{2003}\n"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_end" class="method"><h4 class="code-header">fn <a href="#method.trim_end" class="fn">trim_end</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a></h4></section></summary><div class="docblock"><p>Return a byte string slice with trailing whitespace removed.</p> +<p>Whitespace is defined according to the terms of the <code>White_Space</code> +Unicode property.</p> +<h5 id="examples-54"><a class="doc-anchor" href="#examples-54">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">" foo\tbar\t\u{2003}\n"</span>); +<span class="macro">assert_eq!</span>(s.trim_end(), B(<span class="string">" foo\tbar"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_with" class="method"><h4 class="code-header">fn <a href="#method.trim_with" class="fn">trim_with</a><F>(&self, trim: F) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Return a byte string slice with leading and trailing characters +satisfying the given predicate removed.</p> +<h5 id="examples-55"><a class="doc-anchor" href="#examples-55">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = <span class="string">b"123foo5bar789"</span>; +<span class="macro">assert_eq!</span>(s.trim_with(|c| c.is_numeric()), B(<span class="string">"foo5bar"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_start_with" class="method"><h4 class="code-header">fn <a href="#method.trim_start_with" class="fn">trim_start_with</a><F>(&self, trim: F) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Return a byte string slice with leading characters satisfying the given +predicate removed.</p> +<h5 id="examples-56"><a class="doc-anchor" href="#examples-56">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = <span class="string">b"123foo5bar789"</span>; +<span class="macro">assert_eq!</span>(s.trim_start_with(|c| c.is_numeric()), B(<span class="string">"foo5bar789"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.trim_end_with" class="method"><h4 class="code-header">fn <a href="#method.trim_end_with" class="fn">trim_end_with</a><F>(&self, trim: F) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>] <a href="#" class="tooltip" data-notable-ty="&[u8]">ⓘ</a><div class="where">where + F: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class="docblock"><p>Return a byte string slice with trailing characters satisfying the +given predicate removed.</p> +<h5 id="examples-57"><a class="doc-anchor" href="#examples-57">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = <span class="string">b"123foo5bar789"</span>; +<span class="macro">assert_eq!</span>(s.trim_end_with(|c| c.is_numeric()), B(<span class="string">"123foo5bar"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_lowercase" class="method"><h4 class="code-header">fn <a href="#method.to_lowercase" class="fn">to_lowercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a new <code>Vec<u8></code> containing the lowercase equivalent of this +byte string.</p> +<p>In this case, lowercase is defined according to the <code>Lowercase</code> Unicode +property.</p> +<p>If invalid UTF-8 is seen, or if a character has no lowercase variant, +then it is written to the given buffer unchanged.</p> +<p>Note that some characters in this byte string may expand into multiple +characters when changing the case, so the number of bytes written to +the given byte string may not be equivalent to the number of bytes in +this byte string.</p> +<p>If you’d like to reuse an allocation for performance reasons, then use +<a href="#method.to_lowercase_into"><code>to_lowercase_into</code></a> instead.</p> +<h5 id="examples-58"><a class="doc-anchor" href="#examples-58">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"HELLO Β"</span>); +<span class="macro">assert_eq!</span>(<span class="string">"hello β"</span>.as_bytes(), s.to_lowercase().as_bytes());</code></pre></div> +<p>Scripts without case are not changed:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"农历新年"</span>); +<span class="macro">assert_eq!</span>(<span class="string">"农历新年"</span>.as_bytes(), s.to_lowercase().as_bytes());</code></pre></div> +<p>Invalid UTF-8 remains as is:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">b"FOO\xFFBAR\xE2\x98BAZ"</span>); +<span class="macro">assert_eq!</span>(B(<span class="string">b"foo\xFFbar\xE2\x98baz"</span>), s.to_lowercase().as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_lowercase_into" class="method"><h4 class="code-header">fn <a href="#method.to_lowercase_into" class="fn">to_lowercase_into</a>(&self, buf: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>)</h4></section></summary><div class="docblock"><p>Writes the lowercase equivalent of this byte string into the given +buffer. The buffer is not cleared before written to.</p> +<p>In this case, lowercase is defined according to the <code>Lowercase</code> +Unicode property.</p> +<p>If invalid UTF-8 is seen, or if a character has no lowercase variant, +then it is written to the given buffer unchanged.</p> +<p>Note that some characters in this byte string may expand into multiple +characters when changing the case, so the number of bytes written to +the given byte string may not be equivalent to the number of bytes in +this byte string.</p> +<p>If you don’t need to amortize allocation and instead prefer +convenience, then use <a href="#method.to_lowercase"><code>to_lowercase</code></a> instead.</p> +<h5 id="examples-59"><a class="doc-anchor" href="#examples-59">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"HELLO Β"</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[]; +s.to_lowercase_into(<span class="kw-2">&mut </span>buf); +<span class="macro">assert_eq!</span>(<span class="string">"hello β"</span>.as_bytes(), buf.as_bytes());</code></pre></div> +<p>Scripts without case are not changed:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"农历新年"</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[]; +s.to_lowercase_into(<span class="kw-2">&mut </span>buf); +<span class="macro">assert_eq!</span>(<span class="string">"农历新年"</span>.as_bytes(), buf.as_bytes());</code></pre></div> +<p>Invalid UTF-8 remains as is:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">b"FOO\xFFBAR\xE2\x98BAZ"</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[]; +s.to_lowercase_into(<span class="kw-2">&mut </span>buf); +<span class="macro">assert_eq!</span>(B(<span class="string">b"foo\xFFbar\xE2\x98baz"</span>), buf.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_ascii_lowercase" class="method"><h4 class="code-header">fn <a href="#method.to_ascii_lowercase" class="fn">to_ascii_lowercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a new <code>Vec<u8></code> containing the ASCII lowercase equivalent of +this byte string.</p> +<p>In this case, lowercase is only defined in ASCII letters. Namely, the +letters <code>A-Z</code> are converted to <code>a-z</code>. All other bytes remain unchanged. +In particular, the length of the byte string returned is always +equivalent to the length of this byte string.</p> +<p>If you’d like to reuse an allocation for performance reasons, then use +<a href="#method.make_ascii_lowercase"><code>make_ascii_lowercase</code></a> to perform +the conversion in place.</p> +<h5 id="examples-60"><a class="doc-anchor" href="#examples-60">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"HELLO Β"</span>); +<span class="macro">assert_eq!</span>(<span class="string">"hello Β"</span>.as_bytes(), s.to_ascii_lowercase().as_bytes());</code></pre></div> +<p>Invalid UTF-8 remains as is:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">b"FOO\xFFBAR\xE2\x98BAZ"</span>); +<span class="macro">assert_eq!</span>(s.to_ascii_lowercase(), B(<span class="string">b"foo\xFFbar\xE2\x98baz"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.make_ascii_lowercase" class="method"><h4 class="code-header">fn <a href="#method.make_ascii_lowercase" class="fn">make_ascii_lowercase</a>(&mut self)</h4></section></summary><div class="docblock"><p>Convert this byte string to its lowercase ASCII equivalent in place.</p> +<p>In this case, lowercase is only defined in ASCII letters. Namely, the +letters <code>A-Z</code> are converted to <code>a-z</code>. All other bytes remain unchanged.</p> +<p>If you don’t need to do the conversion in +place and instead prefer convenience, then use +<a href="#method.to_ascii_lowercase"><code>to_ascii_lowercase</code></a> instead.</p> +<h5 id="examples-61"><a class="doc-anchor" href="#examples-61">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"HELLO Β"</span>); +s.make_ascii_lowercase(); +<span class="macro">assert_eq!</span>(s, <span class="string">"hello Β"</span>.as_bytes());</code></pre></div> +<p>Invalid UTF-8 remains as is:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice, ByteVec}; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from_slice(<span class="string">b"FOO\xFFBAR\xE2\x98BAZ"</span>); +s.make_ascii_lowercase(); +<span class="macro">assert_eq!</span>(s, B(<span class="string">b"foo\xFFbar\xE2\x98baz"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_uppercase" class="method"><h4 class="code-header">fn <a href="#method.to_uppercase" class="fn">to_uppercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a new <code>Vec<u8></code> containing the uppercase equivalent of this +byte string.</p> +<p>In this case, uppercase is defined according to the <code>Uppercase</code> +Unicode property.</p> +<p>If invalid UTF-8 is seen, or if a character has no uppercase variant, +then it is written to the given buffer unchanged.</p> +<p>Note that some characters in this byte string may expand into multiple +characters when changing the case, so the number of bytes written to +the given byte string may not be equivalent to the number of bytes in +this byte string.</p> +<p>If you’d like to reuse an allocation for performance reasons, then use +<a href="#method.to_uppercase_into"><code>to_uppercase_into</code></a> instead.</p> +<h5 id="examples-62"><a class="doc-anchor" href="#examples-62">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"hello β"</span>); +<span class="macro">assert_eq!</span>(s.to_uppercase(), B(<span class="string">"HELLO Β"</span>));</code></pre></div> +<p>Scripts without case are not changed:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"农历新年"</span>); +<span class="macro">assert_eq!</span>(s.to_uppercase(), B(<span class="string">"农历新年"</span>));</code></pre></div> +<p>Invalid UTF-8 remains as is:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">b"foo\xFFbar\xE2\x98baz"</span>); +<span class="macro">assert_eq!</span>(s.to_uppercase(), B(<span class="string">b"FOO\xFFBAR\xE2\x98BAZ"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_uppercase_into" class="method"><h4 class="code-header">fn <a href="#method.to_uppercase_into" class="fn">to_uppercase_into</a>(&self, buf: &mut <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>)</h4></section></summary><div class="docblock"><p>Writes the uppercase equivalent of this byte string into the given +buffer. The buffer is not cleared before written to.</p> +<p>In this case, uppercase is defined according to the <code>Uppercase</code> +Unicode property.</p> +<p>If invalid UTF-8 is seen, or if a character has no uppercase variant, +then it is written to the given buffer unchanged.</p> +<p>Note that some characters in this byte string may expand into multiple +characters when changing the case, so the number of bytes written to +the given byte string may not be equivalent to the number of bytes in +this byte string.</p> +<p>If you don’t need to amortize allocation and instead prefer +convenience, then use <a href="#method.to_uppercase"><code>to_uppercase</code></a> instead.</p> +<h5 id="examples-63"><a class="doc-anchor" href="#examples-63">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"hello β"</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[]; +s.to_uppercase_into(<span class="kw-2">&mut </span>buf); +<span class="macro">assert_eq!</span>(buf, B(<span class="string">"HELLO Β"</span>));</code></pre></div> +<p>Scripts without case are not changed:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"农历新年"</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[]; +s.to_uppercase_into(<span class="kw-2">&mut </span>buf); +<span class="macro">assert_eq!</span>(buf, B(<span class="string">"农历新年"</span>));</code></pre></div> +<p>Invalid UTF-8 remains as is:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">b"foo\xFFbar\xE2\x98baz"</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[]; +s.to_uppercase_into(<span class="kw-2">&mut </span>buf); +<span class="macro">assert_eq!</span>(buf, B(<span class="string">b"FOO\xFFBAR\xE2\x98BAZ"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.to_ascii_uppercase" class="method"><h4 class="code-header">fn <a href="#method.to_ascii_uppercase" class="fn">to_ascii_uppercase</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></h4></section></summary><div class="docblock"><p>Returns a new <code>Vec<u8></code> containing the ASCII uppercase equivalent of +this byte string.</p> +<p>In this case, uppercase is only defined in ASCII letters. Namely, the +letters <code>a-z</code> are converted to <code>A-Z</code>. All other bytes remain unchanged. +In particular, the length of the byte string returned is always +equivalent to the length of this byte string.</p> +<p>If you’d like to reuse an allocation for performance reasons, then use +<a href="#method.make_ascii_uppercase"><code>make_ascii_uppercase</code></a> to perform +the conversion in place.</p> +<h5 id="examples-64"><a class="doc-anchor" href="#examples-64">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">"hello β"</span>); +<span class="macro">assert_eq!</span>(s.to_ascii_uppercase(), B(<span class="string">"HELLO β"</span>));</code></pre></div> +<p>Invalid UTF-8 remains as is:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span>s = B(<span class="string">b"foo\xFFbar\xE2\x98baz"</span>); +<span class="macro">assert_eq!</span>(s.to_ascii_uppercase(), B(<span class="string">b"FOO\xFFBAR\xE2\x98BAZ"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.make_ascii_uppercase" class="method"><h4 class="code-header">fn <a href="#method.make_ascii_uppercase" class="fn">make_ascii_uppercase</a>(&mut self)</h4></section></summary><div class="docblock"><p>Convert this byte string to its uppercase ASCII equivalent in place.</p> +<p>In this case, uppercase is only defined in ASCII letters. Namely, the +letters <code>a-z</code> are converted to <code>A-Z</code>. All other bytes remain unchanged.</p> +<p>If you don’t need to do the conversion in +place and instead prefer convenience, then use +<a href="#method.to_ascii_uppercase"><code>to_ascii_uppercase</code></a> instead.</p> +<h5 id="examples-65"><a class="doc-anchor" href="#examples-65">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"hello β"</span>); +s.make_ascii_uppercase(); +<span class="macro">assert_eq!</span>(s, B(<span class="string">"HELLO β"</span>));</code></pre></div> +<p>Invalid UTF-8 remains as is:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice, ByteVec}; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from_slice(<span class="string">b"foo\xFFbar\xE2\x98baz"</span>); +s.make_ascii_uppercase(); +<span class="macro">assert_eq!</span>(s, B(<span class="string">b"FOO\xFFBAR\xE2\x98BAZ"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.escape_bytes" class="method"><h4 class="code-header">fn <a href="#method.escape_bytes" class="fn">escape_bytes</a>(&self) -> EscapeBytes<'_></h4></section></summary><div class="docblock"><p>Escapes this byte string into a sequence of <code>char</code> values.</p> +<p>When the sequence of <code>char</code> values is concatenated into a string, the +result is always valid UTF-8. Any unprintable or invalid UTF-8 in this +byte string are escaped using using <code>\xNN</code> notation. Moreover, the +characters <code>\0</code>, <code>\r</code>, <code>\n</code>, <code>\t</code> and <code>\</code> are escaped as well.</p> +<p>This is useful when one wants to get a human readable view of the raw +bytes that is also valid UTF-8.</p> +<p>The iterator returned implements the <code>Display</code> trait. So one can do +<code>b"foo\xFFbar".escape_bytes().to_string()</code> to get a <code>String</code> with its +bytes escaped.</p> +<p>The dual of this function is <a href="trait.ByteVec.html#method.unescape_bytes" title="associated function ba2::ByteVec::unescape_bytes"><code>ByteVec::unescape_bytes</code></a>.</p> +<p>Note that this is similar to, but not equivalent to the <code>Debug</code> +implementation on <a href="struct.BStr.html" title="struct ba2::BStr"><code>BStr</code></a> and [<code>BString</code>]. The <code>Debug</code> implementations +also use the debug representation for all Unicode codepoints. However, +this escaping routine only escapes individual bytes. All Unicode +codepoints above <code>U+007F</code> are passed through unchanged without any +escaping.</p> +<h5 id="examples-66"><a class="doc-anchor" href="#examples-66">§</a>Examples</h5> +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert_eq!</span>(<span class="string">r"foo\xFFbar"</span>, <span class="string">b"foo\xFFbar"</span>.escape_bytes().to_string()); +<span class="macro">assert_eq!</span>(<span class="string">r"foo\nbar"</span>, <span class="string">b"foo\nbar"</span>.escape_bytes().to_string()); +<span class="macro">assert_eq!</span>(<span class="string">r"foo\tbar"</span>, <span class="string">b"foo\tbar"</span>.escape_bytes().to_string()); +<span class="macro">assert_eq!</span>(<span class="string">r"foo\\bar"</span>, <span class="string">b"foo\\bar"</span>.escape_bytes().to_string()); +<span class="macro">assert_eq!</span>(<span class="string">r"foo☃bar"</span>, B(<span class="string">"foo☃bar"</span>).escape_bytes().to_string());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.reverse_bytes" class="method"><h4 class="code-header">fn <a href="#method.reverse_bytes" class="fn">reverse_bytes</a>(&mut self)</h4></section></summary><div class="docblock"><p>Reverse the bytes in this string, in place.</p> +<p>This is not necessarily a well formed operation! For example, if this +byte string contains valid UTF-8 that isn’t ASCII, then reversing the +string will likely result in invalid UTF-8 and otherwise non-sensical +content.</p> +<p>Note that this is equivalent to the generic <code>[u8]::reverse</code> method. +This method is provided to permit callers to explicitly differentiate +between reversing bytes, codepoints and graphemes.</p> +<h5 id="examples-67"><a class="doc-anchor" href="#examples-67">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"hello"</span>); +s.reverse_bytes(); +<span class="macro">assert_eq!</span>(s, <span class="string">"olleh"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.reverse_chars" class="method"><h4 class="code-header">fn <a href="#method.reverse_chars" class="fn">reverse_chars</a>(&mut self)</h4></section></summary><div class="docblock"><p>Reverse the codepoints in this string, in place.</p> +<p>If this byte string is valid UTF-8, then its reversal by codepoint +is also guaranteed to be valid UTF-8.</p> +<p>This operation is equivalent to the following, but without allocating:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"foo☃bar"</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>chars: Vec<char> = s.chars().collect(); +chars.reverse(); + +<span class="kw">let </span>reversed: String = chars.into_iter().collect(); +<span class="macro">assert_eq!</span>(reversed, <span class="string">"rab☃oof"</span>);</code></pre></div> +<p>Note that this is not necessarily a well formed operation. For example, +if this byte string contains grapheme clusters with more than one +codepoint, then those grapheme clusters will not necessarily be +preserved. If you’d like to preserve grapheme clusters, then use +<a href="#method.reverse_graphemes"><code>reverse_graphemes</code></a> instead.</p> +<h5 id="examples-68"><a class="doc-anchor" href="#examples-68">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"foo☃bar"</span>); +s.reverse_chars(); +<span class="macro">assert_eq!</span>(s, <span class="string">"rab☃oof"</span>.as_bytes());</code></pre></div> +<p>This example shows that not all reversals lead to a well formed string. +For example, in this case, combining marks are used to put accents over +some letters, and those accent marks must appear after the codepoints +they modify.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"résumé"</span>); +s.reverse_chars(); +<span class="macro">assert_eq!</span>(s, B(<span class="string">b"\xCC\x81emus\xCC\x81er"</span>));</code></pre></div> +<p>A word of warning: the above example relies on the fact that +<code>résumé</code> is in decomposed normal form, which means there are separate +codepoints for the accents above <code>e</code>. If it is instead in composed +normal form, then the example works:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"résumé"</span>); +s.reverse_chars(); +<span class="macro">assert_eq!</span>(s, B(<span class="string">"émusér"</span>));</code></pre></div> +<p>The point here is to be cautious and not assume that just because +<code>reverse_chars</code> works in one case, that it therefore works in all +cases.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="method.reverse_graphemes" class="method"><h4 class="code-header">fn <a href="#method.reverse_graphemes" class="fn">reverse_graphemes</a>(&mut self)</h4></section></summary><div class="docblock"><p>Reverse the graphemes in this string, in place.</p> +<p>If this byte string is valid UTF-8, then its reversal by grapheme +is also guaranteed to be valid UTF-8.</p> +<p>This operation is equivalent to the following, but without allocating:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"foo☃bar"</span>); + +<span class="kw">let </span><span class="kw-2">mut </span>graphemes: Vec<<span class="kw-2">&</span>str> = s.graphemes().collect(); +graphemes.reverse(); + +<span class="kw">let </span>reversed = graphemes.concat(); +<span class="macro">assert_eq!</span>(reversed, <span class="string">"rab☃oof"</span>);</code></pre></div> +<h5 id="examples-69"><a class="doc-anchor" href="#examples-69">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"foo☃bar"</span>); +s.reverse_graphemes(); +<span class="macro">assert_eq!</span>(s, <span class="string">"rab☃oof"</span>.as_bytes());</code></pre></div> +<p>This example shows how this correctly handles grapheme clusters, +unlike <code>reverse_chars</code>.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"résumé"</span>); +s.reverse_graphemes(); +<span class="macro">assert_eq!</span>(s, <span class="string">"émusér"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_ascii" class="method"><h4 class="code-header">fn <a href="#method.is_ascii" class="fn">is_ascii</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if and only if every byte in this byte string is ASCII.</p> +<p>ASCII is an encoding that defines 128 codepoints. A byte corresponds to +an ASCII codepoint if and only if it is in the inclusive range +<code>[0, 127]</code>.</p> +<h5 id="examples-70"><a class="doc-anchor" href="#examples-70">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert!</span>(B(<span class="string">"abc"</span>).is_ascii()); +<span class="macro">assert!</span>(!B(<span class="string">"☃βツ"</span>).is_ascii()); +<span class="macro">assert!</span>(!B(<span class="string">b"\xFF"</span>).is_ascii());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.is_utf8" class="method"><h4 class="code-header">fn <a href="#method.is_utf8" class="fn">is_utf8</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if and only if the entire byte string is valid UTF-8.</p> +<p>If you need location information about where a byte string’s first +invalid UTF-8 byte is, then use the <a href="#method.to_str"><code>to_str</code></a> method.</p> +<h5 id="examples-71"><a class="doc-anchor" href="#examples-71">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteSlice}; + +<span class="macro">assert!</span>(B(<span class="string">"abc"</span>).is_utf8()); +<span class="macro">assert!</span>(B(<span class="string">"☃βツ"</span>).is_utf8()); +<span class="comment">// invalid bytes +</span><span class="macro">assert!</span>(!B(<span class="string">b"abc\xFF"</span>).is_utf8()); +<span class="comment">// surrogate encoding +</span><span class="macro">assert!</span>(!B(<span class="string">b"\xED\xA0\x80"</span>).is_utf8()); +<span class="comment">// incomplete sequence +</span><span class="macro">assert!</span>(!B(<span class="string">b"\xF0\x9D\x9Ca"</span>).is_utf8()); +<span class="comment">// overlong sequence +</span><span class="macro">assert!</span>(!B(<span class="string">b"\xF0\x82\x82\xAC"</span>).is_utf8());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.last_byte" class="method"><h4 class="code-header">fn <a href="#method.last_byte" class="fn">last_byte</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h4></section></summary><div class="docblock"><p>Returns the last byte in this byte string, if it’s non-empty. If this +byte string is empty, this returns <code>None</code>.</p> +<p>Note that this is like the generic <code>[u8]::last</code>, except this returns +the byte by value instead of a reference to the byte.</p> +<h5 id="examples-72"><a class="doc-anchor" href="#examples-72">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteSlice; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="string">b'z'</span>), <span class="string">b"baz"</span>.last_byte()); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b""</span>.last_byte());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.find_non_ascii_byte" class="method"><h4 class="code-header">fn <a href="#method.find_non_ascii_byte" class="fn">find_non_ascii_byte</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></h4></section></summary><div class="docblock"><p>Returns the index of the first non-ASCII byte in this byte string (if +any such indices exist). Specifically, it returns the index of the +first byte with a value greater than or equal to <code>0x80</code>.</p> +<h5 id="examples-73"><a class="doc-anchor" href="#examples-73">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{ByteSlice, B}; + +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">3</span>), <span class="string">b"abc\xff"</span>.find_non_ascii_byte()); +<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, <span class="string">b"abcde"</span>.find_non_ascii_byte()); +<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">0</span>), B(<span class="string">"😀"</span>).find_non_ascii_byte());</code></pre></div> +</div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.77.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><section id="impl-ByteSlice-for-%5Bu8%5D" class="impl"><a href="#impl-ByteSlice-for-%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ByteSlice.html" title="trait ba2::ByteSlice">ByteSlice</a> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]</h3></section><section id="impl-ByteSlice-for-%5Bu8;+N%5D" class="impl"><a href="#impl-ByteSlice-for-%5Bu8;+N%5D" class="anchor">§</a><h3 class="code-header">impl<const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="trait.ByteSlice.html" title="trait ba2::ByteSlice">ByteSlice</a> for [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]</h3></section><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/bstr/ext_slice/trait.ByteSlice.js" data-ignore-extern-crates="std" async></script><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]</div>","Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A></code></h3><pre><code><div class=\"where\">impl<A> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>"}</script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/trait.ByteVec.html b/ba2/trait.ByteVec.html new file mode 100644 index 0000000..59760c6 --- /dev/null +++ b/ba2/trait.ByteVec.html @@ -0,0 +1,502 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A trait that extends `Vec<u8>` with string oriented methods."><title>ByteVec in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ByteVec</a></h2><div class="sidebar-elems"><section><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.drain_bytes">drain_bytes</a></li><li><a href="#method.from_os_str_lossy">from_os_str_lossy</a></li><li><a href="#method.from_os_string">from_os_string</a></li><li><a href="#method.from_path_buf">from_path_buf</a></li><li><a href="#method.from_path_lossy">from_path_lossy</a></li><li><a href="#method.from_slice">from_slice</a></li><li><a href="#method.insert_char">insert_char</a></li><li><a href="#method.insert_str">insert_str</a></li><li><a href="#method.into_os_string">into_os_string</a></li><li><a href="#method.into_os_string_lossy">into_os_string_lossy</a></li><li><a href="#method.into_path_buf">into_path_buf</a></li><li><a href="#method.into_path_buf_lossy">into_path_buf_lossy</a></li><li><a href="#method.into_string">into_string</a></li><li><a href="#method.into_string_lossy">into_string_lossy</a></li><li><a href="#method.into_string_unchecked">into_string_unchecked</a></li><li><a href="#method.pop_byte">pop_byte</a></li><li><a href="#method.pop_char">pop_char</a></li><li><a href="#method.push_byte">push_byte</a></li><li><a href="#method.push_char">push_char</a></li><li><a href="#method.push_str">push_str</a></li><li><a href="#method.remove_char">remove_char</a></li><li><a href="#method.replace_range">replace_range</a></li><li><a href="#method.unescape_bytes">unescape_bytes</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-ByteVec-for-Vec%3Cu8%3E">Vec<u8></a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="index.html">ba2</a>::<wbr><a class="trait" href="#">ByteVec</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait ByteVec: Sealed { +<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 23 methods</span></summary> // Provided methods + fn <a href="#method.from_slice" class="fn">from_slice</a><B>(bytes: B) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.from_os_string" class="fn">from_os_string</a>(os_str: <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.from_os_str_lossy" class="fn">from_os_str_lossy</a><'a>(os_str: &'a <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> { ... } +<span class="item-spacer"></span> fn <a href="#method.from_path_buf" class="fn">from_path_buf</a>(path: <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.from_path_lossy" class="fn">from_path_lossy</a><'a>(path: &'a <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> { ... } +<span class="item-spacer"></span> fn <a href="#method.unescape_bytes" class="fn">unescape_bytes</a><S>(escaped: S) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a> + <span class="where">where S: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.push_byte" class="fn">push_byte</a>(&mut self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>) { ... } +<span class="item-spacer"></span> fn <a href="#method.push_char" class="fn">push_char</a>(&mut self, ch: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) { ... } +<span class="item-spacer"></span> fn <a href="#method.push_str" class="fn">push_str</a><B>(&mut self, bytes: B) + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.into_string" class="fn">into_string</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, FromUtf8Error> + <span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.into_string_lossy" class="fn">into_string_lossy</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a> + <span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> unsafe fn <a href="#method.into_string_unchecked" class="fn">into_string_unchecked</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a> + <span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.into_os_string" class="fn">into_os_string</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>, FromUtf8Error> + <span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.into_os_string_lossy" class="fn">into_os_string_lossy</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a> + <span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.into_path_buf" class="fn">into_path_buf</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>, FromUtf8Error> + <span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.into_path_buf_lossy" class="fn">into_path_buf_lossy</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a> + <span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.pop_byte" class="fn">pop_byte</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.pop_char" class="fn">pop_char</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>> { ... } +<span class="item-spacer"></span> fn <a href="#method.remove_char" class="fn">remove_char</a>(&mut self, at: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a> { ... } +<span class="item-spacer"></span> fn <a href="#method.insert_char" class="fn">insert_char</a>(&mut self, at: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, ch: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>) { ... } +<span class="item-spacer"></span> fn <a href="#method.insert_str" class="fn">insert_str</a><B>(&mut self, at: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, bytes: B) + <span class="where">where B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.replace_range" class="fn">replace_range</a><R, B>(&mut self, range: R, replace_with: B) + <span class="where">where R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>, + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></span> { ... } +<span class="item-spacer"></span> fn <a href="#method.drain_bytes" class="fn">drain_bytes</a><R>(&mut self, range: R) -> DrainBytes<'_> + <span class="where">where R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>></span> { ... } +</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait that extends <code>Vec<u8></code> with string oriented methods.</p> +<p>Note that when using the constructor methods, such as +<code>ByteVec::from_slice</code>, one should actually call them using the concrete +type. For example:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteVec}; + +<span class="kw">let </span>s = Vec::from_slice(<span class="string">b"abc"</span>); <span class="comment">// NOT ByteVec::from_slice("...") +</span><span class="macro">assert_eq!</span>(s, B(<span class="string">"abc"</span>));</code></pre></div> +<p>This trait is sealed and cannot be implemented outside of <code>bstr</code>.</p> +</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.from_slice" class="method"><h4 class="code-header">fn <a href="#method.from_slice" class="fn">from_slice</a><B>(bytes: B) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a><div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Create a new owned byte string from the given byte slice.</p> +<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteVec}; + +<span class="kw">let </span>s = Vec::from_slice(<span class="string">b"abc"</span>); +<span class="macro">assert_eq!</span>(s, B(<span class="string">"abc"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_os_string" class="method"><h4 class="code-header">fn <a href="#method.from_os_string" class="fn">from_os_string</a>(os_str: <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>></h4></section></summary><div class="docblock"><p>Create a new byte string from an owned OS string.</p> +<p>When the underlying bytes of OS strings are accessible, then this +always succeeds and is zero cost. Otherwise, this returns the given +<code>OsString</code> if it is not valid UTF-8.</p> +<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::ffi::OsString; + +<span class="kw">use </span>bstr::{B, ByteVec}; + +<span class="kw">let </span>os_str = OsString::from(<span class="string">"foo"</span>); +<span class="kw">let </span>bs = Vec::from_os_string(os_str).expect(<span class="string">"valid UTF-8"</span>); +<span class="macro">assert_eq!</span>(bs, B(<span class="string">"foo"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_os_str_lossy" class="method"><h4 class="code-header">fn <a href="#method.from_os_str_lossy" class="fn">from_os_str_lossy</a><'a>(os_str: &'a <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Lossily create a new byte string from an OS string slice.</p> +<p>When the underlying bytes of OS strings are accessible, then this is +zero cost and always returns a slice. Otherwise, a UTF-8 check is +performed and if the given OS string is not valid UTF-8, then it is +lossily decoded into valid UTF-8 (with invalid bytes replaced by the +Unicode replacement codepoint).</p> +<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::ffi::OsStr; + +<span class="kw">use </span>bstr::{B, ByteVec}; + +<span class="kw">let </span>os_str = OsStr::new(<span class="string">"foo"</span>); +<span class="kw">let </span>bs = Vec::from_os_str_lossy(os_str); +<span class="macro">assert_eq!</span>(bs, B(<span class="string">"foo"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_path_buf" class="method"><h4 class="code-header">fn <a href="#method.from_path_buf" class="fn">from_path_buf</a>(path: <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>>, <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>></h4></section></summary><div class="docblock"><p>Create a new byte string from an owned file path.</p> +<p>When the underlying bytes of paths are accessible, then this always +succeeds and is zero cost. Otherwise, this returns the given <code>PathBuf</code> +if it is not valid UTF-8.</p> +<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::PathBuf; + +<span class="kw">use </span>bstr::{B, ByteVec}; + +<span class="kw">let </span>path = PathBuf::from(<span class="string">"foo"</span>); +<span class="kw">let </span>bs = Vec::from_path_buf(path).expect(<span class="string">"must be valid UTF-8"</span>); +<span class="macro">assert_eq!</span>(bs, B(<span class="string">"foo"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.from_path_lossy" class="method"><h4 class="code-header">fn <a href="#method.from_path_lossy" class="fn">from_path_lossy</a><'a>(path: &'a <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Lossily create a new byte string from a file path.</p> +<p>When the underlying bytes of paths are accessible, then this is +zero cost and always returns a slice. Otherwise, a UTF-8 check is +performed and if the given path is not valid UTF-8, then it is lossily +decoded into valid UTF-8 (with invalid bytes replaced by the Unicode +replacement codepoint).</p> +<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path; + +<span class="kw">use </span>bstr::{B, ByteVec}; + +<span class="kw">let </span>path = Path::new(<span class="string">"foo"</span>); +<span class="kw">let </span>bs = Vec::from_path_lossy(path); +<span class="macro">assert_eq!</span>(bs, B(<span class="string">"foo"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.unescape_bytes" class="method"><h4 class="code-header">fn <a href="#method.unescape_bytes" class="fn">unescape_bytes</a><S>(escaped: S) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a><div class="where">where + S: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.str.html">str</a>>,</div></h4></section></summary><div class="docblock"><p>Unescapes the given string into its raw bytes.</p> +<p>This looks for the escape sequences <code>\xNN</code>, <code>\0</code>, <code>\r</code>, <code>\n</code>, <code>\t</code> +and <code>\</code> and translates them into their corresponding unescaped form.</p> +<p>Incomplete escape sequences or things that look like escape sequences +but are not (for example, <code>\i</code> or <code>\xYZ</code>) are passed through literally.</p> +<p>This is the dual of <a href="trait.ByteSlice.html#method.escape_bytes" title="method ba2::ByteSlice::escape_bytes"><code>ByteSlice::escape_bytes</code></a>.</p> +<p>Note that the zero or NUL byte may be represented as either <code>\0</code> or +<code>\x00</code>. Both will be unescaped into the zero byte.</p> +<h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5> +<p>This shows basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, BString, ByteVec}; + +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">b"foo\xFFbar"</span>), + Vec::unescape_bytes(<span class="string">r"foo\xFFbar"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">b"foo\nbar"</span>), + Vec::unescape_bytes(<span class="string">r"foo\nbar"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">b"foo\tbar"</span>), + Vec::unescape_bytes(<span class="string">r"foo\tbar"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">b"foo\\bar"</span>), + Vec::unescape_bytes(<span class="string">r"foo\\bar"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">"foo☃bar"</span>), + Vec::unescape_bytes(<span class="string">r"foo☃bar"</span>), +); +</code></pre></div> +<p>This shows some examples of how incomplete or “incorrect” escape +sequences get passed through literally.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, BString, ByteVec}; + +<span class="comment">// Show some incomplete escape sequences. +</span><span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\"</span>), + Vec::unescape_bytes(<span class="string">r"\"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\"</span>), + Vec::unescape_bytes(<span class="string">r"\\"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\x"</span>), + Vec::unescape_bytes(<span class="string">r"\x"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\xA"</span>), + Vec::unescape_bytes(<span class="string">r"\xA"</span>), +); +<span class="comment">// And now some that kind of look like escape +// sequences, but aren't. +</span><span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\xZ"</span>), + Vec::unescape_bytes(<span class="string">r"\xZ"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\xZZ"</span>), + Vec::unescape_bytes(<span class="string">r"\xZZ"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\i"</span>), + Vec::unescape_bytes(<span class="string">r"\i"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\u"</span>), + Vec::unescape_bytes(<span class="string">r"\u"</span>), +); +<span class="macro">assert_eq!</span>( + BString::from(<span class="string">br"\u{2603}"</span>), + Vec::unescape_bytes(<span class="string">r"\u{2603}"</span>), +); +</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.push_byte" class="method"><h4 class="code-header">fn <a href="#method.push_byte" class="fn">push_byte</a>(&mut self, byte: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>)</h4></section></summary><div class="docblock"><p>Appends the given byte to the end of this byte string.</p> +<p>Note that this is equivalent to the generic <code>Vec::push</code> method. This +method is provided to permit callers to explicitly differentiate +between pushing bytes, codepoints and strings.</p> +<h5 id="examples-6"><a class="doc-anchor" href="#examples-6">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"abc"</span>); +s.push_byte(<span class="string">b'\xE2'</span>); +s.push_byte(<span class="string">b'\x98'</span>); +s.push_byte(<span class="string">b'\x83'</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"abc☃"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.push_char" class="method"><h4 class="code-header">fn <a href="#method.push_char" class="fn">push_char</a>(&mut self, ch: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>)</h4></section></summary><div class="docblock"><p>Appends the given <code>char</code> to the end of this byte string.</p> +<h5 id="examples-7"><a class="doc-anchor" href="#examples-7">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"abc"</span>); +s.push_char(<span class="string">'1'</span>); +s.push_char(<span class="string">'2'</span>); +s.push_char(<span class="string">'3'</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"abc123"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.push_str" class="method"><h4 class="code-header">fn <a href="#method.push_str" class="fn">push_str</a><B>(&mut self, bytes: B)<div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Appends the given slice to the end of this byte string. This accepts +any type that be converted to a <code>&[u8]</code>. This includes, but is not +limited to, <code>&str</code>, <code>&BStr</code>, and of course, <code>&[u8]</code> itself.</p> +<h5 id="examples-8"><a class="doc-anchor" href="#examples-8">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = <Vec<u8>>::from(<span class="string">"abc"</span>); +s.push_str(<span class="string">b"123"</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"abc123"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.into_string" class="method"><h4 class="code-header">fn <a href="#method.into_string" class="fn">into_string</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, FromUtf8Error><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Converts a <code>Vec<u8></code> into a <code>String</code> if and only if this byte string is +valid UTF-8.</p> +<p>If it is not valid UTF-8, then a +<a href="struct.FromUtf8Error.html"><code>FromUtf8Error</code></a> +is returned. (This error can be used to examine why UTF-8 validation +failed, or to regain the original byte string.)</p> +<h5 id="examples-9"><a class="doc-anchor" href="#examples-9">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span>bytes = Vec::from(<span class="string">"hello"</span>); +<span class="kw">let </span>string = bytes.into_string().unwrap(); + +<span class="macro">assert_eq!</span>(<span class="string">"hello"</span>, string);</code></pre></div> +<p>If this byte string is not valid UTF-8, then an error will be returned. +That error can then be used to inspect the location at which invalid +UTF-8 was found, or to regain the original byte string:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::{B, ByteVec}; + +<span class="kw">let </span>bytes = Vec::from_slice(<span class="string">b"foo\xFFbar"</span>); +<span class="kw">let </span>err = bytes.into_string().unwrap_err(); + +<span class="macro">assert_eq!</span>(err.utf8_error().valid_up_to(), <span class="number">3</span>); +<span class="macro">assert_eq!</span>(err.utf8_error().error_len(), <span class="prelude-val">Some</span>(<span class="number">1</span>)); + +<span class="comment">// At no point in this example is an allocation performed. +</span><span class="kw">let </span>bytes = Vec::from(err.into_vec()); +<span class="macro">assert_eq!</span>(bytes, B(<span class="string">b"foo\xFFbar"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.into_string_lossy" class="method"><h4 class="code-header">fn <a href="#method.into_string_lossy" class="fn">into_string_lossy</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Lossily converts a <code>Vec<u8></code> into a <code>String</code>. If this byte string +contains invalid UTF-8, then the invalid bytes are replaced with the +Unicode replacement codepoint.</p> +<h5 id="examples-10"><a class="doc-anchor" href="#examples-10">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span>bytes = Vec::from_slice(<span class="string">b"foo\xFFbar"</span>); +<span class="kw">let </span>string = bytes.into_string_lossy(); +<span class="macro">assert_eq!</span>(string, <span class="string">"foo\u{FFFD}bar"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.into_string_unchecked" class="method"><h4 class="code-header">unsafe fn <a href="#method.into_string_unchecked" class="fn">into_string_unchecked</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Unsafely convert this byte string into a <code>String</code>, without checking for +valid UTF-8.</p> +<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5> +<p>Callers <em>must</em> ensure that this byte string is valid UTF-8 before +calling this method. Converting a byte string into a <code>String</code> that is +not valid UTF-8 is considered undefined behavior.</p> +<p>This routine is useful in performance sensitive contexts where the +UTF-8 validity of the byte string is already known and it is +undesirable to pay the cost of an additional UTF-8 validation check +that <a href="#method.into_string"><code>into_string</code></a> performs.</p> +<h5 id="examples-11"><a class="doc-anchor" href="#examples-11">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="comment">// SAFETY: This is safe because string literals are guaranteed to be +// valid UTF-8 by the Rust compiler. +</span><span class="kw">let </span>s = <span class="kw">unsafe </span>{ Vec::from(<span class="string">"☃βツ"</span>).into_string_unchecked() }; +<span class="macro">assert_eq!</span>(<span class="string">"☃βツ"</span>, s);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.into_os_string" class="method"><h4 class="code-header">fn <a href="#method.into_os_string" class="fn">into_os_string</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a>, FromUtf8Error><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Converts this byte string into an OS string, in place.</p> +<p>When OS strings can be constructed from arbitrary byte sequences, this +always succeeds and is zero cost. Otherwise, if this byte string is not +valid UTF-8, then an error (with the original byte string) is returned.</p> +<h5 id="examples-12"><a class="doc-anchor" href="#examples-12">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::ffi::OsStr; + +<span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span>bs = Vec::from(<span class="string">"foo"</span>); +<span class="kw">let </span>os_str = bs.into_os_string().expect(<span class="string">"should be valid UTF-8"</span>); +<span class="macro">assert_eq!</span>(os_str, OsStr::new(<span class="string">"foo"</span>));</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.into_os_string_lossy" class="method"><h4 class="code-header">fn <a href="#method.into_os_string_lossy" class="fn">into_os_string_lossy</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/ffi/os_str/struct.OsString.html" title="struct std::ffi::os_str::OsString">OsString</a><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Lossily converts this byte string into an OS string, in place.</p> +<p>When OS strings can be constructed from arbitrary byte sequences, this +is zero cost and always returns a slice. Otherwise, this will perform a +UTF-8 check and lossily convert this byte string into valid UTF-8 using +the Unicode replacement codepoint.</p> +<p>Note that this can prevent the correct roundtripping of file paths when +the representation of <code>OsString</code> is opaque.</p> +<h5 id="examples-13"><a class="doc-anchor" href="#examples-13">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span>bs = Vec::from_slice(<span class="string">b"foo\xFFbar"</span>); +<span class="kw">let </span>os_str = bs.into_os_string_lossy(); +<span class="macro">assert_eq!</span>(os_str.to_string_lossy(), <span class="string">"foo\u{FFFD}bar"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.into_path_buf" class="method"><h4 class="code-header">fn <a href="#method.into_path_buf" class="fn">into_path_buf</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a>, FromUtf8Error><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Converts this byte string into an owned file path, in place.</p> +<p>When paths can be constructed from arbitrary byte sequences, this +always succeeds and is zero cost. Otherwise, if this byte string is not +valid UTF-8, then an error (with the original byte string) is returned.</p> +<h5 id="examples-14"><a class="doc-anchor" href="#examples-14">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span>bs = Vec::from(<span class="string">"foo"</span>); +<span class="kw">let </span>path = bs.into_path_buf().expect(<span class="string">"should be valid UTF-8"</span>); +<span class="macro">assert_eq!</span>(path.as_os_str(), <span class="string">"foo"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.into_path_buf_lossy" class="method"><h4 class="code-header">fn <a href="#method.into_path_buf_lossy" class="fn">into_path_buf_lossy</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.PathBuf.html" title="struct std::path::PathBuf">PathBuf</a><div class="where">where + Self: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Lossily converts this byte string into an owned file path, in place.</p> +<p>When paths can be constructed from arbitrary byte sequences, this is +zero cost and always returns a slice. Otherwise, this will perform a +UTF-8 check and lossily convert this byte string into valid UTF-8 using +the Unicode replacement codepoint.</p> +<p>Note that this can prevent the correct roundtripping of file paths when +the representation of <code>PathBuf</code> is opaque.</p> +<h5 id="examples-15"><a class="doc-anchor" href="#examples-15">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span>bs = Vec::from_slice(<span class="string">b"foo\xFFbar"</span>); +<span class="kw">let </span>path = bs.into_path_buf_lossy(); +<span class="macro">assert_eq!</span>(path.to_string_lossy(), <span class="string">"foo\u{FFFD}bar"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.pop_byte" class="method"><h4 class="code-header">fn <a href="#method.pop_byte" class="fn">pop_byte</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h4></section></summary><div class="docblock"><p>Removes the last byte from this <code>Vec<u8></code> and returns it.</p> +<p>If this byte string is empty, then <code>None</code> is returned.</p> +<p>If the last codepoint in this byte string is not ASCII, then removing +the last byte could make this byte string contain invalid UTF-8.</p> +<p>Note that this is equivalent to the generic <code>Vec::pop</code> method. This +method is provided to permit callers to explicitly differentiate +between popping bytes and codepoints.</p> +<h5 id="examples-16"><a class="doc-anchor" href="#examples-16">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from(<span class="string">"foo"</span>); +<span class="macro">assert_eq!</span>(s.pop_byte(), <span class="prelude-val">Some</span>(<span class="string">b'o'</span>)); +<span class="macro">assert_eq!</span>(s.pop_byte(), <span class="prelude-val">Some</span>(<span class="string">b'o'</span>)); +<span class="macro">assert_eq!</span>(s.pop_byte(), <span class="prelude-val">Some</span>(<span class="string">b'f'</span>)); +<span class="macro">assert_eq!</span>(s.pop_byte(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.pop_char" class="method"><h4 class="code-header">fn <a href="#method.pop_char" class="fn">pop_char</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>></h4></section></summary><div class="docblock"><p>Removes the last codepoint from this <code>Vec<u8></code> and returns it.</p> +<p>If this byte string is empty, then <code>None</code> is returned. If the last +bytes of this byte string do not correspond to a valid UTF-8 code unit +sequence, then the Unicode replacement codepoint is yielded instead in +accordance with the +<a href="index.html#handling-of-invalid-utf8-8">replacement codepoint substitution policy</a>.</p> +<h5 id="examples-17"><a class="doc-anchor" href="#examples-17">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from(<span class="string">"foo"</span>); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'o'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'o'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'f'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">None</span>);</code></pre></div> +<p>This shows the replacement codepoint substitution policy. Note that +the first pop yields a replacement codepoint but actually removes two +bytes. This is in contrast with subsequent pops when encountering +<code>\xFF</code> since <code>\xFF</code> is never a valid prefix for any valid UTF-8 +code unit sequence.</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from_slice(<span class="string">b"f\xFF\xFF\xFFoo\xE2\x98"</span>); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'\u{FFFD}'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'o'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'o'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'\u{FFFD}'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'\u{FFFD}'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'\u{FFFD}'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">Some</span>(<span class="string">'f'</span>)); +<span class="macro">assert_eq!</span>(s.pop_char(), <span class="prelude-val">None</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.remove_char" class="method"><h4 class="code-header">fn <a href="#method.remove_char" class="fn">remove_char</a>(&mut self, at: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a></h4></section></summary><div class="docblock"><p>Removes a <code>char</code> from this <code>Vec<u8></code> at the given byte position and +returns it.</p> +<p>If the bytes at the given position do not lead to a valid UTF-8 code +unit sequence, then a +<a href="index.html#handling-of-invalid-utf8-8">replacement codepoint is returned instead</a>.</p> +<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5> +<p>Panics if <code>at</code> is larger than or equal to this byte string’s length.</p> +<h5 id="examples-18"><a class="doc-anchor" href="#examples-18">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from(<span class="string">"foo☃bar"</span>); +<span class="macro">assert_eq!</span>(s.remove_char(<span class="number">3</span>), <span class="string">'☃'</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">b"foobar"</span>);</code></pre></div> +<p>This example shows how the Unicode replacement codepoint policy is +used:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from_slice(<span class="string">b"foo\xFFbar"</span>); +<span class="macro">assert_eq!</span>(s.remove_char(<span class="number">3</span>), <span class="string">'\u{FFFD}'</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">b"foobar"</span>);</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.insert_char" class="method"><h4 class="code-header">fn <a href="#method.insert_char" class="fn">insert_char</a>(&mut self, at: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, ch: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.char.html">char</a>)</h4></section></summary><div class="docblock"><p>Inserts the given codepoint into this <code>Vec<u8></code> at a particular byte +position.</p> +<p>This is an <code>O(n)</code> operation as it may copy a number of elements in this +byte string proportional to its length.</p> +<h5 id="panics-1"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5> +<p>Panics if <code>at</code> is larger than the byte string’s length.</p> +<h5 id="examples-19"><a class="doc-anchor" href="#examples-19">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from(<span class="string">"foobar"</span>); +s.insert_char(<span class="number">3</span>, <span class="string">'☃'</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"foo☃bar"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.insert_str" class="method"><h4 class="code-header">fn <a href="#method.insert_str" class="fn">insert_str</a><B>(&mut self, at: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>, bytes: B)<div class="where">where + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Inserts the given byte string into this byte string at a particular +byte position.</p> +<p>This is an <code>O(n)</code> operation as it may copy a number of elements in this +byte string proportional to its length.</p> +<p>The given byte string may be any type that can be cheaply converted +into a <code>&[u8]</code>. This includes, but is not limited to, <code>&str</code> and +<code>&[u8]</code>.</p> +<h5 id="panics-2"><a class="doc-anchor" href="#panics-2">§</a>Panics</h5> +<p>Panics if <code>at</code> is larger than the byte string’s length.</p> +<h5 id="examples-20"><a class="doc-anchor" href="#examples-20">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from(<span class="string">"foobar"</span>); +s.insert_str(<span class="number">3</span>, <span class="string">"☃☃☃"</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"foo☃☃☃bar"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.replace_range" class="method"><h4 class="code-header">fn <a href="#method.replace_range" class="fn">replace_range</a><R, B>(&mut self, range: R, replace_with: B)<div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>, + B: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>,</div></h4></section></summary><div class="docblock"><p>Removes the specified range in this byte string and replaces it with +the given bytes. The given bytes do not need to have the same length +as the range provided.</p> +<h5 id="panics-3"><a class="doc-anchor" href="#panics-3">§</a>Panics</h5> +<p>Panics if the given range is invalid.</p> +<h5 id="examples-21"><a class="doc-anchor" href="#examples-21">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from(<span class="string">"foobar"</span>); +s.replace_range(<span class="number">2</span>..<span class="number">4</span>, <span class="string">"xxxxx"</span>); +<span class="macro">assert_eq!</span>(s, <span class="string">"foxxxxxar"</span>.as_bytes());</code></pre></div> +</div></details><details class="toggle method-toggle" open><summary><section id="method.drain_bytes" class="method"><h4 class="code-header">fn <a href="#method.drain_bytes" class="fn">drain_bytes</a><R>(&mut self, range: R) -> DrainBytes<'_><div class="where">where + R: <a class="trait" href="https://doc.rust-lang.org/1.77.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>>,</div></h4></section></summary><div class="docblock"><p>Creates a draining iterator that removes the specified range in this +<code>Vec<u8></code> and yields each of the removed bytes.</p> +<p>Note that the elements specified by the given range are removed +regardless of whether the returned iterator is fully exhausted.</p> +<p>Also note that is is unspecified how many bytes are removed from the +<code>Vec<u8></code> if the <code>DrainBytes</code> iterator is leaked.</p> +<h5 id="panics-4"><a class="doc-anchor" href="#panics-4">§</a>Panics</h5> +<p>Panics if the given range is not valid.</p> +<h5 id="examples-22"><a class="doc-anchor" href="#examples-22">§</a>Examples</h5> +<p>Basic usage:</p> + +<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>bstr::ByteVec; + +<span class="kw">let </span><span class="kw-2">mut </span>s = Vec::from(<span class="string">"foobar"</span>); +{ + <span class="kw">let </span><span class="kw-2">mut </span>drainer = s.drain_bytes(<span class="number">2</span>..<span class="number">4</span>); + <span class="macro">assert_eq!</span>(drainer.next(), <span class="prelude-val">Some</span>(<span class="string">b'o'</span>)); + <span class="macro">assert_eq!</span>(drainer.next(), <span class="prelude-val">Some</span>(<span class="string">b'b'</span>)); + <span class="macro">assert_eq!</span>(drainer.next(), <span class="prelude-val">None</span>); +} +<span class="macro">assert_eq!</span>(s, <span class="string">"foar"</span>.as_bytes());</code></pre></div> +</div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.77.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><section id="impl-ByteVec-for-Vec%3Cu8%3E" class="impl"><a href="#impl-ByteVec-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ByteVec.html" title="trait ba2::ByteVec">ByteVec</a> for <a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>></h3></section><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/bstr/ext_vec/trait.ByteVec.js" data-ignore-extern-crates="alloc" async></script><script type="text/json" id="notable-traits-data">{"Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A></code></h3><pre><code><div class=\"where\">impl<A> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>, A><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>"}</script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/trait.CompressableFrom.html b/ba2/trait.CompressableFrom.html new file mode 100644 index 0000000..aadea04 --- /dev/null +++ b/ba2/trait.CompressableFrom.html @@ -0,0 +1,9 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A trait that creates an optionally compressed container using the given value."><title>CompressableFrom in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">CompressableFrom</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_compressed">from_compressed</a></li><li><a href="#tymethod.from_decompressed">from_decompressed</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="index.html">ba2</a>::<wbr><a class="trait" href="#">CompressableFrom</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/lib.rs.html#59-67">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait CompressableFrom<T>: Sealed { + // Required methods + fn <a href="#tymethod.from_compressed" class="fn">from_compressed</a>(value: T, decompressed_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self; +<span class="item-spacer"></span> fn <a href="#tymethod.from_decompressed" class="fn">from_decompressed</a>(value: T) -> Self; +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait that creates an optionally compressed container using the given value.</p> +</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.from_compressed" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#62">source</a><h4 class="code-header">fn <a href="#tymethod.from_compressed" class="fn">from_compressed</a>(value: T, decompressed_len: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class="docblock"><p>Makes a compressed instance of <code>Self</code> using the given data.</p> +</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_decompressed" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#66">source</a><h4 class="code-header">fn <a href="#tymethod.from_decompressed" class="fn">from_decompressed</a>(value: T) -> Self</h4></section></summary><div class="docblock"><p>Makes a decompressed instance of <code>Self</code> using the given data.</p> +</div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.77.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-Chunk%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-Chunk%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>> for <a class="struct" href="fo4/struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'static></h3></section><section id="impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#237">source</a><a href="#impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><<a class="struct" href="https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><[<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]>> for <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section><section id="impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-Chunk%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="fo4/struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section><section id="impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#237">source</a><a href="#impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>]> for <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section><section id="impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-Chunk%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/chunk.rs.html#155">source</a><a href="#impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-Chunk%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]> for <a class="struct" href="fo4/struct.Chunk.html" title="struct ba2::fo4::Chunk">Chunk</a><'bytes></h3></section><section id="impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#237">source</a><a href="#impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes, const N: <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.usize.html">usize</a>> <a class="trait" href="trait.CompressableFrom.html" title="trait ba2::CompressableFrom">CompressableFrom</a><&'bytes [<a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.77.0/std/primitive.array.html">N</a>]> for <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></div><script src="../trait.impl/ba2/trait.CompressableFrom.js" async></script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/trait.Reader.html b/ba2/trait.Reader.html new file mode 100644 index 0000000..43d45e3 --- /dev/null +++ b/ba2/trait.Reader.html @@ -0,0 +1,10 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A trait that enables reading from various sources."><title>Reader in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">Reader</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Error">Error</a></li><li><a href="#associatedtype.Item">Item</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.read">read</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="index.html">ba2</a>::<wbr><a class="trait" href="#">Reader</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/lib.rs.html#50-56">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Reader<T>: Sealed { + type <a href="#associatedtype.Error" class="associatedtype">Error</a>; + type <a href="#associatedtype.Item" class="associatedtype">Item</a>; + + // Required method + fn <a href="#tymethod.read" class="fn">read</a>(source: T) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>, Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Error" title="type ba2::Reader::Error">Error</a>>; +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait that enables reading from various sources.</p> +</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.Error" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#51">source</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a></h4></section><section id="associatedtype.Item" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#52">source</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a></h4></section></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.read" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#55">source</a><h4 class="code-header">fn <a href="#tymethod.read" class="fn">read</a>(source: T) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Item" title="type ba2::Reader::Item">Item</a>, Self::<a class="associatedtype" href="trait.Reader.html#associatedtype.Error" title="type ba2::Reader::Error">Error</a>></h4></section></summary><div class="docblock"><p>Reads an instance of <code>Self::Item</code> from the given source.</p> +</div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.77.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3C%26File%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for ba2::fo4::<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static>, <a class="struct" href="fo4/struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3C%26File%3E-for-Archive%3C'static%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for ba2::tes3::<a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3C%26File%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3C%26File%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'static></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3C%26File%3E-for-Archive%3C'static%3E-2" class="impl"><a class="src rightside" href="../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3C%26File%3E-for-Archive%3C'static%3E-2" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for ba2::tes4::<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-4" class="associatedtype trait-impl"><a href="#associatedtype.Item-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static>, <a class="struct" href="tes4/struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for ba2::fo4::<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-5" class="associatedtype trait-impl"><a href="#associatedtype.Item-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static>, <a class="struct" href="fo4/struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for ba2::tes3::<a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-6" class="associatedtype trait-impl"><a href="#associatedtype.Item-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3C%26Path%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3C%26Path%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-7" class="associatedtype trait-impl"><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-7" class="associatedtype trait-impl"><a href="#associatedtype.Item-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'static></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E-2" class="impl"><a class="src rightside" href="../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3C%26Path%3E-for-Archive%3C'static%3E-2" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for ba2::tes4::<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-8" class="associatedtype trait-impl"><a href="#associatedtype.Error-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-8" class="associatedtype trait-impl"><a href="#associatedtype.Item-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static>, <a class="struct" href="tes4/struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for ba2::fo4::<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-9" class="associatedtype trait-impl"><a href="#associatedtype.Error-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-9" class="associatedtype trait-impl"><a href="#associatedtype.Item-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'bytes>, <a class="struct" href="fo4/struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for ba2::tes3::<a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-10" class="associatedtype trait-impl"><a href="#associatedtype.Error-10" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-10" class="associatedtype trait-impl"><a href="#associatedtype.Item-10" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'bytes></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-11" class="associatedtype trait-impl"><a href="#associatedtype.Error-11" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-11" class="associatedtype trait-impl"><a href="#associatedtype.Item-11" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'bytes></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-2" class="impl"><a class="src rightside" href="../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3CBorrowed%3C'bytes%3E%3E-for-Archive%3C'bytes%3E-2" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for ba2::tes4::<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-12" class="associatedtype trait-impl"><a href="#associatedtype.Error-12" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-12" class="associatedtype trait-impl"><a href="#associatedtype.Item-12" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'bytes>, <a class="struct" href="tes4/struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/archive.rs.html#203-207">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for ba2::fo4::<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-13" class="associatedtype trait-impl"><a href="#associatedtype.Error-13" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-13" class="associatedtype trait-impl"><a href="#associatedtype.Item-13" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="fo4/struct.Archive.html" title="struct ba2::fo4::Archive">Archive</a><'static>, <a class="struct" href="fo4/struct.ArchiveOptions.html" title="struct ba2::fo4::ArchiveOptions">Options</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes3/archive.rs.html#57-61">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for ba2::tes3::<a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-14" class="associatedtype trait-impl"><a href="#associatedtype.Error-14" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-14" class="associatedtype trait-impl"><a href="#associatedtype.Item-14" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.Archive.html" title="struct ba2::tes3::Archive">Archive</a><'static></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/tes3/file.rs.html#17">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-15" class="associatedtype trait-impl"><a href="#associatedtype.Error-15" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes3/enum.Error.html" title="enum ba2::tes3::Error">Error</a></h4></section><section id="associatedtype.Item-15" class="associatedtype trait-impl"><a href="#associatedtype.Item-15" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes3/struct.File.html" title="struct ba2::tes3::File">File</a><'static></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-2" class="impl"><a class="src rightside" href="../src/ba2/tes4/archive.rs.html#366-370">source</a><a href="#impl-Reader%3CCopied%3C'bytes%3E%3E-for-Archive%3C'static%3E-2" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.Reader.html" title="trait ba2::Reader">Reader</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for ba2::tes4::<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-16" class="associatedtype trait-impl"><a href="#associatedtype.Error-16" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-16" class="associatedtype trait-impl"><a href="#associatedtype.Item-16" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = (<a class="struct" href="tes4/struct.Archive.html" title="struct ba2::tes4::Archive">Archive</a><'static>, <a class="struct" href="tes4/struct.ArchiveOptions.html" title="struct ba2::tes4::ArchiveOptions">Options</a>)</h4></section></div></details></div><script src="../trait.impl/ba2/trait.Reader.js" async></script></section></div></main></body></html> \ No newline at end of file diff --git a/ba2/trait.ReaderWithOptions.html b/ba2/trait.ReaderWithOptions.html new file mode 100644 index 0000000..3e456b3 --- /dev/null +++ b/ba2/trait.ReaderWithOptions.html @@ -0,0 +1,14 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A trait that enables reading from various sources, with configuration options."><title>ReaderWithOptions in ba2 - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-4c98445ec4002617.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ba2/index.html">ba2</a><span class="version">2.0.0</span></h2></div><h2 class="location"><a href="#">ReaderWithOptions</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Error">Error</a></li><li><a href="#associatedtype.Item">Item</a></li><li><a href="#associatedtype.Options">Options</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.read">read</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In crate ba2</a></h2></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="index.html">ba2</a>::<wbr><a class="trait" href="#">ReaderWithOptions</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/ba2/lib.rs.html#80-87">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait ReaderWithOptions<T>: Sealed { + type <a href="#associatedtype.Error" class="associatedtype">Error</a>; + type <a href="#associatedtype.Item" class="associatedtype">Item</a>; + type <a href="#associatedtype.Options" class="associatedtype">Options</a>; + + // Required method + fn <a href="#tymethod.read" class="fn">read</a>( + source: T, + options: &Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a> + ) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>, Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Error" title="type ba2::ReaderWithOptions::Error">Error</a>>; +}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait that enables reading from various sources, with configuration options.</p> +</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.Error" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#81">source</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a></h4></section><section id="associatedtype.Item" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#82">source</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a></h4></section><section id="associatedtype.Options" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#83">source</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a></h4></section></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.read" class="method"><a class="src rightside" href="../src/ba2/lib.rs.html#86">source</a><h4 class="code-header">fn <a href="#tymethod.read" class="fn">read</a>(source: T, options: &Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Options" title="type ba2::ReaderWithOptions::Options">Options</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Item" title="type ba2::ReaderWithOptions::Item">Item</a>, Self::<a class="associatedtype" href="trait.ReaderWithOptions.html#associatedtype.Error" title="type ba2::ReaderWithOptions::Error">Error</a>></h4></section></summary><div class="docblock"><p>Reads an instance of <code>Self::Item</code> from the given source, using the given options.</p> +</div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.77.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for ba2::fo4::<a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-1" class="associatedtype trait-impl"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'static></h4></section><section id="associatedtype.Options-1" class="associatedtype trait-impl"><a href="#associatedtype.Options-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="fo4/struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3C%26File%3E-for-File%3C'static%3E-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>> for ba2::tes4::<a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-2" class="associatedtype trait-impl"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h4></section><section id="associatedtype.Options-2" class="associatedtype trait-impl"><a href="#associatedtype.Options-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="tes4/struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for ba2::fo4::<a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-3" class="associatedtype trait-impl"><a href="#associatedtype.Item-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'static></h4></section><section id="associatedtype.Options-3" class="associatedtype trait-impl"><a href="#associatedtype.Options-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="fo4/struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3C%26Path%3E-for-File%3C'static%3E-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><&<a class="struct" href="https://doc.rust-lang.org/1.77.0/std/path/struct.Path.html" title="struct std::path::Path">Path</a>> for ba2::tes4::<a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-4" class="associatedtype trait-impl"><a href="#associatedtype.Item-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h4></section><section id="associatedtype.Options-4" class="associatedtype trait-impl"><a href="#associatedtype.Options-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="tes4/struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for ba2::fo4::<a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-5" class="associatedtype trait-impl"><a href="#associatedtype.Item-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'bytes></h4></section><section id="associatedtype.Options-5" class="associatedtype trait-impl"><a href="#associatedtype.Options-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="fo4/struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3CBorrowed%3C'bytes%3E%3E-for-File%3C'bytes%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="struct.Borrowed.html" title="struct ba2::Borrowed">Borrowed</a><'bytes>> for ba2::tes4::<a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-6" class="associatedtype trait-impl"><a href="#associatedtype.Item-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'bytes></h4></section><section id="associatedtype.Options-6" class="associatedtype trait-impl"><a href="#associatedtype.Options-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="tes4/struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="impl"><a class="src rightside" href="../src/ba2/fo4/file.rs.html#1023">source</a><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for ba2::fo4::<a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-7" class="associatedtype trait-impl"><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="fo4/enum.Error.html" title="enum ba2::fo4::Error">Error</a></h4></section><section id="associatedtype.Item-7" class="associatedtype trait-impl"><a href="#associatedtype.Item-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="fo4/struct.File.html" title="struct ba2::fo4::File">File</a><'static></h4></section><section id="associatedtype.Options-7" class="associatedtype trait-impl"><a href="#associatedtype.Options-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="fo4/struct.FileReadOptions.html" title="struct ba2::fo4::FileReadOptions">ReadOptions</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E-1" class="impl"><a class="src rightside" href="../src/ba2/tes4/file.rs.html#238">source</a><a href="#impl-ReaderWithOptions%3CCopied%3C'bytes%3E%3E-for-File%3C'static%3E-1" class="anchor">§</a><h3 class="code-header">impl<'bytes> <a class="trait" href="trait.ReaderWithOptions.html" title="trait ba2::ReaderWithOptions">ReaderWithOptions</a><<a class="struct" href="struct.Copied.html" title="struct ba2::Copied">Copied</a><'bytes>> for ba2::tes4::<a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-8" class="associatedtype trait-impl"><a href="#associatedtype.Error-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="tes4/enum.Error.html" title="enum ba2::tes4::Error">Error</a></h4></section><section id="associatedtype.Item-8" class="associatedtype trait-impl"><a href="#associatedtype.Item-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Item" class="associatedtype">Item</a> = <a class="struct" href="tes4/struct.File.html" title="struct ba2::tes4::File">File</a><'static></h4></section><section id="associatedtype.Options-8" class="associatedtype trait-impl"><a href="#associatedtype.Options-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Options" class="associatedtype">Options</a> = <a class="struct" href="tes4/struct.FileReadOptions.html" title="struct ba2::tes4::FileReadOptions">ReadOptions</a></h4></section></div></details></div><script src="../trait.impl/ba2/trait.ReaderWithOptions.js" async></script></section></div></main></body></html> \ No newline at end of file diff --git a/crates.js b/crates.js new file mode 100644 index 0000000..054e0ea --- /dev/null +++ b/crates.js @@ -0,0 +1 @@ +window.ALL_CRATES = ["ba2"]; \ No newline at end of file diff --git a/help.html b/help.html new file mode 100644 index 0000000..505c3ea --- /dev/null +++ b/help.html @@ -0,0 +1,2 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="./static.files/storage-4c98445ec4002617.js"></script><script defer src="./static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.77.0</span></h2></div><div class="version">(aedd173a2 2024-03-17)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="./ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="./help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html> \ No newline at end of file diff --git a/search-index.js b/search-index.js new file mode 100644 index 0000000..ce52885 --- /dev/null +++ b/search-index.js @@ -0,0 +1,5 @@ +var searchIndex = new Map(JSON.parse('[\ +["ba2",{"doc":"Archives come in various flavors, and the specific variant …","t":"FFFKKKPGFPRRPGRRRKKPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNMMNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNMMNNNNNNNNNNNNNNNNNNNNNNNNNCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPFFFFFFFGGPPPFPPGPPTFFFGFFFFGPPPFPPFPPPPPPPPPPPPIPGPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPNNNNONNNOOEEEFFPGFFFPPPPINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHONNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPFFFFFFTGTPFFFTPGTTTTFFFFFFFPPPPPPPTTTPPTTTTITTTTTTTTGTTNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPNNNNNNNNNNNNNNNOO","n":["BStr","BString","Borrowed","ByteSlice","ByteVec","CompressableFrom","Compressed","CompressionResult","Copied","Decompressed","Error","Error","FO4","FileFormat","Item","Item","Options","Reader","ReaderWithOptions","TES3","TES4","as_bstr","as_bstr_mut","as_mut","as_mut","as_mut","as_ref","as_ref","as_ref","as_ref","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","bytes","char_indices","chars","clone","clone","clone","clone_into","clone_into","clone_into","cmp","cmp","contains_str","default","default","default","default","deref","deref","deref_mut","deref_mut","drain_bytes","ends_with_str","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","escape_bytes","fields","fields_with","find","find_byte","find_byteset","find_char","find_iter","find_non_ascii_byte","find_not_byteset","fmt","fmt","fmt","fmt","fmt","fmt","fo4","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_compressed","from_decompressed","from_iter","from_iter","from_iter","from_iter","from_iter","from_iter","from_os_str","from_os_str_lossy","from_os_string","from_path","from_path_buf","from_path_lossy","from_slice","grapheme_indices","graphemes","guess_format","hash","hash","index","index","index","index","index","index","index","index_mut","index_mut","index_mut","index_mut","index_mut","index_mut","index_mut","insert_char","insert_str","into","into","into","into","into","into_os_string","into_os_string_lossy","into_path_buf","into_path_buf_lossy","into_string","into_string_lossy","into_string_unchecked","is_ascii","is_utf8","last_byte","lines","lines_with_terminator","make_ascii_lowercase","make_ascii_uppercase","new","new","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","pop_byte","pop_char","prelude","push_byte","push_char","push_str","read","read","remove_char","repeatn","replace","replace_into","replace_range","replacen","replacen_into","reverse_bytes","reverse_chars","reverse_graphemes","rfind","rfind_byte","rfind_byteset","rfind_char","rfind_iter","rfind_not_byteset","rsplit_once_str","rsplit_str","rsplitn_str","sentence_indices","sentences","split_once_str","split_str","splitn_str","starts_with_str","tes3","tes4","to_ascii_lowercase","to_ascii_uppercase","to_lowercase","to_lowercase_into","to_os_str","to_os_str_lossy","to_owned","to_owned","to_owned","to_owned","to_path","to_path_lossy","to_str","to_str_lossy","to_str_lossy_into","to_str_unchecked","to_string","to_string","to_uppercase","to_uppercase_into","trim","trim_end","trim_end_with","trim_start","trim_start_with","trim_with","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","unescape_bytes","utf8_chunks","word_indices","words","words_with_break_indices","words_with_breaks","AlreadyCompressed","AlreadyDecompressed","Archive","ArchiveKey","ArchiveOptions","ArchiveOptionsBuilder","Chunk","ChunkCompressionOptions","ChunkCompressionOptionsBuilder","CompressionFormat","CompressionLevel","DX10","DX10","DX10","DX10Header","DecompressionSizeMismatch","Err","Error","FO4","FO4Xbox","FO76","File","FileCapacityError","FileHash","FileHeader","FileReadOptions","FileReadOptionsBuilder","FileWriteOptions","FileWriteOptionsBuilder","Format","FormatMismatch","GNMF","GNMF","GNMFHeader","GNRL","GNRL","Hash","IntegralOverflow","IntegralTruncation","InvalidChunkSentinel","InvalidChunkSize","InvalidFormat","InvalidMagic","InvalidVersion","Io","LZ4","LZ4","NotImplemented","Ok","Result","SF","Version","Zip","as_bytes","as_mut","as_mut_ptr","as_mut_slice","as_ptr","as_ptr","as_ref","as_slice","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","build","build","build","builder","builder","builder","builder","clear","clear","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","compress","compress_into","compression_format","compression_format","compression_format","compression_format","compression_format","compression_format","compression_format","compression_format","compression_level","compression_level","compression_level","compression_level","compression_result","compression_result","decompress","decompress_into","decompressed_len","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","deref","deref_mut","directory","drain","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","extension","file","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","format","format","format","format","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_compressed","from_compressed","from_compressed","from_decompressed","from_decompressed","from_decompressed","from_iter","from_iter","get","get_key_value","get_mut","hash","hash_file","hash_file_in_place","header","height","index","index_mut","insert","insert","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_element","into_iter","into_iter","into_iter","into_iter","into_iter","into_iter","into_owned","is_compressed","is_decompressed","is_empty","is_empty","is_empty","is_full","iter","iter","iter_mut","iter_mut","keys","len","len","len","metadata","mip_chunk_height","mip_chunk_height","mip_chunk_width","mip_chunk_width","mip_count","mips","name","new","new","new","new","new","new","new","new","new","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","pop","push","read","read","read","read","read","read","read","read","remaining_capacity","remove","remove","remove_entry","retain_mut","source","strings","strings","swap_remove","tile_mode","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","truncate","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_insert","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_push","try_swap_remove","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","v1","v2","v3","values","values_mut","version","version","width","write","write","write","actual","expected","_","_","_","Archive","ArchiveKey","Err","Error","File","FileHash","Hash","IntegralTruncation","InvalidMagic","Io","Ok","Result","as_bytes","as_mut","as_ptr","as_ref","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clear","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","default","default","default","default","default","deref","deref_mut","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_iter","get","get_key_value","get_mut","hash","hash_file","hash_file_in_place","hi","insert","into","into","into","into","into","into","into_iter","into_iter","into_iter","into_owned","is_empty","is_empty","iter","iter_mut","keys","len","len","lo","name","new","new","new","new","numeric","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","read","read","read","read","read","read","read","read","remove","remove_entry","source","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","values","values_mut","write","write","AlreadyCompressed","AlreadyDecompressed","Archive","ArchiveFlags","ArchiveKey","ArchiveOptions","ArchiveOptionsBuilder","ArchiveTypes","COMPRESSED","CompressionCodec","DIRECTORY_STRINGS","DecompressionSizeMismatch","Directory","DirectoryHash","DirectoryKey","EMBEDDED_FILE_NAMES","Err","Error","FILE_STRINGS","FNV","FO3","FONTS","File","FileCompressionOptions","FileCompressionOptionsBuilder","FileHash","FileReadOptions","FileReadOptionsBuilder","Hash","IntegralOverflow","IntegralTruncation","InvalidHeaderSize","InvalidMagic","InvalidVersion","Io","LZ4","MENUS","MESHES","MISC","Normal","Ok","RETAIN_DIRECTORY_NAMES","RETAIN_FILE_NAMES","RETAIN_FILE_NAME_OFFSETS","RETAIN_STRINGS_DURING_STARTUP","Result","SHADERS","SOUNDS","SSE","TES4","TES5","TEXTURES","TREES","VOICES","Version","XBOX_ARCHIVE","XBOX_COMPRESSED","all","all","as_bytes","as_mut","as_mut","as_ptr","as_ref","as_ref","bitand","bitand","bitand_assign","bitand_assign","bitor","bitor","bitor_assign","bitor_assign","bits","bits","bits","bits","bitxor","bitxor","bitxor_assign","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","build","build","builder","builder","builder","clear","clear","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","cmp","complement","complement","compress","compress_into","compressed","compression_codec","compression_codec","compression_codec","compression_codec","compression_result","compression_result","contains","contains","crc","decompress","decompress_into","decompressed_len","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","deref","deref","deref_mut","deref_mut","difference","difference","directory_strings","embedded_file_names","empty","empty","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","extend","extend","file_strings","first","flags","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fonts","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_bits","from_bits","from_bits_retain","from_bits_retain","from_bits_retain","from_bits_retain","from_bits_truncate","from_bits_truncate","from_compressed","from_compressed","from_compressed","from_decompressed","from_decompressed","from_decompressed","from_iter","from_iter","from_iter","from_iter","from_name","from_name","get","get","get_key_value","get_key_value","get_mut","get_mut","hash","hash","hash_directory","hash_directory_in_place","hash_file","hash_file_in_place","insert","insert","insert","insert","intersection","intersection","intersects","intersects","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_iter","into_iter","into_iter","into_iter","into_iter","into_iter","into_iter","into_iter","into_owned","is_all","is_all","is_compressed","is_decompressed","is_empty","is_empty","is_empty","is_empty","is_empty","iter","iter","iter","iter","iter_mut","iter_mut","iter_names","iter_names","keys","keys","last","last2","len","len","len","length","menus","meshes","misc","name","name","new","new","new","new","new","new","new","new","new","not","not","numeric","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","read","read","read","read","read","read","read","read","remove","remove","remove","remove","remove_entry","remove_entry","retain_directory_names","retain_file_name_offsets","retain_file_names","retain_strings_during_startup","set","set","shaders","sounds","source","sub","sub","sub_assign","sub_assign","symmetric_difference","symmetric_difference","textures","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","toggle","toggle","trees","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","types","types","union","union","v103","v104","v105","values","values","values_mut","values_mut","version","version","version","version","version","version","voices","write","write","xbox_archive","xbox_compressed","actual","expected"],"q":[[0,"ba2"],[287,"ba2::fo4"],[798,"ba2::fo4::Error"],[800,"ba2::prelude"],[803,"ba2::tes3"],[959,"ba2::tes4"],[1507,"ba2::tes4::Error"],[1509,"bstr::ext_slice"],[1510,"bstr::utf8"],[1511,"bstr::utf8"],[1512,"core::convert"],[1513,"alloc::vec"],[1514,"bstr::ext_vec"],[1515,"core::ops::range"],[1516,"alloc::borrow"],[1517,"alloc::string"],[1518,"bstr::escape_bytes"],[1519,"bstr::ext_slice"],[1520,"core::option"],[1521,"bstr::ext_slice"],[1522,"core::fmt"],[1523,"core::fmt"],[1524,"core::fmt"],[1525,"std::ffi::os_str"],[1526,"std::ffi::os_str"],[1527,"std::path"],[1528,"bstr::unicode::grapheme"],[1529,"core::hash"],[1530,"core::ops::range"],[1531,"bstr::unicode::sentence"],[1532,"bstr::utf8"],[1533,"bstr::unicode::word"],[1534,"core::num::error"],[1535,"std::io::error"],[1536,"lzzzz::common::error"],[1537,"directxtex::hresult"],[1538,"core::convert"],[1539,"core::borrow"],[1540,"std::fs"],[1541,"core::error"],[1542,"directxtex::texture_metadata"],[1543,"std::io"],[1544,"bitflags::iter"],[1545,"bitflags::iter"]],"d":["A wrapper for <code>&[u8]</code> that provides convenient string …","A wrapper for <code>Vec<u8></code> that provides convenient string …","Makes a shallow copy of the input.","A trait that extends <code>&[u8]</code> with string oriented methods.","A trait that extends <code>Vec<u8></code> with string oriented methods.","A trait that creates an optionally compressed container …","The data will finish in a compressed state.","Indicates whether the operation should finish by …","Makes a deep copy of the input.","The data will finish in a decompressed state.","","","","The file format for a given archive.","","","","A trait that enables reading from various sources.","A trait that enables reading from various sources, with …","","","Return this byte slice as a <code>&BStr</code>.","Return this byte slice as a <code>&mut BStr</code>.","","","","","","","","","","","","","","","","","","","","","","","","","","Returns an iterator over the bytes in this byte string.","Returns an iterator over the Unicode scalar values in this …","Returns an iterator over the Unicode scalar values in this …","","","","","","","","","Returns true if and only if this byte string contains the …","","","","","","","","","Creates a draining iterator that removes the specified …","Returns true if and only if this byte string has the given …","","","","","","","","","","","","","","","","","","","","","","","","","","Escapes this byte string into a sequence of <code>char</code> values.","Returns an iterator over the fields in a byte string, …","Returns an iterator over the fields in a byte string, …","Returns the index of the first occurrence of the given …","Returns the index of the first occurrence of the given …","Returns the index of the first occurrence of any of the …","Returns the index of the first occurrence of the given …","Returns an iterator of the non-overlapping occurrences of …","Returns the index of the first non-ASCII byte in this byte …","Returns the index of the first occurrence of a byte that …","","","","","","","Fallout 4","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Makes a compressed instance of <code>Self</code> using the given data.","Makes a decompressed instance of <code>Self</code> using the given data.","","","","","","","Create an immutable byte string from an OS string slice.","Lossily create a new byte string from an OS string slice.","Create a new byte string from an owned OS string.","Create an immutable byte string from a file path.","Create a new byte string from an owned file path.","Lossily create a new byte string from a file path.","Create a new owned byte string from the given byte slice.","Returns an iterator over the grapheme clusters in this …","Returns an iterator over the grapheme clusters in this …","Guesses the archive format for a given source.","","","","","","","","","","","","","","","","","Inserts the given codepoint into this <code>Vec<u8></code> at a …","Inserts the given byte string into this byte string at a …","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Converts this byte string into an OS string, in place.","Lossily converts this byte string into an OS string, in …","Converts this byte string into an owned file path, in …","Lossily converts this byte string into an owned file path, …","Converts a <code>Vec<u8></code> into a <code>String</code> if and only if this byte …","Lossily converts a <code>Vec<u8></code> into a <code>String</code>. If this byte …","Unsafely convert this byte string into a <code>String</code>, without …","Returns true if and only if every byte in this byte string …","Returns true if and only if the entire byte string is …","Returns the last byte in this byte string, if it’s …","An iterator over all lines in a byte string, without their …","An iterator over all lines in a byte string, including …","Convert this byte string to its lowercase ASCII equivalent …","Convert this byte string to its uppercase ASCII equivalent …","Directly creates a <code>BStr</code> slice from anything that can be …","Constructs a new <code>BString</code> from the given <code>Vec</code>.","","","","","","","","","","","","","","","","","","","","","Removes the last byte from this <code>Vec<u8></code> and returns it.","Removes the last codepoint from this <code>Vec<u8></code> and returns …","Convenience using statements for traits that are needed to …","Appends the given byte to the end of this byte string.","Appends the given <code>char</code> to the end of this byte string.","Appends the given slice to the end of this byte string. …","Reads an instance of <code>Self::Item</code> from the given source.","Reads an instance of <code>Self::Item</code> from the given source, …","Removes a <code>char</code> from this <code>Vec<u8></code> at the given byte …","Create a new byte string by repeating this byte string <code>n</code> …","Replace all matches of the given needle with the given …","Replace all matches of the given needle with the given …","Removes the specified range in this byte string and …","Replace up to <code>limit</code> matches of the given needle with the …","Replace up to <code>limit</code> matches of the given needle with the …","Reverse the bytes in this string, in place.","Reverse the codepoints in this string, in place.","Reverse the graphemes in this string, in place.","Returns the index of the last occurrence of the given …","Returns the index of the last occurrence of the given …","Returns the index of the last occurrence of any of the …","Returns the index of the last occurrence of the given …","Returns an iterator of the non-overlapping occurrences of …","Returns the index of the last occurrence of a byte that is …","Split this byte string at the last occurrence of <code>splitter</code>.","Returns an iterator over substrings of this byte string, …","Returns an iterator of at most <code>limit</code> substrings of this …","Returns an iterator over the sentences in this byte string …","Returns an iterator over the sentences in this byte string.","Split this byte string at the first occurrence of <code>splitter</code>.","Returns an iterator over substrings of this byte string, …","Returns an iterator of at most <code>limit</code> substrings of this …","Returns true if and only if this byte string has the given …","TES III: Morrowind","TES IV: Oblivion","Returns a new <code>Vec<u8></code> containing the ASCII lowercase …","Returns a new <code>Vec<u8></code> containing the ASCII uppercase …","Returns a new <code>Vec<u8></code> containing the lowercase equivalent …","Writes the lowercase equivalent of this byte string into …","Create an OS string slice from this byte string.","Lossily create an OS string slice from this byte string.","","","","","Create a path slice from this byte string.","Lossily create a path slice from this byte string.","Safely convert this byte string into a <code>&str</code> if it’s …","Convert this byte string to a valid UTF-8 string by …","Copy the contents of this byte string into the given owned …","Unsafely convert this byte string into a <code>&str</code>, without …","","","Returns a new <code>Vec<u8></code> containing the uppercase equivalent …","Writes the uppercase equivalent of this byte string into …","Return a byte string slice with leading and trailing …","Return a byte string slice with trailing whitespace …","Return a byte string slice with trailing characters …","Return a byte string slice with leading whitespace removed.","Return a byte string slice with leading characters …","Return a byte string slice with leading and trailing …","","","","","","","","","","","","","","","","","Unescapes the given string into its raw bytes.","Iterate over chunks of valid UTF-8.","Returns an iterator over the words in this byte string …","Returns an iterator over the words in this byte string. If …","Returns an iterator over the words and their byte offsets …","Returns an iterator over the words in this byte string, …","","","Represents the FO4 revision of the ba2 format.","A key for indexing into the relevant mapping.","Info about the contents of the given archive.","See also <code>ArchiveOptions</code>.","Represents a chunk of a file within the FO4 virtual …","Common parameters to configure how chunks are compressed.","See also <code>ChunkCompressionOptions</code>.","A list of all compression methods supported by the ba2 …","Specifies the compression level to use when compressing …","","A DX10 archive can only contain .dds files (Microsoft …","","File header for DX10 archives.","","Contains the error value","","Fallout 4.","Fallout 4 on the xbox.","Fallout 76.","Represents a file within the FO4 virtual filesystem.","File is at chunk capacity.","See also <code>Hash</code>.","Optionally present file header.","Common parameters to configure how files are read.","See also <code>FileReadOptions</code>.","Common parameters to configure how files are written.","See also <code>FileWriteOptions</code>.","Represents the file format for an archive.","","A GNMF archive can only contain .gnf files (Sony GNM).","","File header for GNMF archives.","A GNRL archive can contain any kind of file.","","The underlying hash object used to uniquely identify …","","","","","","","","","","A more specialized format leveraging lz4’s fast …","","Contains the success value","","Starfield.","Indicates the version of an archive.","The default compression format, compatible with all games …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The file’s parent path crc.","Panics","","","","","","","","","","","","","The first 4 bytes of the file’s extension.","The file’s stem crc.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","","","Produces a hash using the given path.","Produces a hash using the given path.","","","","","Panics","","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","","","","","","","","","","","","","","","","","","","","","","","See here for more info.","","","","","","","","","","","","","","","","","","","","","","","","Panics","","","","","","","","","","Panics","","","","","","","Panics","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Panics","","","","","","","","","","","","","","","","","","","","","","","","","Panics","","","","","","","","","","","","","","","","","","","","","","","","Initial format introduced in Fallout 4.","Intoduced in Starfield.","Intoduced in Starfield.","","","","","","","","","","","","","","Represents the TES3 revision of the bsa format.","A key for indexing into the relevant mapping.","Contains the error value","","Represents a file within the TES3 virtual filesystem.","See also <code>Hash</code>.","The underlying hash object used to uniquely identify …","","","","Contains the success value","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","Produces a hash using the given path.","Produces a hash using the given path.","","","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Represents the TES4 revision of the bsa format.","Archive flags can impact the layout of an archive, or how …","A key for indexing into the relevant mapping.","","See also <code>ArchiveOptions</code>.","Specifies file types contained within an archive.","Compresses the data within the archive.","Specifies the codec to use when performing …","Includes directory paths within the archive.","","Represents a directory within the TES4 virtual filesystem.","See also <code>Hash</code>.","A key for indexing into the relevant mapping.","Writes the full (virtual) path of a file next to the data …","Contains the error value","","Includes filenames within the archive.","Fallout: New Vegas.","Fallout 3.","","Represents a file within the TES4 virtual filesystem.","Common parameters to configure how files are …","See also <code>FileCompressionOptions</code>.","See also <code>Hash</code>.","Common parameters to configure how files are read.","See also <code>FileReadOptions</code>.","The underlying hash object used to uniquely identify …","","","","","","","","","","","The default compression codec.","Contains the success value","Impacts runtime parsing.","Impacts runtime parsing.","Impacts runtime parsing.","Impacts runtime parsing.","","","","The Elder Scrolls V: Skyrim - Special Edition.","The Elder Scrolls IV: Oblivion.","The Elder Scrolls V: Skyrim.","","","","The archive version.","Writes the archive in the xbox (big-endian) format.","Uses the xmem codec from XNA 4.0 to compress the archive.","Get a flags value with all known bits set.","Get a flags value with all known bits set.","","","","","","","The bitwise and (<code>&</code>) of the bits in two flags values.","The bitwise and (<code>&</code>) of the bits in two flags values.","The bitwise and (<code>&</code>) of the bits in two flags values.","The bitwise and (<code>&</code>) of the bits in two flags values.","The bitwise or (<code>|</code>) of the bits in two flags values.","The bitwise or (<code>|</code>) of the bits in two flags values.","The bitwise or (<code>|</code>) of the bits in two flags values.","The bitwise or (<code>|</code>) of the bits in two flags values.","Get the underlying bits value.","","Get the underlying bits value.","","The bitwise exclusive-or (<code>^</code>) of the bits in two flags …","The bitwise exclusive-or (<code>^</code>) of the bits in two flags …","The bitwise exclusive-or (<code>^</code>) of the bits in two flags …","The bitwise exclusive-or (<code>^</code>) of the bits in two flags …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The bitwise negation (<code>!</code>) of the bits in a flags value, …","The bitwise negation (<code>!</code>) of the bits in a flags value, …","","","","","","","","","","Whether all set bits in a source flags value are also set …","Whether all set bits in a source flags value are also set …","","","","","","","","","","","","","","","","","","","","","","","","","","","The intersection of a source flags value with the …","The intersection of a source flags value with the …","","","Get a flags value with all bits unset.","Get a flags value with all bits unset.","","","","","","","","","","","","","","The bitwise or (<code>|</code>) of the bits in each flags value.","The bitwise or (<code>|</code>) of the bits in each flags value.","","The first character of the path (directory) or stem (file).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from a bits value.","Convert from a bits value.","","Convert from a bits value exactly.","","Convert from a bits value exactly.","Convert from a bits value, unsetting any unknown bits.","Convert from a bits value, unsetting any unknown bits.","","","","","","","","","The bitwise or (<code>|</code>) of the bits in each flags value.","The bitwise or (<code>|</code>) of the bits in each flags value.","Get a flags value with the bits of a flag with the given …","Get a flags value with the bits of a flag with the given …","","","","","","","","","Produces a hash using the given path.","Produces a hash using the given path.","Produces a hash using the given path.","Produces a hash using the given path.","","","The bitwise or (<code>|</code>) of the bits in two flags values.","The bitwise or (<code>|</code>) of the bits in two flags values.","The bitwise and (<code>&</code>) of the bits in two flags values.","The bitwise and (<code>&</code>) of the bits in two flags values.","Whether any set bits in a source flags value are also set …","Whether any set bits in a source flags value are also set …","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","Calls <code>U::from(self)</code>.","","","","","","","","","","Whether all known bits in this flags value are set.","Whether all known bits in this flags value are set.","","","","","","Whether all bits in this flags value are unset.","Whether all bits in this flags value are unset.","","","Yield a set of contained flags values.","Yield a set of contained flags values.","","","Yield a set of contained named flags values.","Yield a set of contained named flags values.","","","The last character of the path (directory) or stem (file).","The second to last character of the path (directory) or …","","","","The length of the path (directory) or stem (file).","","","","","","","","","","","","","","","The bitwise negation (<code>!</code>) of the bits in a flags value, …","The bitwise negation (<code>!</code>) of the bits in a flags value, …","","","","","","","","","","","","","","","","","","","","","","The intersection of a source flags value with the …","The intersection of a source flags value with the …","","","","","","","Call <code>insert</code> when <code>value</code> is <code>true</code> or <code>remove</code> when <code>value</code> is …","Call <code>insert</code> when <code>value</code> is <code>true</code> or <code>remove</code> when <code>value</code> is …","","","","The intersection of a source flags value with the …","The intersection of a source flags value with the …","The intersection of a source flags value with the …","The intersection of a source flags value with the …","The bitwise exclusive-or (<code>^</code>) of the bits in two flags …","The bitwise exclusive-or (<code>^</code>) of the bits in two flags …","","","","","","","","","","","","","","","","","","The bitwise exclusive-or (<code>^</code>) of the bits in two flags …","The bitwise exclusive-or (<code>^</code>) of the bits in two flags …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The bitwise or (<code>|</code>) of the bits in two flags values.","The bitwise or (<code>|</code>) of the bits in two flags values.","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,0,0,0,10,0,0,10,143,144,9,0,143,144,144,0,0,9,9,1,1,2,5,5,2,2,5,5,2,2,5,5,5,105,106,9,10,2,2,5,5,5,105,106,9,10,1,1,1,5,9,10,5,9,10,2,5,1,2,2,5,10,2,5,2,5,16,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,5,5,5,5,5,5,9,10,1,1,1,1,1,1,1,1,1,1,2,2,5,5,9,10,0,2,2,2,5,5,5,5,5,5,5,5,105,106,9,10,37,37,5,5,5,5,5,5,1,16,16,1,16,16,16,1,1,0,2,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,16,16,5,105,106,9,10,16,16,16,16,16,16,16,1,1,1,1,1,1,1,2,5,2,2,2,2,2,2,2,2,2,2,2,5,5,5,5,5,5,5,5,5,16,16,0,16,16,16,143,144,16,1,1,1,16,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,2,5,9,10,1,1,1,1,1,1,2,5,1,1,1,1,1,1,1,1,5,105,106,9,10,5,105,106,9,10,2,5,105,106,9,10,16,1,1,1,1,1,96,96,0,0,0,0,0,0,0,0,0,96,88,90,0,96,93,0,87,87,87,0,0,0,0,0,0,0,0,0,96,88,90,0,88,90,0,96,96,96,96,96,96,96,96,96,86,96,93,0,87,0,86,72,73,75,75,75,72,73,75,95,96,86,87,88,89,73,73,74,75,90,91,92,78,77,80,79,72,82,81,85,76,76,84,83,95,96,86,87,88,89,73,73,74,75,90,91,92,78,77,80,79,72,82,81,85,76,84,83,77,79,81,83,78,80,82,84,75,85,86,87,88,89,73,74,75,90,91,92,78,80,72,82,85,76,84,83,86,87,88,89,73,74,75,90,91,92,78,80,72,82,85,76,84,83,89,73,74,76,72,72,78,77,80,79,82,81,84,83,80,79,82,81,80,79,72,72,72,86,87,88,89,73,74,75,90,91,92,78,77,80,79,72,82,81,85,76,84,83,73,73,74,75,86,87,88,89,73,73,74,74,90,91,92,76,74,74,92,95,95,96,96,86,87,88,89,73,74,75,90,91,92,78,77,80,79,72,82,81,85,76,84,83,80,79,84,83,92,95,96,96,96,96,96,86,87,88,89,73,73,74,74,75,90,90,90,91,92,78,78,78,77,77,77,80,80,80,79,79,79,72,82,82,82,82,82,81,81,81,81,81,85,76,76,76,84,83,72,72,72,72,72,72,75,85,85,85,85,76,0,0,75,92,75,75,75,85,95,96,86,87,88,89,73,74,75,90,91,92,78,77,80,79,72,82,81,85,76,84,83,95,75,75,75,85,85,85,72,72,72,75,72,85,75,75,85,75,85,85,75,72,85,91,80,79,80,79,92,72,76,73,74,75,77,79,72,81,85,83,89,73,73,74,74,76,75,75,75,75,75,75,85,85,85,85,75,75,85,85,75,96,84,83,75,92,86,87,88,89,73,74,75,90,91,92,78,80,72,82,85,76,84,83,95,96,75,95,96,86,87,88,89,73,74,75,90,91,91,92,78,77,80,79,72,82,81,85,76,84,83,75,95,96,86,87,88,89,73,74,75,90,91,92,78,77,80,79,72,82,81,85,76,84,83,75,75,95,96,86,87,88,89,73,74,75,90,91,92,78,77,80,79,72,82,81,85,76,84,83,89,89,89,85,85,84,83,92,75,72,85,145,145,0,0,0,0,0,117,0,0,0,0,115,115,115,117,0,110,111,110,111,115,111,111,112,110,114,113,113,115,111,111,112,110,114,113,114,111,112,110,114,113,111,112,110,114,113,111,112,113,111,112,110,114,113,111,111,111,111,112,112,113,115,115,111,112,110,114,113,115,115,115,111,111,112,112,110,110,110,110,114,113,113,113,114,114,114,114,113,0,0,112,114,115,111,112,110,114,113,114,114,114,110,110,114,114,114,114,110,114,112,113,111,112,110,114,112,111,111,112,112,113,110,110,110,110,114,114,114,114,114,114,115,111,112,110,114,113,115,115,111,112,110,114,113,115,111,112,110,114,113,115,111,112,110,114,113,114,114,110,114,139,139,0,0,0,0,0,0,119,0,119,139,0,0,0,119,138,0,119,137,137,118,0,0,0,0,0,0,0,139,139,139,139,139,139,139,118,118,118,136,138,119,119,119,119,0,118,118,137,137,137,118,118,118,0,119,119,118,119,120,121,123,120,121,123,118,119,118,119,118,119,118,119,118,118,119,119,118,119,118,119,139,136,137,121,121,123,123,122,120,129,128,131,130,134,126,126,135,133,132,127,127,118,119,139,136,137,121,121,123,123,122,120,129,128,131,130,134,126,135,133,132,127,118,119,128,130,132,129,131,133,134,135,136,137,121,123,122,120,129,131,134,126,135,133,127,118,119,136,137,121,123,122,120,129,131,134,126,135,133,127,118,119,137,121,123,122,126,127,118,119,120,120,119,129,128,131,130,129,128,118,119,122,120,120,120,136,137,121,123,122,120,129,128,131,130,134,126,135,133,132,127,118,119,121,123,121,123,118,119,119,119,118,119,136,137,121,121,123,123,122,122,122,126,127,118,119,118,119,119,122,133,132,139,139,136,137,121,123,122,120,129,128,131,130,134,126,135,133,132,127,118,118,118,118,118,119,119,119,119,119,118,139,139,139,139,136,137,121,121,123,123,122,122,122,120,129,129,129,128,128,128,131,131,131,130,130,130,134,126,126,126,135,133,132,127,127,127,118,119,118,119,118,118,119,119,118,119,120,120,120,120,120,120,134,135,118,119,118,119,134,135,134,135,134,135,126,127,0,0,0,0,134,135,118,119,118,119,118,119,139,136,137,121,123,122,120,129,128,131,130,134,126,135,133,132,127,118,119,134,134,134,135,135,135,118,119,120,118,119,120,120,120,134,135,118,119,134,135,118,119,134,135,118,119,134,135,122,122,120,134,135,122,118,118,118,126,127,121,123,122,120,128,130,134,135,132,118,119,122,137,121,121,123,123,122,122,122,126,127,120,120,120,120,135,135,135,135,134,135,118,119,134,135,119,119,119,119,118,119,118,118,139,118,119,118,119,118,119,118,136,137,121,123,122,120,129,131,134,126,135,133,127,118,119,139,118,119,118,139,136,137,121,123,122,120,129,128,131,130,134,126,135,133,132,127,118,119,139,136,137,121,123,122,120,129,128,131,130,134,126,135,133,132,127,118,119,139,136,137,121,123,122,120,129,128,131,130,134,126,135,133,132,127,118,119,133,132,118,119,137,137,137,134,135,134,135,129,128,131,130,133,132,118,120,135,119,119,146,146],"f":"`````````````````````{bd}0{d{{h{f}}}}{jd}{j{{h{f}}}}2{dd}12{ce{}{}}42300000400230000{bl}{bn}{bA`}{jj}{AbAb}{AdAd}{{ce}Af{}{}}00{{dd}Ah}{{jj}Ah}{{bc}Aj{{Al{{h{f}}}}}}{{}d}0{{}j}{{}Ad}{d{{h{f}}}}{j{{An{f}}}}10{{B`c}Bb{{Bf{Bd}}}}6{{d{Bh{d}}}Aj}{{d{Bh{{h{f}}}}}Aj}{{d{h{f}}}Aj}{{dBj}Aj}{{dBl}Aj}{{d{Bh{Bl}}}Aj}1{{d{An{f}}}Aj}3{{dd}Aj}51{{dj}Aj}0{{j{h{f}}}Aj}{{jd}Aj}{{j{An{f}}}Aj}{{jBl}Aj}2{{jBj}Aj}1{{jj}Aj}5{{AbAb}Aj}{{AdAd}Aj}{bBn}{bC`}{{bc}{{Cb{c}}}{{Ch{Cd}{{Cf{Aj}}}}}}{{bc}{{Cj{Bd}}}{{Al{{h{f}}}}}}{{bf}{{Cj{Bd}}}}1{{bCd}{{Cj{Bd}}}}{{bc}Cl{{Al{{h{f}}}}Cn}}{b{{Cj{Bd}}}}4{{dD`}{{Dd{AfDb}}}}0{{jD`}{{Dd{AfDb}}}}0{{AbD`}Df}{{AdD`}Df}`{{{Dh{f}}}d}{{{h{f}}}d}{Bld}{{{Dh{f}}}j}{{{h{f}}}j}{dj}{Blj}{{{An{f}}}j}{cc{}}5{Bjj}1111{{cBd}Dj{}}{cDj{}}{cj{{Dn{}{{Dl{Bl}}}}}}{cj{{Dn{}{{Dl{f}}}}}}{cj{{Dn{}{{Dl{{h{f}}}}}}}}{cj{{Dn{}{{Dl{j}}}}}}{cj{{Dn{}{{Dl{d}}}}}}{cj{{Dn{}{{Dl{Cd}}}}}}{E`{{Cj{{h{f}}}}}}{E`{{Bh{{h{f}}}}}}{Eb{{Dd{{An{f}}Eb}}}}{Ed{{Cj{{h{f}}}}}}{Ef{{Dd{{An{f}}Ef}}}}{Ed{{Bh{{h{f}}}}}}{c{{An{f}}}{{Al{{h{f}}}}}}{bEh}{bEj}{c{{Cj{Ab}}}{CnEl}}{{dc}AfEn}{{jc}AfEn}{{d{F`{Bd}}}d}{{d{Fb{Bd}}}d}{{d{Fd{Bd}}}d}{{dBd}f}{{dFf}d}{{d{Fh{Bd}}}d}{{d{Fj{Bd}}}d}1532406{{B`BdCd}Af}{{B`Bdc}Af{{Al{{h{f}}}}}}{ce{}{}}0000{B`{{Dd{EbFl}}}}{B`Eb}{B`{{Dd{EfFl}}}}{B`Ef}{B`{{Dd{BjFl}}}}{B`Bj}0{bAj}0{b{{Cj{f}}}}{bFn}{bG`}{bAf}0{cd{{Al{{h{f}}}}Cn}}{{{An{f}}}j}{{d{An{f}}}{{Cj{Ah}}}}{{d{h{f}}}{{Cj{Ah}}}}{{dd}{{Cj{Ah}}}}{{dj}{{Cj{Ah}}}}3{{dBl}{{Cj{Ah}}}}3{{dBj}{{Cj{Ah}}}}102{{j{h{f}}}{{Cj{Ah}}}}{{j{An{f}}}{{Cj{Ah}}}}{{jj}{{Cj{Ah}}}}{{jd}{{Cj{Ah}}}}3{{jBj}{{Cj{Ah}}}}1{{jBl}{{Cj{Ah}}}}0{B`{{Cj{f}}}}{B`{{Cj{Cd}}}}`{{B`f}Af}{{B`Cd}Af}{{B`c}Af{{Al{{h{f}}}}}}{c{{Dd{eg}}}{}{}{}}{{ce}{{Dd{gi}}}{}{}{}{}}{{B`Bd}Cd}{{bBd}{{An{f}}}}{{bce}{{An{f}}}{{Al{{h{f}}}}}{{Al{{h{f}}}}}}{{bce{An{f}}}Af{{Al{{h{f}}}}}{{Al{{h{f}}}}}}{{B`ce}Af{{Bf{Bd}}}{{Al{{h{f}}}}}}{{bceBd}{{An{f}}}{{Al{{h{f}}}}}{{Al{{h{f}}}}}}{{bceBd{An{f}}}Af{{Al{{h{f}}}}}{{Al{{h{f}}}}}}{bAf}00{{bc}{{Cj{Bd}}}{{Al{{h{f}}}}}}{{bf}{{Cj{Bd}}}}1{{bCd}{{Cj{Bd}}}}{{bc}Gb{{Al{{h{f}}}}Cn}}3{{bc}{{Cj{{Gd{{h{f}}{h{f}}}}}}}{{Al{{h{f}}}}Cn}}{{bc}Gf{{Al{{h{f}}}}Cn}}{{bBdc}Gh{{Al{{h{f}}}}Cn}}{bGj}{bGl}4{{bc}Gn{{Al{{h{f}}}}Cn}}{{bBdc}H`{{Al{{h{f}}}}Cn}}{{bc}Aj{{Al{{h{f}}}}}}``{b{{An{f}}}}00{{b{An{f}}}Af}{b{{Dd{E`Hb}}}}{b{{Bh{E`}}}}{dj}{ce{}{}}00{b{{Dd{EdHb}}}}{b{{Bh{Ed}}}}{b{{Dd{BlHb}}}}{b{{Bh{Bl}}}}{{bBj}Af}{bBl}{cBj{}}0<;{b{{h{f}}}}0{{bc}{{h{f}}}{{Ch{Cd}{{Cf{Aj}}}}}}100{c{{Dd{e}}}{}{}}000000000{cHd{}}00000{c{{An{f}}}{{Al{Bl}}}}{bHf}{bHh}{bHj}{bHl}{bHn}`````````````````````````````````````````````````````{I`{{h{f}}}}{IbId}{IfI`}{If{{h{I`}}}}1{I`f}31{ce{}{}}000000400000000000000{IhIb}11111111511111111111111111{IjIl}{InJ`}{JbJd}{JfJh}{{}Ij}{{}In}{{}Jb}{{}Jf}{IfAf}{JjAf}{JlJl}{JnJn}{K`K`}{KbKb}{IbIb}{IdId}{IfIf}{KdKd}{KfKf}{KhKh}{IlIl}{J`J`}{I`I`}{JdJd}{JjJj}{IhIh}{JhJh}{JfJf}{{ce}Af{}{}}00000000000000000{{KbKb}Ah}{{IbIb}Ah}{{IdId}Ah}{{IhIh}Ah}{{I`Jd}{{Kj{I`}}}}{{I`{An{f}}Jd}{{Kj{Af}}}}{IlJl}{{IjJl}Ij}{J`Jl}{{InJl}In}{JdJl}{{JbJl}Jb}{JhJl}{{JfJl}Jf}{J`Jn}{{InJn}In}{JdJn}{{JbJn}Jb}{J`Ad}{{InAd}In}?>{I`{{Cj{Bd}}}}{{}Jl}{{}Jn}{{}K`}{{}Kb}{{}Ib}{{}Id}{{}If}{{}Kd}{{}Kf}{{}Kh}{{}Il}{{}Ij}{{}J`}{{}In}{{}I`}{{}Jd}{{}Jb}{{}Jj}{{}Ih}{{}Jh}{{}Jf}{Ibc{}}0`{{Ifc}{{`{{Kl{}{{Dl{I`}}}}}}}{{Bf{Bd}}}}{{JlJl}Aj}{{JnJn}Aj}{{K`K`}Aj}{{KbKb}Aj}{{IbIb}Aj}{{IbId}Aj}{{IdIb}Aj}{{IdId}Aj}{{KdKd}Aj}{{KfKf}Aj}{{KhKh}Aj}{{IhIh}Aj}```{{KnD`}Df}0{{L`D`}Df}0{{JlD`}Df}{{JnD`}Df}{{K`D`}Df}{{KbD`}Df}{{IbD`}Df}{{IdD`}Df}{{IfD`}Df}{{KdD`}Df}{{KfD`}Df}{{KhD`}Df}{{IlD`}Df}{{IjD`}Df}{{J`D`}Df}{{InD`}Df}{{I`D`}Df}{{JdD`}Df}{{JbD`}Df}{{JjD`}Df}{{IhD`}Df}{{JhD`}Df}{{JfD`}Df}{J`K`}{{InK`}In}{JhK`}{{JfK`}Jf}`{cc{}}{LbL`}{LdL`}{LfL`}3{LhL`}44444{IdIb}5{IbId}6{KfKd}7{KhKd}88{JhIl}09{JhIj}0::{JhJ`}0{JhIn}<0<{JhJd}0={IlJd}0{JhJb}{IlJb}{cc{}}210{cIh{{Lj{j}}}}1{IbIh}22{{{Dh{f}}Bd}I`}{{{Ll{{h{f}}}}Bd}I`}{{{h{f}}Bd}I`}{{{h{f}}}I`}{{{Ll{{h{f}}}}}I`}{{{Dh{f}}}I`}{cIf{{Dn{}{{Dl{I`}}}}}}{cJj{{Dn{}{{Dl{{Gd{IhIf}}}}}}}}{{Jjc}{{Cj{If}}}{{Ln{Ib}}}}{{Jjc}{{Cj{{Gd{IhIf}}}}}{{Ln{Ib}}}}1{IhIb}{d{{Gd{Ibj}}}}{jIb}``{{IfBd}c{}}0{{IfBdI`}Af}{{JjcIf}{{Cj{If}}}{{Lj{Ih}}}}{ce{}{}}0000000000000000000000{KnI`}{Ifc{}}00{Jjc{}}00{I`I`}{I`Aj}0{IfAj}1{JjAj}1{If{{`{{Kl{}{{Dl{I`}}}}}}}}{Jj{{`{{Kl{}{{Dl{{Gd{IhIf}}}}}}}}}}10{Jj{{`{{Kl{}{{Dl{Ih}}}}}}}}{IfBd}{I`Bd}{JjBd}`{J`Bd}{{InBd}In}10``{Ihd}{{}Ib}{{}Id}{{}If}{{}Ij}{{}In}{{}I`}{{}Jb}{{}Jj}{{}Jf}{{KbKb}{{Cj{Ah}}}}{{IbIb}{{Cj{Ah}}}}{{IbId}{{Cj{Ah}}}}{{IdIb}{{Cj{Ah}}}}{{IdId}{{Cj{Ah}}}}{{IhIh}{{Cj{Ah}}}}{If{{Cj{I`}}}}{{IfI`}Af}{{M`c}{{Kj{e}}}{}{}}{{Mbc}{{Kj{e}}}{}{}}{{Edc}{{Kj{e}}}{}{}}{{Mdc}{{Kj{e}}}{}{}}{Md{{Kj{c}}}{}}{M`{{Kj{c}}}{}}{Ed{{Kj{c}}}{}}{Mb{{Kj{c}}}{}}{IfBd}{{IfBd}I`}{{Jjc}{{Cj{If}}}{{Ln{Ib}}}}{{Jjc}{{Cj{{Gd{IhIf}}}}}{{Ln{Ib}}}}{{Ifc}Af{{Ch{I`}{{Cf{Aj}}}}}}{L`{{Cj{Mf}}}}{JhAj}{{JfAj}Jf}6`{ce{}{}}00000000000000000{cBj{}}0{{IfBd}Af}{c{{Dd{e}}}{}{}}000000000{Mh{{Kj{Kf}}}}1111111111111{{IfBdI`}{{Dd{AfKn}}}}22222222222222222222222{{IfI`}{{Dd{AfKn}}}}{{IfBd}{{Cj{I`}}}}{cHd{}}0000000000000000000000```{Jj{{`{{Kl{}{{Dl{If}}}}}}}}0{JhKb}{{JfKb}Jf}`{{IfcIl}{{Kj{Af}}}{CnMj}}{{I`cJd}{{Kj{Af}}}{CnMj}}{{JjcJh}{{Kj{Af}}}{CnMj}}`````````````````{Ml{{h{f}}}}{MnN`}{Mlf}1{ce{}{}}20000{NbMn}11311111{NdAf}{MnMn}{N`N`}{MlMl}{NdNd}{NbNb}{{ce}Af{}{}}0000{{MnMn}Ah}{{N`N`}Ah}{{NbNb}Ah}{{}Mn}{{}N`}{{}Ml}{{}Nd}{{}Nb}{Mnc{}}0{{MnN`}Aj}{{MnMn}Aj}{{N`N`}Aj}{{N`Mn}Aj}{{NbNb}Aj}{{NfD`}Df}0{{MnD`}Df}{{N`D`}Df}{{MlD`}Df}{{NdD`}Df}{{NbD`}Df}{LdNf}{LbNf}{cc{}}{N`Mn}1{MnN`}2{{{Dh{f}}}Ml}{{{Ll{{h{f}}}}}Ml}4{{{h{f}}}Ml}55{cNb{{Lj{j}}}}{MnNb}{cNd{{Dn{}{{Dl{{Gd{NbMl}}}}}}}}{{Ndc}{{Cj{Ml}}}{{Ln{Mn}}}}{{Ndc}{{Cj{{Gd{NbMl}}}}}{{Ln{Mn}}}}1{NbMn}{d{{Gd{Mnj}}}}{jMn}`{{NdcMl}{{Cj{Ml}}}{{Lj{Nb}}}}{ce{}{}}00000{Ndc{}}00{MlMl}{MlAj}{NdAj}{Nd{{`{{Kl{}{{Dl{{Gd{NbMl}}}}}}}}}}0{Nd{{`{{Kl{}{{Dl{Nb}}}}}}}}{MlBd}{NdBd}`{Nbd}{{}Mn}{{}N`}{{}Ml}{{}Nd}{N`Nh}{{MnMn}{{Cj{Ah}}}}{{MnN`}{{Cj{Ah}}}}{{N`N`}{{Cj{Ah}}}}{{N`Mn}{{Cj{Ah}}}}{{NbNb}{{Cj{Ah}}}}{Ed{{Nj{c}}}{}}{M`{{Nj{c}}}{}}{Mb{{Nj{c}}}{}}{Md{{Nj{c}}}{}}3120{{Ndc}{{Cj{Ml}}}{{Ln{Mn}}}}{{Ndc}{{Cj{{Gd{NbMl}}}}}{{Ln{Mn}}}}{Nf{{Cj{Mf}}}}{ce{}{}}0000{cBj{}}{c{{Dd{e}}}{}{}}00000000000{cHd{}}00000{Nd{{`{{Kl{}{{Dl{Ml}}}}}}}}0{{Mlc}{{Nj{Af}}}{CnMj}}{{Ndc}{{Nj{Af}}}{CnMj}}`````````````````````````````````````````````````````````{{}Nl}{{}Nn}{O`{{h{f}}}}{ObOd}{OfOd}{O`f}21{{NlNl}Nl}{{NnNn}Nn}{{NlNl}Af}{{NnNn}Af}3210{NlOh}0{NnOj}05432{ce{}{}}0009080000000{OlOb}11111{OnOf}222222;2:22222222222222{A`Ab}{AdAf}{AhAj}{{}A`}{{}Ad}{{}Ah}{AlAf}{AnAf}{AA`AA`}{AAbAAb}{ObOb}{OfOf}{OdOd}{O`O`}{AbAb}{AfAf}{AlAl}{OlOl}{AnAn}{AjAj}{OnOn}{NlNl}{NnNn}{{ce}Af{}{}}00000000000000{{AAbAAb}Ah}{{ObOb}Ah}{{OfOf}Ah}{{OdOd}Ah}{{OlOl}Ah}{{OnOn}Ah}87{{O`Af}{{AAd{O`}}}}{{O`{An{f}}Af}{{AAd{Af}}}}{NnAj}{AbAA`}{{A`AA`}A`}{AfAA`}{{AdAA`}Ad}{AbAd}{{A`Ad}A`}{{NlNl}Aj}{{NnNn}Aj}`:9{O`{{Cj{Bd}}}}{{}AA`}{{}AAb}{{}Ob}{{}Of}{{}Od}{{}O`}{{}Ab}{{}A`}{{}Af}{{}Ad}{{}Al}{{}Ol}{{}An}{{}Aj}{{}Ah}{{}On}{{}Nl}{{}Nn}{Obc{}}{Ofc{}}10{{NlNl}Nl}{{NnNn}Nn}{NnAj}065{{AA`AA`}Aj}{{AAbAAb}Aj}{{ObOd}Aj}{{ObOb}Aj}{{OfOf}Aj}{{OfOd}Aj}{{OdOf}Aj}{{OdOb}Aj}{{OdOd}Aj}{{OlOl}Aj}{{OnOn}Aj}{{NlNl}Aj}{{NnNn}Aj}{{Nlc}Af{{Dn{}{{Dl{Nl}}}}}}{{Nnc}Af{{Dn{}{{Dl{Nn}}}}}}?`{AjNn}{{AhNn}Ah}{{AAfD`}Df}0{{AA`D`}Df}{{AAbD`}Df}{{ObD`}Df}{{OfD`}Df}{{OdD`}Df}{{O`D`}Df}{{AbD`}Df}{{A`D`}Df}{{AfD`}Df}{{AdD`}Df}{{AlD`}Df}{{OlD`}Df}{{AnD`}Df}{{AjD`}Df}{{AhD`}Df}{{OnD`}Df}{{NlD`}Df}0000{{NnD`}Df}0000{NlAj}{AAhAAf}{LbAAf}{LdAAf}{cc{}}00{OdOb}1{OdOf}2{OfOd}3{ObOd}4{AjAb}05{AjA`}066{AjAf}07{AjAd}08{cOl{{Lj{j}}}}{ObOl}::::{OfOn}{cOn{{Lj{j}}}}<<<{Oh{{Cj{Nl}}}}{Oj{{Cj{Nn}}}}{OhNl}0{OjNn}010{{{Dh{f}}Bd}O`}{{{Ll{{h{f}}}}Bd}O`}{{{h{f}}Bd}O`}{{{Dh{f}}}O`}{{{Ll{{h{f}}}}}O`}{{{h{f}}}O`}{cAl{{Dn{}{{Dl{{Gd{OlO`}}}}}}}}{cAn{{Dn{}{{Dl{{Gd{OnAl}}}}}}}}{cNl{{Dn{}{{Dl{Nl}}}}}}{cNn{{Dn{}{{Dl{Nn}}}}}}{Bl{{Cj{Nl}}}}{Bl{{Cj{Nn}}}}{{Alc}{{Cj{O`}}}{{Ln{Ob}}}}{{Anc}{{Cj{Al}}}{{Ln{Of}}}}{{Alc}{{Cj{{Gd{OlO`}}}}}{{Ln{Ob}}}}{{Anc}{{Cj{{Gd{OnAl}}}}}{{Ln{Of}}}}32{OlOb}{OnOf}{d{{Gd{Ofj}}}}{jOf}{d{{Gd{Obj}}}}{jOb}{{AlcO`}{{Cj{O`}}}{{Lj{Ol}}}}{{AncAl}{{Cj{Al}}}{{Lj{On}}}}{{NlNl}Af}{{NnNn}Af}{{NlNl}Nl}{{NnNn}Nn}{{NlNl}Aj}{{NnNn}Aj}{ce{}{}}000000000000000000{Alc{}}00{Anc{}}00{Nlc{}}{Nnc{}}{O`O`}{NlAj}{NnAj}{O`Aj}00{AlAj}{AnAj}43{Al{{`{{Kl{}{{Dl{{Gd{OlO`}}}}}}}}}}{An{{`{{Kl{}{{Dl{{Gd{OnAl}}}}}}}}}}{Nl{{AAj{Nl}}}}{Nn{{AAj{Nn}}}}32{Nl{{AAl{Nl}}}}{Nn{{AAl{Nn}}}}{Al{{`{{Kl{}{{Dl{Ol}}}}}}}}{An{{`{{Kl{}{{Dl{On}}}}}}}}``{O`Bd}{AlBd}{AnBd}`???{Old}{Ond}{{}Ob}{{}Of}{{}Od}{{}O`}{{}A`}{{}Ad}{{}Al}{{}An}{{}Ah}{NlNl}{NnNn}{OdNh}{{AAbAAb}{{Cj{Ah}}}}{{ObOd}{{Cj{Ah}}}}{{ObOb}{{Cj{Ah}}}}{{OfOf}{{Cj{Ah}}}}{{OfOd}{{Cj{Ah}}}}{{OdOd}{{Cj{Ah}}}}{{OdOf}{{Cj{Ah}}}}{{OdOb}{{Cj{Ah}}}}{{OlOl}{{Cj{Ah}}}}{{OnOn}{{Cj{Ah}}}}{{M`c}{{AAd{e}}}{}{}}{{Mbc}{{AAd{e}}}{}{}}{{Edc}{{AAd{e}}}{}{}}{{Mdc}{{AAd{e}}}{}{}}{M`{{AAd{c}}}{}}{Md{{AAd{c}}}{}}{Mb{{AAd{c}}}{}}{Ed{{AAd{c}}}{}}{{Alc}{{Cj{O`}}}{{Ln{Ob}}}}{{Anc}{{Cj{Al}}}{{Ln{Of}}}}{{NlNl}Af}{{NnNn}Af}{{Alc}{{Cj{{Gd{OlO`}}}}}{{Ln{Ob}}}}{{Anc}{{Cj{{Gd{OnAl}}}}}{{Ln{Of}}}}{NnAj}000{{NlNlAj}Af}{{NnNnAj}Af}{NlAj}0{AAf{{Cj{Mf}}}}{{NlNl}Nl}{{NnNn}Nn}:9103{ce{}{}}00000000000000{cBj{}}<;5{c{{Dd{e}}}{}{}}0000000000000000000000000000000000000{cHd{}}000000000000000000{AjNl}{{AhNl}Ah}76```{Al{{`{{Kl{}{{Dl{O`}}}}}}}}{An{{`{{Kl{}{{Dl{Al}}}}}}}}10{AbAAb}{{A`AAb}A`}{AfAAb}{{AdAAb}Ad}{AjAAb}{{AhAAb}Ah}{NlAj}{{O`cAf}{{AAd{Af}}}{CnMj}}{{AncAj}{{AAd{Af}}}{CnMj}}{NnAj}0``","c":[],"p":[[10,"ByteSlice",0],[5,"BStr",0],[1,"u8"],[1,"slice"],[5,"BString",0],[5,"Bytes",1509],[5,"CharIndices",1510],[5,"Chars",1510],[6,"FileFormat",0],[6,"CompressionResult",0],[1,"unit"],[6,"Ordering",1511],[1,"bool"],[10,"AsRef",1512],[5,"Vec",1513],[10,"ByteVec",0],[5,"DrainBytes",1514],[1,"usize"],[10,"RangeBounds",1515],[6,"Cow",1516],[5,"String",1517],[1,"str"],[5,"EscapeBytes",1518],[5,"Fields",1509],[5,"FieldsWith",1509],[1,"char"],[17,"Output"],[10,"FnMut",1519],[6,"Option",1520],[5,"Find",1509],[10,"Sized",1521],[5,"Formatter",1522],[5,"Error",1522],[6,"Result",1523],[8,"Result",1522],[1,"array"],[10,"CompressableFrom",0],[17,"Item"],[10,"IntoIterator",1524],[5,"OsStr",1525],[5,"OsString",1525],[5,"Path",1526],[5,"PathBuf",1526],[5,"GraphemeIndices",1527],[5,"Graphemes",1527],[10,"Read",1528],[10,"Hasher",1529],[5,"RangeToInclusive",1515],[5,"Range",1515],[5,"RangeFrom",1515],[5,"RangeFull",1515],[5,"RangeInclusive",1515],[5,"RangeTo",1515],[5,"FromUtf8Error",1514],[5,"Lines",1509],[5,"LinesWithTerminator",1509],[5,"FindReverse",1509],[1,"tuple"],[5,"SplitReverse",1509],[5,"SplitNReverse",1509],[5,"SentenceIndices",1530],[5,"Sentences",1530],[5,"Split",1509],[5,"SplitN",1509],[5,"Utf8Error",1510],[5,"TypeId",1531],[5,"Utf8Chunks",1510],[5,"WordIndices",1532],[5,"Words",1532],[5,"WordsWithBreakIndices",1532],[5,"WordsWithBreaks",1532],[5,"Chunk",287],[5,"FileHash",287],[5,"Hash",287],[5,"File",287],[5,"ArchiveKey",287],[5,"FileWriteOptionsBuilder",287],[5,"FileWriteOptions",287],[5,"FileReadOptionsBuilder",287],[5,"FileReadOptions",287],[5,"ChunkCompressionOptionsBuilder",287],[5,"ChunkCompressionOptions",287],[5,"ArchiveOptionsBuilder",287],[5,"ArchiveOptions",287],[5,"Archive",287],[6,"CompressionFormat",287],[6,"CompressionLevel",287],[6,"Format",287],[6,"Version",287],[6,"FileHeader",287],[5,"GNMFHeader",287],[5,"DX10Header",287],[8,"Result",287],[10,"Iterator",1533],[5,"FileCapacityError",287],[6,"Error",287],[5,"TryFromIntError",1534],[5,"Error",1535],[5,"Error",1536],[5,"HResultError",1537],[10,"Into",1512],[5,"Box",1538],[10,"Borrow",1539],[5,"File",1540],[5,"Borrowed",0],[5,"Copied",0],[10,"Error",1541],[5,"TexMetadata",1542],[10,"Write",1528],[5,"File",803],[5,"FileHash",803],[5,"Hash",803],[5,"ArchiveKey",803],[5,"Archive",803],[6,"Error",803],[1,"u64"],[8,"Result",803],[5,"ArchiveTypes",959],[5,"ArchiveFlags",959],[5,"File",959],[5,"FileHash",959],[5,"Hash",959],[5,"DirectoryHash",959],[1,"u16"],[1,"u32"],[5,"DirectoryKey",959],[5,"ArchiveKey",959],[5,"FileReadOptionsBuilder",959],[5,"FileReadOptions",959],[5,"FileCompressionOptionsBuilder",959],[5,"FileCompressionOptions",959],[5,"ArchiveOptionsBuilder",959],[5,"ArchiveOptions",959],[5,"Directory",959],[5,"Archive",959],[6,"CompressionCodec",959],[6,"Version",959],[8,"Result",959],[6,"Error",959],[6,"Error",1543],[5,"Iter",1544],[5,"IterNames",1544],[10,"Reader",0],[10,"ReaderWithOptions",0],[15,"DecompressionSizeMismatch",798],[15,"DecompressionSizeMismatch",1507]],"b":[[24,"impl-AsMut%3CBStr%3E-for-BString"],[25,"impl-AsMut%3C%5Bu8%5D%3E-for-BString"],[26,"impl-AsRef%3C%5Bu8%5D%3E-for-BStr"],[27,"impl-AsRef%3CBStr%3E-for-BStr"],[28,"impl-AsRef%3C%5Bu8%5D%3E-for-BString"],[29,"impl-AsRef%3CBStr%3E-for-BString"],[32,"impl-Borrow%3C%5Bu8%5D%3E-for-BString"],[33,"impl-Borrow%3CBStr%3E-for-BString"],[42,"impl-BorrowMut%3C%5Bu8%5D%3E-for-BString"],[43,"impl-BorrowMut%3CBStr%3E-for-BString"],[60,"impl-Default-for-%26BStr"],[61,"impl-Default-for-%26mut+BStr"],[70,"impl-PartialEq%3CCow%3C\'a,+BStr%3E%3E-for-%26BStr"],[71,"impl-PartialEq%3CCow%3C\'a,+%5Bu8%5D%3E%3E-for-%26BStr"],[72,"impl-PartialEq%3C%5Bu8%5D%3E-for-BStr"],[73,"impl-PartialEq%3CString%3E-for-BStr"],[74,"impl-PartialEq%3Cstr%3E-for-BStr"],[75,"impl-PartialEq%3CCow%3C\'a,+str%3E%3E-for-%26BStr"],[76,"impl-PartialEq%3C%26str%3E-for-BStr"],[77,"impl-PartialEq%3CVec%3Cu8%3E%3E-for-%26BStr"],[78,"impl-PartialEq%3CString%3E-for-%26BStr"],[79,"impl-PartialEq-for-BStr"],[80,"impl-PartialEq%3C%26%5Bu8%5D%3E-for-BStr"],[81,"impl-PartialEq%3CVec%3Cu8%3E%3E-for-BStr"],[82,"impl-PartialEq%3CBString%3E-for-BStr"],[83,"impl-PartialEq%3CBString%3E-for-%26BStr"],[84,"impl-PartialEq%3C%5Bu8%5D%3E-for-BString"],[85,"impl-PartialEq%3C%26BStr%3E-for-BString"],[86,"impl-PartialEq%3CVec%3Cu8%3E%3E-for-BString"],[87,"impl-PartialEq%3C%26str%3E-for-BString"],[88,"impl-PartialEq%3CBStr%3E-for-BString"],[89,"impl-PartialEq%3CString%3E-for-BString"],[90,"impl-PartialEq%3Cstr%3E-for-BString"],[91,"impl-PartialEq-for-BString"],[92,"impl-PartialEq%3C%26%5Bu8%5D%3E-for-BString"],[105,"impl-Display-for-BStr"],[106,"impl-Debug-for-BStr"],[107,"impl-Debug-for-BString"],[108,"impl-Display-for-BString"],[112,"impl-From%3C%26%5Bu8;+N%5D%3E-for-%26BStr"],[113,"impl-From%3C%26%5Bu8%5D%3E-for-%26BStr"],[114,"impl-From%3C%26str%3E-for-%26BStr"],[115,"impl-From%3C%5Bu8;+N%5D%3E-for-BString"],[116,"impl-From%3C%26%5Bu8%5D%3E-for-BString"],[117,"impl-From%3C%26BStr%3E-for-BString"],[118,"impl-From%3C%26str%3E-for-BString"],[119,"impl-From%3CVec%3Cu8%3E%3E-for-BString"],[121,"impl-From%3C%26%5Bu8;+N%5D%3E-for-BString"],[122,"impl-From%3CString%3E-for-BString"],[129,"impl-FromIterator%3C%26str%3E-for-BString"],[130,"impl-FromIterator%3Cu8%3E-for-BString"],[131,"impl-FromIterator%3C%26%5Bu8%5D%3E-for-BString"],[132,"impl-FromIterator%3CBString%3E-for-BString"],[133,"impl-FromIterator%3C%26BStr%3E-for-BString"],[134,"impl-FromIterator%3Cchar%3E-for-BString"],[147,"impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-BStr"],[148,"impl-Index%3CRange%3Cusize%3E%3E-for-BStr"],[149,"impl-Index%3CRangeFrom%3Cusize%3E%3E-for-BStr"],[150,"impl-Index%3Cusize%3E-for-BStr"],[151,"impl-Index%3CRangeFull%3E-for-BStr"],[152,"impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-BStr"],[153,"impl-Index%3CRangeTo%3Cusize%3E%3E-for-BStr"],[154,"impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-BStr"],[155,"impl-IndexMut%3CRange%3Cusize%3E%3E-for-BStr"],[156,"impl-IndexMut%3Cusize%3E-for-BStr"],[157,"impl-IndexMut%3CRangeFull%3E-for-BStr"],[158,"impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-BStr"],[159,"impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-BStr"],[160,"impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-BStr"],[184,"impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BStr"],[185,"impl-PartialOrd%3C%5Bu8%5D%3E-for-BStr"],[186,"impl-PartialOrd-for-BStr"],[187,"impl-PartialOrd%3CBString%3E-for-%26BStr"],[188,"impl-PartialOrd%3CVec%3Cu8%3E%3E-for-%26BStr"],[189,"impl-PartialOrd%3C%26str%3E-for-BStr"],[190,"impl-PartialOrd%3C%26%5Bu8%5D%3E-for-BStr"],[191,"impl-PartialOrd%3CString%3E-for-BStr"],[192,"impl-PartialOrd%3Cstr%3E-for-BStr"],[193,"impl-PartialOrd%3CString%3E-for-%26BStr"],[194,"impl-PartialOrd%3CBString%3E-for-BStr"],[195,"impl-PartialOrd%3C%26%5Bu8%5D%3E-for-BString"],[196,"impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BString"],[197,"impl-PartialOrd-for-BString"],[198,"impl-PartialOrd%3CBStr%3E-for-BString"],[199,"impl-PartialOrd%3C%5Bu8%5D%3E-for-BString"],[200,"impl-PartialOrd%3CString%3E-for-BString"],[201,"impl-PartialOrd%3C%26BStr%3E-for-BString"],[202,"impl-PartialOrd%3C%26str%3E-for-BString"],[203,"impl-PartialOrd%3Cstr%3E-for-BString"],[495,"impl-PartialEq-for-FileHash"],[496,"impl-PartialEq%3CHash%3E-for-FileHash"],[497,"impl-PartialEq%3CFileHash%3E-for-Hash"],[498,"impl-PartialEq-for-Hash"],[506,"impl-Debug-for-CapacityError%3C\'bytes%3E"],[507,"impl-Display-for-CapacityError%3C\'bytes%3E"],[508,"impl-Display-for-Error"],[509,"impl-Debug-for-Error"],[537,"impl-From%3CTryFromIntError%3E-for-Error"],[538,"impl-From%3CError%3E-for-Error"],[539,"impl-From%3CError%3E-for-Error"],[541,"impl-From%3CHResultError%3E-for-Error"],[551,"impl-From%3CGNMF%3E-for-Header"],[553,"impl-From%3CDX10%3E-for-Header"],[556,"impl-From%3C%26Options%3E-for-WriteOptions"],[557,"impl-From%3COptions%3E-for-WriteOptions"],[559,"impl-From%3COptions%3E-for-WriteOptionsBuilder"],[560,"impl-From%3C%26Options%3E-for-WriteOptionsBuilder"],[563,"impl-From%3COptions%3E-for-ReadOptions"],[564,"impl-From%3C%26Options%3E-for-ReadOptions"],[565,"impl-From%3C%26Options%3E-for-ReadOptionsBuilder"],[567,"impl-From%3COptions%3E-for-ReadOptionsBuilder"],[569,"impl-From%3COptions%3E-for-CompressionOptions"],[570,"impl-From%3C%26Options%3E-for-CompressionOptions"],[572,"impl-From%3CWriteOptions%3E-for-CompressionOptions"],[573,"impl-From%3C%26WriteOptions%3E-for-CompressionOptions"],[574,"impl-From%3COptions%3E-for-CompressionOptionsBuilder"],[575,"impl-From%3CWriteOptions%3E-for-CompressionOptionsBuilder"],[577,"impl-From%3C%26Options%3E-for-CompressionOptionsBuilder"],[578,"impl-From%3C%26WriteOptions%3E-for-CompressionOptionsBuilder"],[580,"impl-From%3CT%3E-for-Key%3C\'static%3E"],[582,"impl-From%3CFileHash%3E-for-Key%3C\'static%3E"],[585,"impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-Chunk%3C\'bytes%3E"],[586,"impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-Chunk%3C\'static%3E"],[587,"impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-Chunk%3C\'bytes%3E"],[588,"impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-Chunk%3C\'bytes%3E"],[589,"impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-Chunk%3C\'static%3E"],[590,"impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-Chunk%3C\'bytes%3E"],[629,"impl-IntoIterator-for-%26mut+File%3C\'bytes%3E"],[630,"impl-IntoIterator-for-%26File%3C\'bytes%3E"],[631,"impl-IntoIterator-for-File%3C\'bytes%3E"],[632,"impl-IntoIterator-for-Archive%3C\'bytes%3E"],[633,"impl-IntoIterator-for-%26Archive%3C\'bytes%3E"],[634,"impl-IntoIterator-for-%26mut+Archive%3C\'bytes%3E"],[668,"impl-PartialOrd-for-FileHash"],[669,"impl-PartialOrd%3CHash%3E-for-FileHash"],[670,"impl-PartialOrd%3CFileHash%3E-for-Hash"],[671,"impl-PartialOrd-for-Hash"],[675,"impl-ReaderWithOptions%3C%26File%3E-for-File%3C\'static%3E"],[676,"impl-ReaderWithOptions%3CBorrowed%3C\'bytes%3E%3E-for-File%3C\'bytes%3E"],[677,"impl-ReaderWithOptions%3C%26Path%3E-for-File%3C\'static%3E"],[678,"impl-ReaderWithOptions%3CCopied%3C\'bytes%3E%3E-for-File%3C\'static%3E"],[679,"impl-Reader%3CCopied%3C\'bytes%3E%3E-for-Archive%3C\'static%3E"],[680,"impl-Reader%3C%26File%3E-for-Archive%3C\'static%3E"],[681,"impl-Reader%3C%26Path%3E-for-Archive%3C\'static%3E"],[682,"impl-Reader%3CBorrowed%3C\'bytes%3E%3E-for-Archive%3C\'bytes%3E"],[855,"impl-PartialEq%3CHash%3E-for-FileHash"],[856,"impl-PartialEq-for-FileHash"],[857,"impl-PartialEq-for-Hash"],[858,"impl-PartialEq%3CFileHash%3E-for-Hash"],[860,"impl-Display-for-Error"],[861,"impl-Debug-for-Error"],[867,"impl-From%3CError%3E-for-Error"],[868,"impl-From%3CTryFromIntError%3E-for-Error"],[874,"impl-From%3C%26%5Bu8;+N%5D%3E-for-File%3C\'bytes%3E"],[875,"impl-From%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C\'static%3E"],[877,"impl-From%3C%26%5Bu8%5D%3E-for-File%3C\'bytes%3E"],[880,"impl-From%3CT%3E-for-Key%3C\'static%3E"],[881,"impl-From%3CFileHash%3E-for-Key%3C\'static%3E"],[897,"impl-IntoIterator-for-Archive%3C\'bytes%3E"],[898,"impl-IntoIterator-for-%26mut+Archive%3C\'bytes%3E"],[899,"impl-IntoIterator-for-%26Archive%3C\'bytes%3E"],[915,"impl-PartialOrd-for-FileHash"],[916,"impl-PartialOrd%3CHash%3E-for-FileHash"],[917,"impl-PartialOrd-for-Hash"],[918,"impl-PartialOrd%3CFileHash%3E-for-Hash"],[920,"impl-Reader%3C%26Path%3E-for-File%3C\'static%3E"],[921,"impl-Reader%3C%26File%3E-for-File%3C\'static%3E"],[922,"impl-Reader%3CBorrowed%3C\'bytes%3E%3E-for-File%3C\'bytes%3E"],[923,"impl-Reader%3CCopied%3C\'bytes%3E%3E-for-File%3C\'static%3E"],[924,"impl-Reader%3C%26Path%3E-for-Archive%3C\'static%3E"],[925,"impl-Reader%3CBorrowed%3C\'bytes%3E%3E-for-Archive%3C\'bytes%3E"],[926,"impl-Reader%3C%26File%3E-for-Archive%3C\'static%3E"],[927,"impl-Reader%3CCopied%3C\'bytes%3E%3E-for-Archive%3C\'static%3E"],[1032,"impl-Types"],[1033,"impl-Flags-for-Types"],[1034,"impl-Flags"],[1035,"impl-Flags-for-Flags"],[1175,"impl-PartialEq%3CHash%3E-for-FileHash"],[1176,"impl-PartialEq-for-FileHash"],[1177,"impl-PartialEq-for-DirectoryHash"],[1178,"impl-PartialEq%3CHash%3E-for-DirectoryHash"],[1179,"impl-PartialEq%3CDirectoryHash%3E-for-Hash"],[1180,"impl-PartialEq%3CFileHash%3E-for-Hash"],[1181,"impl-PartialEq-for-Hash"],[1192,"impl-Debug-for-Error"],[1193,"impl-Display-for-Error"],[1210,"impl-Octal-for-Types"],[1211,"impl-LowerHex-for-Types"],[1212,"impl-Binary-for-Types"],[1213,"impl-Debug-for-Types"],[1214,"impl-UpperHex-for-Types"],[1215,"impl-Octal-for-Flags"],[1216,"impl-Debug-for-Flags"],[1217,"impl-Binary-for-Flags"],[1218,"impl-LowerHex-for-Flags"],[1219,"impl-UpperHex-for-Flags"],[1221,"impl-From%3CError%3E-for-Error"],[1222,"impl-From%3CTryFromIntError%3E-for-Error"],[1223,"impl-From%3CError%3E-for-Error"],[1231,"impl-From%3CDirectoryHash%3E-for-Hash"],[1233,"impl-From%3CFileHash%3E-for-Hash"],[1235,"impl-From%3COptions%3E-for-ReadOptions"],[1236,"impl-From%3C%26Options%3E-for-ReadOptions"],[1238,"impl-From%3C%26Options%3E-for-ReadOptionsBuilder"],[1239,"impl-From%3COptions%3E-for-ReadOptionsBuilder"],[1242,"impl-From%3C%26Options%3E-for-CompressionOptions"],[1243,"impl-From%3COptions%3E-for-CompressionOptions"],[1245,"impl-From%3C%26Options%3E-for-CompressionOptionsBuilder"],[1246,"impl-From%3COptions%3E-for-CompressionOptionsBuilder"],[1248,"impl-From%3CT%3E-for-Key%3C\'static%3E"],[1249,"impl-From%3CFileHash%3E-for-Key%3C\'static%3E"],[1254,"impl-From%3CDirectoryHash%3E-for-Key%3C\'static%3E"],[1255,"impl-From%3CT%3E-for-Key%3C\'static%3E"],[1261,"impl-Flags-for-Types"],[1262,"impl-Types"],[1263,"impl-Flags-for-Flags"],[1264,"impl-Flags"],[1267,"impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-File%3C\'bytes%3E"],[1268,"impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C\'static%3E"],[1269,"impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-File%3C\'bytes%3E"],[1270,"impl-CompressableFrom%3C%26%5Bu8;+N%5D%3E-for-File%3C\'bytes%3E"],[1271,"impl-CompressableFrom%3CBox%3C%5Bu8%5D%3E%3E-for-File%3C\'static%3E"],[1272,"impl-CompressableFrom%3C%26%5Bu8%5D%3E-for-File%3C\'bytes%3E"],[1318,"impl-IntoIterator-for-%26Directory%3C\'bytes%3E"],[1319,"impl-IntoIterator-for-%26mut+Directory%3C\'bytes%3E"],[1320,"impl-IntoIterator-for-Directory%3C\'bytes%3E"],[1321,"impl-IntoIterator-for-%26Archive%3C\'bytes%3E"],[1322,"impl-IntoIterator-for-Archive%3C\'bytes%3E"],[1323,"impl-IntoIterator-for-%26mut+Archive%3C\'bytes%3E"],[1370,"impl-PartialOrd%3CHash%3E-for-FileHash"],[1371,"impl-PartialOrd-for-FileHash"],[1372,"impl-PartialOrd-for-DirectoryHash"],[1373,"impl-PartialOrd%3CHash%3E-for-DirectoryHash"],[1374,"impl-PartialOrd-for-Hash"],[1375,"impl-PartialOrd%3CDirectoryHash%3E-for-Hash"],[1376,"impl-PartialOrd%3CFileHash%3E-for-Hash"],[1379,"impl-ReaderWithOptions%3C%26File%3E-for-File%3C\'static%3E"],[1380,"impl-ReaderWithOptions%3CBorrowed%3C\'bytes%3E%3E-for-File%3C\'bytes%3E"],[1381,"impl-ReaderWithOptions%3C%26Path%3E-for-File%3C\'static%3E"],[1382,"impl-ReaderWithOptions%3CCopied%3C\'bytes%3E%3E-for-File%3C\'static%3E"],[1383,"impl-Reader%3C%26File%3E-for-Archive%3C\'static%3E"],[1384,"impl-Reader%3CCopied%3C\'bytes%3E%3E-for-Archive%3C\'static%3E"],[1385,"impl-Reader%3CBorrowed%3C\'bytes%3E%3E-for-Archive%3C\'bytes%3E"],[1386,"impl-Reader%3C%26Path%3E-for-Archive%3C\'static%3E"]],"a":{"fallout 3":[238],"fallout 4":[111],"fallout new vegas":[238],"fnv":[238],"fo3":[238],"morrowind":[237],"new vegas":[238],"oblivion":[238],"skyrim":[238],"special edition":[238],"sse":[238],"starfield":[111],"tes5":[238]}}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/settings.html b/settings.html new file mode 100644 index 0000000..e647d49 --- /dev/null +++ b/settings.html @@ -0,0 +1,2 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Settings of Rustdoc"><title>Settings</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="./static.files/storage-4c98445ec4002617.js"></script><script defer src="./static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.77.0</span></h2></div><div class="version">(aedd173a2 2024-03-17)</div><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div> + <main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="./ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="./help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc settings</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section>You need to enable JavaScript be able to update your settings.</section></noscript><script defer src="./static.files/settings-4313503d2e1961c2.js"></script></section></div></main></body></html> \ No newline at end of file diff --git a/src-files.js b/src-files.js new file mode 100644 index 0000000..ca483b9 --- /dev/null +++ b/src-files.js @@ -0,0 +1,4 @@ +var srcIndex = new Map(JSON.parse('[\ +["ba2",["",[["fo4",[],["archive.rs","chunk.rs","file.rs","hashing.rs","mod.rs"]],["tes3",[],["archive.rs","file.rs","hashing.rs","mod.rs"]],["tes4",[],["archive.rs","directory.rs","file.rs","hashing.rs","mod.rs"]]],["cc.rs","containers.rs","derive.rs","guess.rs","hashing.rs","io.rs","lib.rs","protocols.rs"]]]\ +]')); +createSrcSidebar(); diff --git a/src/ba2/cc.rs.html b/src/ba2/cc.rs.html new file mode 100644 index 0000000..c185adc --- /dev/null +++ b/src/ba2/cc.rs.html @@ -0,0 +1,45 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/cc.rs`."><title>cc.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +</pre></div><pre class="rust"><code><span class="attr">#[must_use] +</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const fn </span>make_four(cc: <span class="kw-2">&</span>[u8]) -> u32 { + <span class="kw">let </span>buffer = <span class="kw">match </span>cc.len() { + <span class="number">0 </span>=> [<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>], + <span class="number">1 </span>=> [cc[<span class="number">0</span>], <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>], + <span class="number">2 </span>=> [cc[<span class="number">0</span>], cc[<span class="number">1</span>], <span class="number">0</span>, <span class="number">0</span>], + <span class="number">3 </span>=> [cc[<span class="number">0</span>], cc[<span class="number">1</span>], cc[<span class="number">2</span>], <span class="number">0</span>], + <span class="kw">_ </span>=> [cc[<span class="number">0</span>], cc[<span class="number">1</span>], cc[<span class="number">2</span>], cc[<span class="number">3</span>]], + }; + u32::from_le_bytes(buffer) +} + +<span class="attr">#[test] +</span><span class="kw">fn </span>test() { + <span class="macro">assert_eq!</span>(make_four(<span class="string">b""</span>), <span class="number">0x00000000</span>); + <span class="macro">assert_eq!</span>(make_four(<span class="string">b"A"</span>), <span class="number">0x00000041</span>); + <span class="macro">assert_eq!</span>(make_four(<span class="string">b"AB"</span>), <span class="number">0x00004241</span>); + <span class="macro">assert_eq!</span>(make_four(<span class="string">b"ABC"</span>), <span class="number">0x00434241</span>); + <span class="macro">assert_eq!</span>(make_four(<span class="string">b"ABCD"</span>), <span class="number">0x44434241</span>); + <span class="macro">assert_eq!</span>(make_four(<span class="string">b"ABCDE"</span>), <span class="number">0x44434241</span>); +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/containers.rs.html b/src/ba2/containers.rs.html new file mode 100644 index 0000000..55b36f3 --- /dev/null +++ b/src/ba2/containers.rs.html @@ -0,0 +1,571 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/containers.rs`."><title>containers.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +</pre></div><pre class="rust"><code><span class="kw">use </span>core::ops::Range; +<span class="kw">use </span>memmap2::Mmap; +<span class="kw">use </span>std::sync::Arc; + +<span class="attr">#[derive(Clone, Debug)] +</span><span class="kw">struct </span>Mapping { + pos: usize, + len: usize, + mapping: Arc<Mmap>, +} + +<span class="kw">impl </span>Mapping { + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>as_bytes(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>[u8] { + <span class="kw-2">&</span><span class="self">self</span>.mapping[<span class="self">self</span>.pos..<span class="self">self</span>.pos + <span class="self">self</span>.len] + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>as_ptr(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">*const </span>u8 { + <span class="self">self</span>.as_bytes().as_ptr() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>is_empty(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.len == <span class="number">0 + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>len(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="self">self</span>.len + } +} + +<span class="attr">#[derive(Clone, Debug)] +</span><span class="kw">enum </span>BytesInner<<span class="lifetime">'bytes</span>> { + Owned(Box<[u8]>), + Borrowed(<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]), + Mapped(Mapping), +} + +<span class="kw">use </span>BytesInner::<span class="kw-2">*</span>; + +<span class="kw">impl </span>From<Mapping> <span class="kw">for </span>BytesInner<<span class="lifetime">'static</span>> { + <span class="kw">fn </span>from(value: Mapping) -> <span class="self">Self </span>{ + Mapped(value) + } +} + +<span class="attr">#[derive(Clone, Debug)] +</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>Bytes<<span class="lifetime">'bytes</span>> { + inner: BytesInner<<span class="lifetime">'bytes</span>>, +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Bytes<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>as_bytes(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>[u8] { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + Owned(x) => x, + Borrowed(x) => x, + Mapped(x) => x.as_bytes(), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>as_ptr(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">*const </span>u8 { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + Owned(x) => x.as_ptr(), + Borrowed(x) => x.as_ptr(), + Mapped(x) => x.as_ptr(), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>from_borrowed(bytes: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + inner: Borrowed(bytes), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>is_empty(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + Owned(x) => x.is_empty(), + Borrowed(x) => x.is_empty(), + Mapped(x) => x.is_empty(), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>len(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + Owned(x) => x.len(), + Borrowed(x) => x.len(), + Mapped(x) => x.len(), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>into_owned(<span class="self">self</span>) -> Bytes<<span class="lifetime">'static</span>> { + Bytes { + inner: <span class="kw">match </span><span class="self">self</span>.inner { + Owned(x) => Owned(x), + Borrowed(x) => Owned(x.into()), + Mapped(x) => Mapped(x), + }, + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>into_compressable( + <span class="self">self</span>, + decompressed_len: <span class="prelude-ty">Option</span><usize>, + ) -> CompressableBytes<<span class="lifetime">'bytes</span>> { + CompressableBytes { + inner: <span class="kw">match </span>(<span class="self">self</span>.inner, decompressed_len) { + (Owned(x), <span class="prelude-val">Some</span>(len)) => OwnedCompressed(x, len), + (Owned(x), <span class="prelude-val">None</span>) => OwnedDecompressed(x), + (Borrowed(x), <span class="prelude-val">Some</span>(len)) => BorrowedCompressed(x, len), + (Borrowed(x), <span class="prelude-val">None</span>) => BorrowedDecompressed(x), + (Mapped(x), <span class="prelude-val">Some</span>(len)) => MappedCompressed(x, len), + (Mapped(x), <span class="prelude-val">None</span>) => MappedDecompressed(x), + }, + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>copy_slice(<span class="kw-2">&</span><span class="self">self</span>, slice: Range<usize>) -> <span class="self">Self </span>{ + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + Owned(x) => <span class="self">Self </span>{ + inner: Owned(x[slice].into()), + }, + Borrowed(x) => <span class="self">Self </span>{ + inner: Borrowed(<span class="kw-2">&</span>x[slice]), + }, + Mapped(x) => <span class="self">Self </span>{ + inner: Mapping { + pos: x.pos + slice.start, + len: slice.len(), + mapping: x.mapping.clone(), + } + .into(), + }, + } + } +} + +<span class="kw">impl </span>Bytes<<span class="lifetime">'static</span>> { + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>from_owned(bytes: Box<[u8]>) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + inner: Owned(bytes), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>from_mapped(pos: usize, len: usize, mapping: Arc<Mmap>) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + inner: Mapping { pos, len, mapping }.into(), + } + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Default <span class="kw">for </span>Bytes<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>default() -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + inner: Owned(Box::default()), + } + } +} + +<span class="attr">#[derive(Clone, Debug)] +</span><span class="kw">enum </span>CompressableBytesInner<<span class="lifetime">'bytes</span>> { + OwnedDecompressed(Box<[u8]>), + OwnedCompressed(Box<[u8]>, usize), + BorrowedDecompressed(<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]), + BorrowedCompressed(<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8], usize), + MappedDecompressed(Mapping), + MappedCompressed(Mapping, usize), +} + +<span class="kw">use </span>CompressableBytesInner::<span class="kw-2">*</span>; + +<span class="attr">#[derive(Clone, Debug)] +</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>CompressableBytes<<span class="lifetime">'bytes</span>> { + inner: CompressableBytesInner<<span class="lifetime">'bytes</span>>, +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> CompressableBytes<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>as_bytes(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>[u8] { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + OwnedDecompressed(x) | OwnedCompressed(x, <span class="kw">_</span>) => x, + BorrowedDecompressed(x) | BorrowedCompressed(x, <span class="kw">_</span>) => x, + MappedDecompressed(x) | MappedCompressed(x, <span class="kw">_</span>) => x.as_bytes(), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>as_ptr(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">*const </span>u8 { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + OwnedDecompressed(x) | OwnedCompressed(x, <span class="kw">_</span>) => x.as_ptr(), + BorrowedDecompressed(x) | BorrowedCompressed(x, <span class="kw">_</span>) => x.as_ptr(), + MappedDecompressed(x) | MappedCompressed(x, <span class="kw">_</span>) => x.as_ptr(), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>from_borrowed(bytes: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8], decompressed_len: <span class="prelude-ty">Option</span><usize>) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + inner: <span class="kw">match </span>decompressed_len { + <span class="prelude-val">Some</span>(len) => BorrowedCompressed(bytes, len), + <span class="prelude-val">None </span>=> BorrowedDecompressed(bytes), + }, + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>is_empty(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + OwnedDecompressed(x) | OwnedCompressed(x, <span class="kw">_</span>) => x.is_empty(), + BorrowedDecompressed(x) | BorrowedCompressed(x, <span class="kw">_</span>) => x.is_empty(), + MappedDecompressed(x) | MappedCompressed(x, <span class="kw">_</span>) => x.is_empty(), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>len(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + OwnedDecompressed(x) | OwnedCompressed(x, <span class="kw">_</span>) => x.len(), + BorrowedDecompressed(x) | BorrowedCompressed(x, <span class="kw">_</span>) => x.len(), + MappedDecompressed(x) | MappedCompressed(x, <span class="kw">_</span>) => x.len(), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>into_owned(<span class="self">self</span>) -> CompressableBytes<<span class="lifetime">'static</span>> { + CompressableBytes { + inner: <span class="kw">match </span><span class="self">self</span>.inner { + OwnedDecompressed(x) => OwnedDecompressed(x), + OwnedCompressed(x, y) => OwnedCompressed(x, y), + BorrowedDecompressed(x) => OwnedDecompressed(x.into()), + BorrowedCompressed(x, y) => OwnedCompressed(x.into(), y), + MappedDecompressed(x) => MappedDecompressed(x), + MappedCompressed(x, y) => MappedCompressed(x, y), + }, + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>decompressed_len(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="prelude-ty">Option</span><usize> { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + OwnedDecompressed(<span class="kw">_</span>) | BorrowedDecompressed(<span class="kw">_</span>) | MappedDecompressed(<span class="kw">_</span>) => <span class="prelude-val">None</span>, + OwnedCompressed(<span class="kw">_</span>, x) | BorrowedCompressed(<span class="kw">_</span>, x) | MappedCompressed(<span class="kw">_</span>, x) => <span class="prelude-val">Some</span>(<span class="kw-2">*</span>x), + } + } + + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>is_compressed(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.inner { + OwnedDecompressed(<span class="kw">_</span>) | BorrowedDecompressed(<span class="kw">_</span>) | MappedDecompressed(<span class="kw">_</span>) => <span class="bool-val">false</span>, + OwnedCompressed(<span class="kw">_</span>, <span class="kw">_</span>) | BorrowedCompressed(<span class="kw">_</span>, <span class="kw">_</span>) | MappedCompressed(<span class="kw">_</span>, <span class="kw">_</span>) => <span class="bool-val">true</span>, + } + } +} + +<span class="kw">impl </span>CompressableBytes<<span class="lifetime">'static</span>> { + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>from_owned(bytes: Box<[u8]>, decompressed_len: <span class="prelude-ty">Option</span><usize>) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + inner: <span class="kw">match </span>decompressed_len { + <span class="prelude-val">Some</span>(len) => OwnedCompressed(bytes, len), + <span class="prelude-val">None </span>=> OwnedDecompressed(bytes), + }, + } + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Default <span class="kw">for </span>CompressableBytes<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>default() -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + inner: OwnedDecompressed(Box::default()), + } + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/derive.rs.html b/src/ba2/derive.rs.html new file mode 100644 index 0000000..acadda6 --- /dev/null +++ b/src/ba2/derive.rs.html @@ -0,0 +1,1181 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/derive.rs`."><title>derive.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +<a href="#285" id="285">285</a> +<a href="#286" id="286">286</a> +<a href="#287" id="287">287</a> +<a href="#288" id="288">288</a> +<a href="#289" id="289">289</a> +<a href="#290" id="290">290</a> +<a href="#291" id="291">291</a> +<a href="#292" id="292">292</a> +<a href="#293" id="293">293</a> +<a href="#294" id="294">294</a> +<a href="#295" id="295">295</a> +<a href="#296" id="296">296</a> +<a href="#297" id="297">297</a> +<a href="#298" id="298">298</a> +<a href="#299" id="299">299</a> +<a href="#300" id="300">300</a> +<a href="#301" id="301">301</a> +<a href="#302" id="302">302</a> +<a href="#303" id="303">303</a> +<a href="#304" id="304">304</a> +<a href="#305" id="305">305</a> +<a href="#306" id="306">306</a> +<a href="#307" id="307">307</a> +<a href="#308" id="308">308</a> +<a href="#309" id="309">309</a> +<a href="#310" id="310">310</a> +<a href="#311" id="311">311</a> +<a href="#312" id="312">312</a> +<a href="#313" id="313">313</a> +<a href="#314" id="314">314</a> +<a href="#315" id="315">315</a> +<a href="#316" id="316">316</a> +<a href="#317" id="317">317</a> +<a href="#318" id="318">318</a> +<a href="#319" id="319">319</a> +<a href="#320" id="320">320</a> +<a href="#321" id="321">321</a> +<a href="#322" id="322">322</a> +<a href="#323" id="323">323</a> +<a href="#324" id="324">324</a> +<a href="#325" id="325">325</a> +<a href="#326" id="326">326</a> +<a href="#327" id="327">327</a> +<a href="#328" id="328">328</a> +<a href="#329" id="329">329</a> +<a href="#330" id="330">330</a> +<a href="#331" id="331">331</a> +<a href="#332" id="332">332</a> +<a href="#333" id="333">333</a> +<a href="#334" id="334">334</a> +<a href="#335" id="335">335</a> +<a href="#336" id="336">336</a> +<a href="#337" id="337">337</a> +<a href="#338" id="338">338</a> +<a href="#339" id="339">339</a> +<a href="#340" id="340">340</a> +<a href="#341" id="341">341</a> +<a href="#342" id="342">342</a> +<a href="#343" id="343">343</a> +<a href="#344" id="344">344</a> +<a href="#345" id="345">345</a> +<a href="#346" id="346">346</a> +<a href="#347" id="347">347</a> +<a href="#348" id="348">348</a> +<a href="#349" id="349">349</a> +<a href="#350" id="350">350</a> +<a href="#351" id="351">351</a> +<a href="#352" id="352">352</a> +<a href="#353" id="353">353</a> +<a href="#354" id="354">354</a> +<a href="#355" id="355">355</a> +<a href="#356" id="356">356</a> +<a href="#357" id="357">357</a> +<a href="#358" id="358">358</a> +<a href="#359" id="359">359</a> +<a href="#360" id="360">360</a> +<a href="#361" id="361">361</a> +<a href="#362" id="362">362</a> +<a href="#363" id="363">363</a> +<a href="#364" id="364">364</a> +<a href="#365" id="365">365</a> +<a href="#366" id="366">366</a> +<a href="#367" id="367">367</a> +<a href="#368" id="368">368</a> +<a href="#369" id="369">369</a> +<a href="#370" id="370">370</a> +<a href="#371" id="371">371</a> +<a href="#372" id="372">372</a> +<a href="#373" id="373">373</a> +<a href="#374" id="374">374</a> +<a href="#375" id="375">375</a> +<a href="#376" id="376">376</a> +<a href="#377" id="377">377</a> +<a href="#378" id="378">378</a> +<a href="#379" id="379">379</a> +<a href="#380" id="380">380</a> +<a href="#381" id="381">381</a> +<a href="#382" id="382">382</a> +<a href="#383" id="383">383</a> +<a href="#384" id="384">384</a> +<a href="#385" id="385">385</a> +<a href="#386" id="386">386</a> +<a href="#387" id="387">387</a> +<a href="#388" id="388">388</a> +<a href="#389" id="389">389</a> +<a href="#390" id="390">390</a> +<a href="#391" id="391">391</a> +<a href="#392" id="392">392</a> +<a href="#393" id="393">393</a> +<a href="#394" id="394">394</a> +<a href="#395" id="395">395</a> +<a href="#396" id="396">396</a> +<a href="#397" id="397">397</a> +<a href="#398" id="398">398</a> +<a href="#399" id="399">399</a> +<a href="#400" id="400">400</a> +<a href="#401" id="401">401</a> +<a href="#402" id="402">402</a> +<a href="#403" id="403">403</a> +<a href="#404" id="404">404</a> +<a href="#405" id="405">405</a> +<a href="#406" id="406">406</a> +<a href="#407" id="407">407</a> +<a href="#408" id="408">408</a> +<a href="#409" id="409">409</a> +<a href="#410" id="410">410</a> +<a href="#411" id="411">411</a> +<a href="#412" id="412">412</a> +<a href="#413" id="413">413</a> +<a href="#414" id="414">414</a> +<a href="#415" id="415">415</a> +<a href="#416" id="416">416</a> +<a href="#417" id="417">417</a> +<a href="#418" id="418">418</a> +<a href="#419" id="419">419</a> +<a href="#420" id="420">420</a> +<a href="#421" id="421">421</a> +<a href="#422" id="422">422</a> +<a href="#423" id="423">423</a> +<a href="#424" id="424">424</a> +<a href="#425" id="425">425</a> +<a href="#426" id="426">426</a> +<a href="#427" id="427">427</a> +<a href="#428" id="428">428</a> +<a href="#429" id="429">429</a> +<a href="#430" id="430">430</a> +<a href="#431" id="431">431</a> +<a href="#432" id="432">432</a> +<a href="#433" id="433">433</a> +<a href="#434" id="434">434</a> +<a href="#435" id="435">435</a> +<a href="#436" id="436">436</a> +<a href="#437" id="437">437</a> +<a href="#438" id="438">438</a> +<a href="#439" id="439">439</a> +<a href="#440" id="440">440</a> +<a href="#441" id="441">441</a> +<a href="#442" id="442">442</a> +<a href="#443" id="443">443</a> +<a href="#444" id="444">444</a> +<a href="#445" id="445">445</a> +<a href="#446" id="446">446</a> +<a href="#447" id="447">447</a> +<a href="#448" id="448">448</a> +<a href="#449" id="449">449</a> +<a href="#450" id="450">450</a> +<a href="#451" id="451">451</a> +<a href="#452" id="452">452</a> +<a href="#453" id="453">453</a> +<a href="#454" id="454">454</a> +<a href="#455" id="455">455</a> +<a href="#456" id="456">456</a> +<a href="#457" id="457">457</a> +<a href="#458" id="458">458</a> +<a href="#459" id="459">459</a> +<a href="#460" id="460">460</a> +<a href="#461" id="461">461</a> +<a href="#462" id="462">462</a> +<a href="#463" id="463">463</a> +<a href="#464" id="464">464</a> +<a href="#465" id="465">465</a> +<a href="#466" id="466">466</a> +<a href="#467" id="467">467</a> +<a href="#468" id="468">468</a> +<a href="#469" id="469">469</a> +<a href="#470" id="470">470</a> +<a href="#471" id="471">471</a> +<a href="#472" id="472">472</a> +<a href="#473" id="473">473</a> +<a href="#474" id="474">474</a> +<a href="#475" id="475">475</a> +<a href="#476" id="476">476</a> +<a href="#477" id="477">477</a> +<a href="#478" id="478">478</a> +<a href="#479" id="479">479</a> +<a href="#480" id="480">480</a> +<a href="#481" id="481">481</a> +<a href="#482" id="482">482</a> +<a href="#483" id="483">483</a> +<a href="#484" id="484">484</a> +<a href="#485" id="485">485</a> +<a href="#486" id="486">486</a> +<a href="#487" id="487">487</a> +<a href="#488" id="488">488</a> +<a href="#489" id="489">489</a> +<a href="#490" id="490">490</a> +<a href="#491" id="491">491</a> +<a href="#492" id="492">492</a> +<a href="#493" id="493">493</a> +<a href="#494" id="494">494</a> +<a href="#495" id="495">495</a> +<a href="#496" id="496">496</a> +<a href="#497" id="497">497</a> +<a href="#498" id="498">498</a> +<a href="#499" id="499">499</a> +<a href="#500" id="500">500</a> +<a href="#501" id="501">501</a> +<a href="#502" id="502">502</a> +<a href="#503" id="503">503</a> +<a href="#504" id="504">504</a> +<a href="#505" id="505">505</a> +<a href="#506" id="506">506</a> +<a href="#507" id="507">507</a> +<a href="#508" id="508">508</a> +<a href="#509" id="509">509</a> +<a href="#510" id="510">510</a> +<a href="#511" id="511">511</a> +<a href="#512" id="512">512</a> +<a href="#513" id="513">513</a> +<a href="#514" id="514">514</a> +<a href="#515" id="515">515</a> +<a href="#516" id="516">516</a> +<a href="#517" id="517">517</a> +<a href="#518" id="518">518</a> +<a href="#519" id="519">519</a> +<a href="#520" id="520">520</a> +<a href="#521" id="521">521</a> +<a href="#522" id="522">522</a> +<a href="#523" id="523">523</a> +<a href="#524" id="524">524</a> +<a href="#525" id="525">525</a> +<a href="#526" id="526">526</a> +<a href="#527" id="527">527</a> +<a href="#528" id="528">528</a> +<a href="#529" id="529">529</a> +<a href="#530" id="530">530</a> +<a href="#531" id="531">531</a> +<a href="#532" id="532">532</a> +<a href="#533" id="533">533</a> +<a href="#534" id="534">534</a> +<a href="#535" id="535">535</a> +<a href="#536" id="536">536</a> +<a href="#537" id="537">537</a> +<a href="#538" id="538">538</a> +<a href="#539" id="539">539</a> +<a href="#540" id="540">540</a> +<a href="#541" id="541">541</a> +<a href="#542" id="542">542</a> +<a href="#543" id="543">543</a> +<a href="#544" id="544">544</a> +<a href="#545" id="545">545</a> +<a href="#546" id="546">546</a> +<a href="#547" id="547">547</a> +<a href="#548" id="548">548</a> +<a href="#549" id="549">549</a> +<a href="#550" id="550">550</a> +<a href="#551" id="551">551</a> +<a href="#552" id="552">552</a> +<a href="#553" id="553">553</a> +<a href="#554" id="554">554</a> +<a href="#555" id="555">555</a> +<a href="#556" id="556">556</a> +<a href="#557" id="557">557</a> +<a href="#558" id="558">558</a> +<a href="#559" id="559">559</a> +<a href="#560" id="560">560</a> +<a href="#561" id="561">561</a> +<a href="#562" id="562">562</a> +<a href="#563" id="563">563</a> +<a href="#564" id="564">564</a> +<a href="#565" id="565">565</a> +<a href="#566" id="566">566</a> +<a href="#567" id="567">567</a> +<a href="#568" id="568">568</a> +<a href="#569" id="569">569</a> +<a href="#570" id="570">570</a> +<a href="#571" id="571">571</a> +<a href="#572" id="572">572</a> +<a href="#573" id="573">573</a> +<a href="#574" id="574">574</a> +<a href="#575" id="575">575</a> +<a href="#576" id="576">576</a> +<a href="#577" id="577">577</a> +<a href="#578" id="578">578</a> +<a href="#579" id="579">579</a> +<a href="#580" id="580">580</a> +<a href="#581" id="581">581</a> +<a href="#582" id="582">582</a> +<a href="#583" id="583">583</a> +<a href="#584" id="584">584</a> +<a href="#585" id="585">585</a> +<a href="#586" id="586">586</a> +<a href="#587" id="587">587</a> +<a href="#588" id="588">588</a> +<a href="#589" id="589">589</a> +</pre></div><pre class="rust"><code><span class="macro">macro_rules! </span>reader { + (<span class="macro-nonterminal">$this</span>:ident => <span class="macro-nonterminal">$result</span>:ident) => { + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="kw">crate</span>::Reader<<span class="kw">crate</span>::Borrowed<<span class="lifetime">'bytes</span>>> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Error = Error; + <span class="kw">type </span>Item = <span class="macro-nonterminal">$result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>>>; + + <span class="kw">fn </span>read(source: <span class="kw">crate</span>::Borrowed<<span class="lifetime">'bytes</span>>) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Item> { + <span class="kw">let </span><span class="kw-2">mut </span>source = <span class="kw">crate</span>::io::BorrowedSource::from(source.<span class="number">0</span>); + <span class="self">Self</span>::do_read(<span class="kw-2">&mut </span>source) + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="kw">crate</span>::Reader<<span class="kw">crate</span>::Copied<<span class="lifetime">'bytes</span>>> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="kw">type </span>Error = Error; + <span class="kw">type </span>Item = <span class="macro-nonterminal">$result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>>>; + + <span class="kw">fn </span>read(source: <span class="kw">crate</span>::Copied<<span class="lifetime">'bytes</span>>) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Item> { + <span class="kw">let </span><span class="kw-2">mut </span>source = <span class="kw">crate</span>::io::CopiedSource::from(source.<span class="number">0</span>); + <span class="self">Self</span>::do_read(<span class="kw-2">&mut </span>source) + } + } + + <span class="kw">impl </span><span class="kw">crate</span>::Reader<<span class="kw-2">&</span>::std::fs::File> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="kw">type </span>Error = Error; + <span class="kw">type </span>Item = <span class="macro-nonterminal">$result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>>>; + + <span class="kw">fn </span>read(source: <span class="kw-2">&</span>::std::fs::File) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Item> { + <span class="kw">let </span><span class="kw-2">mut </span>source = <span class="kw">crate</span>::io::MappedSource::try_from(source)<span class="question-mark">?</span>; + <span class="self">Self</span>::do_read(<span class="kw-2">&mut </span>source) + } + } + + <span class="kw">impl </span><span class="kw">crate</span>::Reader<<span class="kw-2">&</span>::std::path::Path> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="kw">type </span>Error = Error; + <span class="kw">type </span>Item = <span class="macro-nonterminal">$result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>>>; + + <span class="kw">fn </span>read(source: <span class="kw-2">&</span>::std::path::Path) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Item> { + <span class="kw">let </span>fd = ::std::fs::File::open(source)<span class="question-mark">?</span>; + <span class="self">Self</span>::read(<span class="kw-2">&</span>fd) + } + } + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>reader; + +<span class="macro">macro_rules! </span>reader_with_options { + ((<span class="macro-nonterminal">$this</span>:ident: <span class="macro-nonterminal">$options</span>:ident) => <span class="macro-nonterminal">$result</span>:ident) => { + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="kw">crate</span>::ReaderWithOptions<<span class="kw">crate</span>::Borrowed<<span class="lifetime">'bytes</span>>> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Error = Error; + <span class="kw">type </span>Item = <span class="macro-nonterminal">$result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>>>; + <span class="kw">type </span>Options = <span class="macro-nonterminal">$options</span>; + + <span class="kw">fn </span>read( + source: <span class="kw">crate</span>::Borrowed<<span class="lifetime">'bytes</span>>, + options: <span class="kw-2">&</span><span class="self">Self</span>::Options, + ) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Item> { + <span class="kw">let </span><span class="kw-2">mut </span>source = <span class="kw">crate</span>::io::BorrowedSource::from(source.<span class="number">0</span>); + <span class="self">Self</span>::do_read(<span class="kw-2">&mut </span>source, options) + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="kw">crate</span>::ReaderWithOptions<<span class="kw">crate</span>::Copied<<span class="lifetime">'bytes</span>>> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="kw">type </span>Error = Error; + <span class="kw">type </span>Item = <span class="macro-nonterminal">$result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>>>; + <span class="kw">type </span>Options = <span class="macro-nonterminal">$options</span>; + + <span class="kw">fn </span>read(source: <span class="kw">crate</span>::Copied<<span class="lifetime">'bytes</span>>, options: <span class="kw-2">&</span><span class="self">Self</span>::Options) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Item> { + <span class="kw">let </span><span class="kw-2">mut </span>source = <span class="kw">crate</span>::io::CopiedSource::from(source.<span class="number">0</span>); + <span class="self">Self</span>::do_read(<span class="kw-2">&mut </span>source, options) + } + } + + <span class="kw">impl </span><span class="kw">crate</span>::ReaderWithOptions<<span class="kw-2">&</span>::std::fs::File> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="kw">type </span>Error = Error; + <span class="kw">type </span>Item = <span class="macro-nonterminal">$result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>>>; + <span class="kw">type </span>Options = <span class="macro-nonterminal">$options</span>; + + <span class="kw">fn </span>read(source: <span class="kw-2">&</span>::std::fs::File, options: <span class="kw-2">&</span><span class="self">Self</span>::Options) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Item> { + <span class="kw">let </span><span class="kw-2">mut </span>source = <span class="kw">crate</span>::io::MappedSource::try_from(source)<span class="question-mark">?</span>; + <span class="self">Self</span>::do_read(<span class="kw-2">&mut </span>source, options) + } + } + + <span class="kw">impl </span><span class="kw">crate</span>::ReaderWithOptions<<span class="kw-2">&</span>::std::path::Path> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="kw">type </span>Error = Error; + <span class="kw">type </span>Item = <span class="macro-nonterminal">$result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>>>; + <span class="kw">type </span>Options = <span class="macro-nonterminal">$options</span>; + + <span class="kw">fn </span>read(source: <span class="kw-2">&</span>::std::path::Path, options: <span class="kw-2">&</span><span class="self">Self</span>::Options) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Item> { + <span class="kw">let </span>fd = ::std::fs::File::open(source)<span class="question-mark">?</span>; + <span class="self">Self</span>::read(<span class="kw-2">&</span>fd, options) + } + } + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>reader_with_options; + +<span class="macro">macro_rules! </span>bytes { + (<span class="macro-nonterminal">$this</span>:ident) => { + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="kw">crate</span>::Sealed <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> {} + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>as_bytes(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>[u8] { + <span class="self">self</span>.bytes.as_bytes() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>as_ptr(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">*const </span>u8 { + <span class="self">self</span>.bytes.as_ptr() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>into_owned(<span class="self">self</span>) -> <span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="attr">#[allow(clippy::needless_update)] + </span><span class="macro-nonterminal">$this </span>{ + bytes: <span class="self">self</span>.bytes.into_owned(), + ..<span class="self">self + </span>} + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>is_empty(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.bytes.is_empty() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>len(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="self">self</span>.bytes.len() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + } + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>bytes; + +<span class="macro">macro_rules! </span>compressable_bytes { + (<span class="macro-nonterminal">$this</span>:ident: <span class="macro-nonterminal">$options</span>:ident) => { + <span class="macro">crate::derive::bytes!</span>(<span class="macro-nonterminal">$this</span>); + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">pub fn </span>compress(<span class="kw-2">&</span><span class="self">self</span>, options: <span class="kw-2">&</span><span class="macro-nonterminal">$options</span>) -> <span class="prelude-ty">Result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>>> { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = ::std::vec::Vec::new(); + <span class="self">self</span>.compress_into(<span class="kw-2">&mut </span>bytes, options)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(<span class="self">self</span>.copy_with(CompressableBytes::from_owned( + bytes.into(), + <span class="prelude-val">Some</span>(<span class="self">self</span>.len()), + ))) + } + + <span class="kw">pub fn </span>decompress(<span class="kw-2">&</span><span class="self">self</span>, options: <span class="kw-2">&</span><span class="macro-nonterminal">$options</span>) -> <span class="prelude-ty">Result</span><<span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>>> { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = ::std::vec::Vec::new(); + <span class="self">self</span>.decompress_into(<span class="kw-2">&mut </span>bytes, options)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(<span class="self">self</span>.copy_with(CompressableBytes::from_owned(bytes.into(), <span class="prelude-val">None</span>))) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>decompressed_len(<span class="kw-2">&</span><span class="self">self</span>) -> ::core::option::Option<usize> { + <span class="self">self</span>.bytes.decompressed_len() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>is_compressed(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.bytes.is_compressed() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>is_decompressed(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + !<span class="self">self</span>.is_compressed() + } + + <span class="kw">pub fn </span>write<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out, options: <span class="kw-2">&</span><span class="macro-nonterminal">$options</span>) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>::core::marker::Sized + ::std::io::Write, + { + <span class="kw">if </span><span class="self">self</span>.is_compressed() { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = ::std::vec::Vec::new(); + <span class="self">self</span>.decompress_into(<span class="kw-2">&mut </span>bytes, options)<span class="question-mark">?</span>; + stream.write_all(<span class="kw-2">&</span>bytes)<span class="question-mark">?</span>; + } <span class="kw">else </span>{ + stream.write_all(<span class="self">self</span>.as_bytes())<span class="question-mark">?</span>; + } + + <span class="prelude-val">Ok</span>(()) + } + } + + <span class="attr">#[allow(clippy::needless_update)] + </span><span class="kw">impl</span><<span class="lifetime">'bytes</span>, <span class="kw">const </span>N: usize> <span class="kw">crate</span>::CompressableFrom<<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8; N]> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>from_compressed(value: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8; N], decompressed_len: usize) -> <span class="self">Self </span>{ + <span class="self">Self</span>::from_compressed(value.as_slice(), decompressed_len) + } + + <span class="kw">fn </span>from_decompressed(value: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8; N]) -> <span class="self">Self </span>{ + <span class="self">Self</span>::from_decompressed(value.as_slice()) + } + } + + <span class="attr">#[allow(clippy::needless_update)] + </span><span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="kw">crate</span>::CompressableFrom<<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>from_compressed(value: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8], decompressed_len: usize) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + bytes: CompressableBytes::from_borrowed(value, <span class="prelude-val">Some</span>(decompressed_len)), + ..Default::default() + } + } + + <span class="kw">fn </span>from_decompressed(value: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + bytes: CompressableBytes::from_borrowed(value, <span class="prelude-val">None</span>), + ..Default::default() + } + } + } + + <span class="attr">#[allow(clippy::needless_update)] + </span><span class="kw">impl </span><span class="kw">crate</span>::CompressableFrom<::std::boxed::Box<[u8]>> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="kw">fn </span>from_compressed(value: ::std::boxed::Box<[u8]>, decompressed_len: usize) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + bytes: CompressableBytes::from_owned(value, <span class="prelude-val">Some</span>(decompressed_len)), + ..Default::default() + } + } + + <span class="kw">fn </span>from_decompressed(value: ::std::boxed::Box<[u8]>) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + bytes: CompressableBytes::from_owned(value, <span class="prelude-val">None</span>), + ..Default::default() + } + } + } + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>compressable_bytes; + +<span class="macro">macro_rules! </span>key { + (<span class="macro-nonterminal">$this</span>:ident: <span class="macro-nonterminal">$hash</span>:ident) => { + <span class="doccomment">/// A key for indexing into the relevant mapping. + </span><span class="attr">#[derive(::core::clone::Clone, ::core::fmt::Debug, ::core::default::Default)] + </span><span class="kw">pub struct </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">pub</span>(<span class="kw">crate</span>) hash: <span class="macro-nonterminal">$hash</span>, + <span class="kw">pub</span>(<span class="kw">crate</span>) name: <span class="kw">crate</span>::containers::Bytes<<span class="lifetime">'bytes</span>>, + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>hash(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span><span class="macro-nonterminal">$hash </span>{ + <span class="kw-2">&</span><span class="self">self</span>.hash + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>name(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>::bstr::BStr { + ::bstr::BStr::new(<span class="self">self</span>.name.as_bytes()) + } + } + + <span class="comment">// false positive + </span><span class="attr">#[allow(clippy::unconditional_recursion)] + </span><span class="kw">impl</span><<span class="lifetime">'bytes</span>> ::core::cmp::PartialEq <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>eq(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> bool { + <span class="self">self</span>.hash.eq(<span class="kw-2">&</span>other.hash) + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> ::core::cmp::Eq <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> {} + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> ::core::cmp::PartialOrd <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>partial_cmp(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> ::core::option::Option<::core::cmp::Ordering> { + <span class="prelude-val">Some</span>(<span class="self">self</span>.cmp(other)) + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> ::core::cmp::Ord <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>cmp(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> ::core::cmp::Ordering { + <span class="self">self</span>.hash.cmp(<span class="kw-2">&</span>other.hash) + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> ::core::borrow::Borrow<<span class="macro-nonterminal">$hash</span>> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>borrow(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span><span class="macro-nonterminal">$hash </span>{ + <span class="kw-2">&</span><span class="self">self</span>.hash + } + } + + <span class="kw">impl </span>::core::convert::From<<span class="macro-nonterminal">$hash</span>> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> { + <span class="kw">fn </span>from(value: <span class="macro-nonterminal">$hash</span>) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + hash: value, + name: <span class="kw">crate</span>::containers::Bytes::default(), + } + } + } + + <span class="kw">impl</span><T> ::core::convert::From<T> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'static</span>> + <span class="kw">where + </span>T: ::core::convert::Into<::bstr::BString>, + { + <span class="kw">fn </span>from(value: T) -> <span class="self">Self </span>{ + <span class="kw">let </span><span class="kw-2">mut </span>name = value.into(); + <span class="kw">let </span>hash = <span class="self">Self</span>::hash_in_place(<span class="kw-2">&mut </span>name); + <span class="kw">let </span>v: Vec<u8> = name.into(); + <span class="self">Self </span>{ + hash, + name: <span class="kw">crate</span>::containers::Bytes::from_owned(v.into()), + } + } + } + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>key; + +<span class="macro">macro_rules! </span>mapping { + ( + $(<span class="attr">#[doc=<span class="macro-nonterminal">$doc</span>:literal]</span>)* + <span class="macro-nonterminal">$this</span>:ident + <span class="macro-nonterminal">$mapping</span>:ident: (<span class="macro-nonterminal">$key</span>:ident: <span class="macro-nonterminal">$hash</span>:ident) => <span class="macro-nonterminal">$value</span>:ident + ) => { + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">type </span><span class="macro-nonterminal">$mapping</span><<span class="lifetime">'bytes</span>> = + ::std::collections::BTreeMap<<span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>, <span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>>; + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="kw">crate</span>::Sealed <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> {} + + $(<span class="attr">#[doc=<span class="macro-nonterminal">$doc</span>]</span>)* + <span class="attr">#[derive(::core::clone::Clone, ::core::fmt::Debug, ::core::default::Default)] + </span><span class="kw">pub struct </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">pub</span>(<span class="kw">crate</span>) map: <span class="macro-nonterminal">$mapping</span><<span class="lifetime">'bytes</span>>, + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> <span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">pub fn </span>clear(<span class="kw-2">&mut </span><span class="self">self</span>) { + <span class="self">self</span>.map.clear(); + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>get<K>(<span class="kw-2">&</span><span class="self">self</span>, key: <span class="kw-2">&</span>K) -> ::core::option::Option<<span class="kw-2">&</span><span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>> + <span class="kw">where + </span>K: ::core::borrow::Borrow<<span class="macro-nonterminal">$hash</span>>, + { + <span class="self">self</span>.map.get(key.borrow()) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>get_key_value<K>( + <span class="kw-2">&</span><span class="self">self</span>, + key: <span class="kw-2">&</span>K, + ) -> ::core::option::Option<(<span class="kw-2">&</span><span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>, <span class="kw-2">&</span><span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>)> + <span class="kw">where + </span>K: ::core::borrow::Borrow<<span class="macro-nonterminal">$hash</span>>, + { + <span class="self">self</span>.map.get_key_value(key.borrow()) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>get_mut<K>(<span class="kw-2">&mut </span><span class="self">self</span>, key: <span class="kw-2">&</span>K) -> ::core::option::Option<<span class="kw-2">&mut </span><span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>> + <span class="kw">where + </span>K: ::core::borrow::Borrow<<span class="macro-nonterminal">$hash</span>>, + { + <span class="self">self</span>.map.get_mut(key.borrow()) + } + + <span class="kw">pub fn </span>insert<K>( + <span class="kw-2">&mut </span><span class="self">self</span>, + key: K, + value: <span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>, + ) -> ::core::option::Option<<span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>> + <span class="kw">where + </span>K: ::core::convert::Into<<span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>>, + { + <span class="self">self</span>.map.insert(key.into(), value) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>is_empty(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.map.is_empty() + } + + <span class="kw">pub fn </span>iter( + <span class="kw-2">&</span><span class="self">self</span>, + ) -> <span class="kw">impl </span>::core::iter::Iterator<Item = (<span class="kw-2">&</span><span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>, <span class="kw-2">&</span><span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>)> { + <span class="self">self</span>.map.iter() + } + + <span class="kw">pub fn </span>iter_mut( + <span class="kw-2">&mut </span><span class="self">self</span>, + ) -> <span class="kw">impl </span>::core::iter::Iterator<Item = (<span class="kw-2">&</span><span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>, <span class="kw-2">&mut </span><span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>)> { + <span class="self">self</span>.map.iter_mut() + } + + <span class="kw">pub fn </span>keys(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw">impl </span>::core::iter::Iterator<Item = <span class="kw-2">&</span><span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>> { + <span class="self">self</span>.map.keys() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>len(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="self">self</span>.map.len() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + + <span class="kw">pub fn </span>remove<K>(<span class="kw-2">&mut </span><span class="self">self</span>, key: <span class="kw-2">&</span>K) -> ::core::option::Option<<span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>> + <span class="kw">where + </span>K: ::core::borrow::Borrow<<span class="macro-nonterminal">$hash</span>>, + { + <span class="self">self</span>.map.remove(key.borrow()) + } + + <span class="kw">pub fn </span>remove_entry<K>( + <span class="kw-2">&mut </span><span class="self">self</span>, + key: <span class="kw-2">&</span>K, + ) -> ::core::option::Option<(<span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>, <span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>)> + <span class="kw">where + </span>K: ::core::borrow::Borrow<<span class="macro-nonterminal">$hash</span>>, + { + <span class="self">self</span>.map.remove_entry(key.borrow()) + } + + <span class="kw">pub fn </span>values(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw">impl </span>::core::iter::Iterator<Item = <span class="kw-2">&</span><span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>> { + <span class="self">self</span>.map.values() + } + + <span class="kw">pub fn </span>values_mut( + <span class="kw-2">&mut </span><span class="self">self</span>, + ) -> <span class="kw">impl </span>::core::iter::Iterator<Item = <span class="kw-2">&mut </span><span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>> { + <span class="self">self</span>.map.values_mut() + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> ::core::iter::FromIterator<(<span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>, <span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>)> <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>from_iter<T>(iter: T) -> <span class="self">Self + </span><span class="kw">where + </span>T: ::core::iter::IntoIterator<Item = (<span class="macro-nonterminal">$key</span><<span class="lifetime">'bytes</span>>, <span class="macro-nonterminal">$value</span><<span class="lifetime">'bytes</span>>)>, + { + <span class="self">Self </span>{ + map: iter.into_iter().collect(), + } + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> ::core::iter::IntoIterator <span class="kw">for </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Item = <<span class="macro-nonterminal">$mapping</span><<span class="lifetime">'bytes</span>> <span class="kw">as </span>::core::iter::IntoIterator>::Item; + <span class="kw">type </span>IntoIter = <<span class="macro-nonterminal">$mapping</span><<span class="lifetime">'bytes</span>> <span class="kw">as </span>::core::iter::IntoIterator>::IntoIter; + + <span class="kw">fn </span>into_iter(<span class="self">self</span>) -> <span class="self">Self</span>::IntoIter { + <span class="self">self</span>.map.into_iter() + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>, <span class="lifetime">'this</span>> ::core::iter::IntoIterator <span class="kw">for </span><span class="kw-2">&</span><span class="lifetime">'this </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Item = <<span class="kw-2">&</span><span class="lifetime">'this </span><span class="macro-nonterminal">$mapping</span><<span class="lifetime">'bytes</span>> <span class="kw">as </span>::core::iter::IntoIterator>::Item; + <span class="kw">type </span>IntoIter = <<span class="kw-2">&</span><span class="lifetime">'this </span><span class="macro-nonterminal">$mapping</span><<span class="lifetime">'bytes</span>> <span class="kw">as </span>::core::iter::IntoIterator>::IntoIter; + + <span class="kw">fn </span>into_iter(<span class="self">self</span>) -> <span class="self">Self</span>::IntoIter { + <span class="self">self</span>.map.iter() + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>, <span class="lifetime">'this</span>> ::core::iter::IntoIterator <span class="kw">for </span><span class="kw-2">&</span><span class="lifetime">'this </span><span class="kw-2">mut </span><span class="macro-nonterminal">$this</span><<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Item = <<span class="kw-2">&</span><span class="lifetime">'this </span><span class="kw-2">mut </span><span class="macro-nonterminal">$mapping</span><<span class="lifetime">'bytes</span>> <span class="kw">as </span>::core::iter::IntoIterator>::Item; + <span class="kw">type </span>IntoIter = <<span class="kw-2">&</span><span class="lifetime">'this </span><span class="kw-2">mut </span><span class="macro-nonterminal">$mapping</span><<span class="lifetime">'bytes</span>> <span class="kw">as </span>::core::iter::IntoIterator>::IntoIter; + + <span class="kw">fn </span>into_iter(<span class="self">self</span>) -> <span class="self">Self</span>::IntoIter { + <span class="self">self</span>.map.iter_mut() + } + } + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>mapping; + +<span class="macro">macro_rules! </span>archive { + ( + $(<span class="attr">#[doc=<span class="macro-nonterminal">$doc</span>:literal]</span>)* + <span class="macro-nonterminal">$this</span>:ident => <span class="macro-nonterminal">$result</span>:ident + <span class="macro-nonterminal">$mapping</span>:ident: (<span class="macro-nonterminal">$key</span>:ident: <span class="macro-nonterminal">$hash</span>:ident) => <span class="macro-nonterminal">$value</span>:ident + ) => { + <span class="macro">crate::derive::mapping! </span>{ + $(<span class="attr">#[doc=<span class="macro-nonterminal">$doc</span>]</span>)* + <span class="macro-nonterminal">$this + $mapping</span>: (<span class="macro-nonterminal">$key</span>: <span class="macro-nonterminal">$hash</span>) => <span class="macro-nonterminal">$value + </span>} + <span class="macro">crate::derive::reader!</span>(<span class="macro-nonterminal">$this </span>=> <span class="macro-nonterminal">$result</span>); + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>archive; + +<span class="macro">macro_rules! </span>hash { + (<span class="macro-nonterminal">$this</span>:ident) => { + <span class="doccomment">/// See also [`struct@Hash`]. + </span><span class="attr">#[derive(Clone, Copy, Debug, Default, Eq, Ord, PartialEq, PartialOrd)] + #[repr(transparent)] + </span><span class="kw">pub struct </span><span class="macro-nonterminal">$this</span>(Hash); + + <span class="kw">impl </span><span class="macro-nonterminal">$this </span>{ + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + } + + <span class="kw">impl </span>::core::convert::AsMut<Hash> <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>as_mut(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="kw-2">&mut </span>Hash { + <span class="kw-2">&mut </span><span class="self">self</span>.<span class="number">0 + </span>} + } + + <span class="kw">impl </span>::core::convert::AsRef<Hash> <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>as_ref(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>Hash { + <span class="kw-2">&</span><span class="self">self</span>.<span class="number">0 + </span>} + } + + <span class="kw">impl </span>::core::borrow::Borrow<Hash> <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>borrow(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>Hash { + <span class="kw-2">&</span><span class="self">self</span>.<span class="number">0 + </span>} + } + + <span class="kw">impl </span>::core::borrow::BorrowMut<Hash> <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>borrow_mut(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="kw-2">&mut </span>Hash { + <span class="kw-2">&mut </span><span class="self">self</span>.<span class="number">0 + </span>} + } + + <span class="kw">impl </span>::core::ops::Deref <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">type </span>Target = Hash; + + <span class="kw">fn </span>deref(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span><span class="self">Self</span>::Target { + <span class="kw-2">&</span><span class="self">self</span>.<span class="number">0 + </span>} + } + + <span class="kw">impl </span>::core::ops::DerefMut <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>deref_mut(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="kw-2">&mut </span><span class="self">Self</span>::Target { + <span class="kw-2">&mut </span><span class="self">self</span>.<span class="number">0 + </span>} + } + + <span class="kw">impl </span>::core::convert::From<Hash> <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>from(value: Hash) -> <span class="self">Self </span>{ + <span class="self">Self</span>(value) + } + } + + <span class="kw">impl </span>::core::convert::From<<span class="macro-nonterminal">$this</span>> <span class="kw">for </span>Hash { + <span class="kw">fn </span>from(value: <span class="macro-nonterminal">$this</span>) -> <span class="self">Self </span>{ + value.<span class="number">0 + </span>} + } + + <span class="kw">impl </span>::core::cmp::PartialEq<Hash> <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>eq(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span>Hash) -> bool { + <span class="self">self</span>.<span class="number">0</span>.eq(other) + } + } + + <span class="kw">impl </span>::core::cmp::PartialEq<<span class="macro-nonterminal">$this</span>> <span class="kw">for </span>Hash { + <span class="kw">fn </span>eq(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="macro-nonterminal">$this</span>) -> bool { + <span class="self">self</span>.eq(<span class="kw-2">&</span>other.<span class="number">0</span>) + } + } + + <span class="kw">impl </span>::core::cmp::PartialOrd<Hash> <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>partial_cmp(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span>Hash) -> ::core::option::Option<::core::cmp::Ordering> { + <span class="self">self</span>.<span class="number">0</span>.partial_cmp(other) + } + } + + <span class="kw">impl </span>::core::cmp::PartialOrd<<span class="macro-nonterminal">$this</span>> <span class="kw">for </span>Hash { + <span class="kw">fn </span>partial_cmp(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="macro-nonterminal">$this</span>) -> ::core::option::Option<::core::cmp::Ordering> { + <span class="self">self</span>.partial_cmp(<span class="kw-2">&</span>other.<span class="number">0</span>) + } + } + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>hash; +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/fo4/archive.rs.html b/src/ba2/fo4/archive.rs.html new file mode 100644 index 0000000..7e6db80 --- /dev/null +++ b/src/ba2/fo4/archive.rs.html @@ -0,0 +1,2471 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/fo4/archive.rs`."><title>archive.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +<a href="#285" id="285">285</a> +<a href="#286" id="286">286</a> +<a href="#287" id="287">287</a> +<a href="#288" id="288">288</a> +<a href="#289" id="289">289</a> +<a href="#290" id="290">290</a> +<a href="#291" id="291">291</a> +<a href="#292" id="292">292</a> +<a href="#293" id="293">293</a> +<a href="#294" id="294">294</a> +<a href="#295" id="295">295</a> +<a href="#296" id="296">296</a> +<a href="#297" id="297">297</a> +<a href="#298" id="298">298</a> +<a href="#299" id="299">299</a> +<a href="#300" id="300">300</a> +<a href="#301" id="301">301</a> +<a href="#302" id="302">302</a> +<a href="#303" id="303">303</a> +<a href="#304" id="304">304</a> +<a href="#305" id="305">305</a> +<a href="#306" id="306">306</a> +<a href="#307" id="307">307</a> +<a href="#308" id="308">308</a> +<a href="#309" id="309">309</a> +<a href="#310" id="310">310</a> +<a href="#311" id="311">311</a> +<a href="#312" id="312">312</a> +<a href="#313" id="313">313</a> +<a href="#314" id="314">314</a> +<a href="#315" id="315">315</a> +<a href="#316" id="316">316</a> +<a href="#317" id="317">317</a> +<a href="#318" id="318">318</a> +<a href="#319" id="319">319</a> +<a href="#320" id="320">320</a> +<a href="#321" id="321">321</a> +<a href="#322" id="322">322</a> +<a href="#323" id="323">323</a> +<a href="#324" id="324">324</a> +<a href="#325" id="325">325</a> +<a href="#326" id="326">326</a> +<a href="#327" id="327">327</a> +<a href="#328" id="328">328</a> +<a href="#329" id="329">329</a> +<a href="#330" id="330">330</a> +<a href="#331" id="331">331</a> +<a href="#332" id="332">332</a> +<a href="#333" id="333">333</a> +<a href="#334" id="334">334</a> +<a href="#335" id="335">335</a> +<a href="#336" id="336">336</a> +<a href="#337" id="337">337</a> +<a href="#338" id="338">338</a> +<a href="#339" id="339">339</a> +<a href="#340" id="340">340</a> +<a href="#341" id="341">341</a> +<a href="#342" id="342">342</a> +<a href="#343" id="343">343</a> +<a href="#344" id="344">344</a> +<a href="#345" id="345">345</a> +<a href="#346" id="346">346</a> +<a href="#347" id="347">347</a> +<a href="#348" id="348">348</a> +<a href="#349" id="349">349</a> +<a href="#350" id="350">350</a> +<a href="#351" id="351">351</a> +<a href="#352" id="352">352</a> +<a href="#353" id="353">353</a> +<a href="#354" id="354">354</a> +<a href="#355" id="355">355</a> +<a href="#356" id="356">356</a> +<a href="#357" id="357">357</a> +<a href="#358" id="358">358</a> +<a href="#359" id="359">359</a> +<a href="#360" id="360">360</a> +<a href="#361" id="361">361</a> +<a href="#362" id="362">362</a> +<a href="#363" id="363">363</a> +<a href="#364" id="364">364</a> +<a href="#365" id="365">365</a> +<a href="#366" id="366">366</a> +<a href="#367" id="367">367</a> +<a href="#368" id="368">368</a> +<a href="#369" id="369">369</a> +<a href="#370" id="370">370</a> +<a href="#371" id="371">371</a> +<a href="#372" id="372">372</a> +<a href="#373" id="373">373</a> +<a href="#374" id="374">374</a> +<a href="#375" id="375">375</a> +<a href="#376" id="376">376</a> +<a href="#377" id="377">377</a> +<a href="#378" id="378">378</a> +<a href="#379" id="379">379</a> +<a href="#380" id="380">380</a> +<a href="#381" id="381">381</a> +<a href="#382" id="382">382</a> +<a href="#383" id="383">383</a> +<a href="#384" id="384">384</a> +<a href="#385" id="385">385</a> +<a href="#386" id="386">386</a> +<a href="#387" id="387">387</a> +<a href="#388" id="388">388</a> +<a href="#389" id="389">389</a> +<a href="#390" id="390">390</a> +<a href="#391" id="391">391</a> +<a href="#392" id="392">392</a> +<a href="#393" id="393">393</a> +<a href="#394" id="394">394</a> +<a href="#395" id="395">395</a> +<a href="#396" id="396">396</a> +<a href="#397" id="397">397</a> +<a href="#398" id="398">398</a> +<a href="#399" id="399">399</a> +<a href="#400" id="400">400</a> +<a href="#401" id="401">401</a> +<a href="#402" id="402">402</a> +<a href="#403" id="403">403</a> +<a href="#404" id="404">404</a> +<a href="#405" id="405">405</a> +<a href="#406" id="406">406</a> +<a href="#407" id="407">407</a> +<a href="#408" id="408">408</a> +<a href="#409" id="409">409</a> +<a href="#410" id="410">410</a> +<a href="#411" id="411">411</a> +<a href="#412" id="412">412</a> +<a href="#413" id="413">413</a> +<a href="#414" id="414">414</a> +<a href="#415" id="415">415</a> +<a href="#416" id="416">416</a> +<a href="#417" id="417">417</a> +<a href="#418" id="418">418</a> +<a href="#419" id="419">419</a> +<a href="#420" id="420">420</a> +<a href="#421" id="421">421</a> +<a href="#422" id="422">422</a> +<a href="#423" id="423">423</a> +<a href="#424" id="424">424</a> +<a href="#425" id="425">425</a> +<a href="#426" id="426">426</a> +<a href="#427" id="427">427</a> +<a href="#428" id="428">428</a> +<a href="#429" id="429">429</a> +<a href="#430" id="430">430</a> +<a href="#431" id="431">431</a> +<a href="#432" id="432">432</a> +<a href="#433" id="433">433</a> +<a href="#434" id="434">434</a> +<a href="#435" id="435">435</a> +<a href="#436" id="436">436</a> +<a href="#437" id="437">437</a> +<a href="#438" id="438">438</a> +<a href="#439" id="439">439</a> +<a href="#440" id="440">440</a> +<a href="#441" id="441">441</a> +<a href="#442" id="442">442</a> +<a href="#443" id="443">443</a> +<a href="#444" id="444">444</a> +<a href="#445" id="445">445</a> +<a href="#446" id="446">446</a> +<a href="#447" id="447">447</a> +<a href="#448" id="448">448</a> +<a href="#449" id="449">449</a> +<a href="#450" id="450">450</a> +<a href="#451" id="451">451</a> +<a href="#452" id="452">452</a> +<a href="#453" id="453">453</a> +<a href="#454" id="454">454</a> +<a href="#455" id="455">455</a> +<a href="#456" id="456">456</a> +<a href="#457" id="457">457</a> +<a href="#458" id="458">458</a> +<a href="#459" id="459">459</a> +<a href="#460" id="460">460</a> +<a href="#461" id="461">461</a> +<a href="#462" id="462">462</a> +<a href="#463" id="463">463</a> +<a href="#464" id="464">464</a> +<a href="#465" id="465">465</a> +<a href="#466" id="466">466</a> +<a href="#467" id="467">467</a> +<a href="#468" id="468">468</a> +<a href="#469" id="469">469</a> +<a href="#470" id="470">470</a> +<a href="#471" id="471">471</a> +<a href="#472" id="472">472</a> +<a href="#473" id="473">473</a> +<a href="#474" id="474">474</a> +<a href="#475" id="475">475</a> +<a href="#476" id="476">476</a> +<a href="#477" id="477">477</a> +<a href="#478" id="478">478</a> +<a href="#479" id="479">479</a> +<a href="#480" id="480">480</a> +<a href="#481" id="481">481</a> +<a href="#482" id="482">482</a> +<a href="#483" id="483">483</a> +<a href="#484" id="484">484</a> +<a href="#485" id="485">485</a> +<a href="#486" id="486">486</a> +<a href="#487" id="487">487</a> +<a href="#488" id="488">488</a> +<a href="#489" id="489">489</a> +<a href="#490" id="490">490</a> +<a href="#491" id="491">491</a> +<a href="#492" id="492">492</a> +<a href="#493" id="493">493</a> +<a href="#494" id="494">494</a> +<a href="#495" id="495">495</a> +<a href="#496" id="496">496</a> +<a href="#497" id="497">497</a> +<a href="#498" id="498">498</a> +<a href="#499" id="499">499</a> +<a href="#500" id="500">500</a> +<a href="#501" id="501">501</a> +<a href="#502" id="502">502</a> +<a href="#503" id="503">503</a> +<a href="#504" id="504">504</a> +<a href="#505" id="505">505</a> +<a href="#506" id="506">506</a> +<a href="#507" id="507">507</a> +<a href="#508" id="508">508</a> +<a href="#509" id="509">509</a> +<a href="#510" id="510">510</a> +<a href="#511" id="511">511</a> +<a href="#512" id="512">512</a> +<a href="#513" id="513">513</a> +<a href="#514" id="514">514</a> +<a href="#515" id="515">515</a> +<a href="#516" id="516">516</a> +<a href="#517" id="517">517</a> +<a href="#518" id="518">518</a> +<a href="#519" id="519">519</a> +<a href="#520" id="520">520</a> +<a href="#521" id="521">521</a> +<a href="#522" id="522">522</a> +<a href="#523" id="523">523</a> +<a href="#524" id="524">524</a> +<a href="#525" id="525">525</a> +<a href="#526" id="526">526</a> +<a href="#527" id="527">527</a> +<a href="#528" id="528">528</a> +<a href="#529" id="529">529</a> +<a href="#530" id="530">530</a> +<a href="#531" id="531">531</a> +<a href="#532" id="532">532</a> +<a href="#533" id="533">533</a> +<a href="#534" id="534">534</a> +<a href="#535" id="535">535</a> +<a href="#536" id="536">536</a> +<a href="#537" id="537">537</a> +<a href="#538" id="538">538</a> +<a href="#539" id="539">539</a> +<a href="#540" id="540">540</a> +<a href="#541" id="541">541</a> +<a href="#542" id="542">542</a> +<a href="#543" id="543">543</a> +<a href="#544" id="544">544</a> +<a href="#545" id="545">545</a> +<a href="#546" id="546">546</a> +<a href="#547" id="547">547</a> +<a href="#548" id="548">548</a> +<a href="#549" id="549">549</a> +<a href="#550" id="550">550</a> +<a href="#551" id="551">551</a> +<a href="#552" id="552">552</a> +<a href="#553" id="553">553</a> +<a href="#554" id="554">554</a> +<a href="#555" id="555">555</a> +<a href="#556" id="556">556</a> +<a href="#557" id="557">557</a> +<a href="#558" id="558">558</a> +<a href="#559" id="559">559</a> +<a href="#560" id="560">560</a> +<a href="#561" id="561">561</a> +<a href="#562" id="562">562</a> +<a href="#563" id="563">563</a> +<a href="#564" id="564">564</a> +<a href="#565" id="565">565</a> +<a href="#566" id="566">566</a> +<a href="#567" id="567">567</a> +<a href="#568" id="568">568</a> +<a href="#569" id="569">569</a> +<a href="#570" id="570">570</a> +<a href="#571" id="571">571</a> +<a href="#572" id="572">572</a> +<a href="#573" id="573">573</a> +<a href="#574" id="574">574</a> +<a href="#575" id="575">575</a> +<a href="#576" id="576">576</a> +<a href="#577" id="577">577</a> +<a href="#578" id="578">578</a> +<a href="#579" id="579">579</a> +<a href="#580" id="580">580</a> +<a href="#581" id="581">581</a> +<a href="#582" id="582">582</a> +<a href="#583" id="583">583</a> +<a href="#584" id="584">584</a> +<a href="#585" id="585">585</a> +<a href="#586" id="586">586</a> +<a href="#587" id="587">587</a> +<a href="#588" id="588">588</a> +<a href="#589" id="589">589</a> +<a href="#590" id="590">590</a> +<a href="#591" id="591">591</a> +<a href="#592" id="592">592</a> +<a href="#593" id="593">593</a> +<a href="#594" id="594">594</a> +<a href="#595" id="595">595</a> +<a href="#596" id="596">596</a> +<a href="#597" id="597">597</a> +<a href="#598" id="598">598</a> +<a href="#599" id="599">599</a> +<a href="#600" id="600">600</a> +<a href="#601" id="601">601</a> +<a href="#602" id="602">602</a> +<a href="#603" id="603">603</a> +<a href="#604" id="604">604</a> +<a href="#605" id="605">605</a> +<a href="#606" id="606">606</a> +<a href="#607" id="607">607</a> +<a href="#608" id="608">608</a> +<a href="#609" id="609">609</a> +<a href="#610" id="610">610</a> +<a href="#611" id="611">611</a> +<a href="#612" id="612">612</a> +<a href="#613" id="613">613</a> +<a href="#614" id="614">614</a> +<a href="#615" id="615">615</a> +<a href="#616" id="616">616</a> +<a href="#617" id="617">617</a> +<a href="#618" id="618">618</a> +<a href="#619" id="619">619</a> +<a href="#620" id="620">620</a> +<a href="#621" id="621">621</a> +<a href="#622" id="622">622</a> +<a href="#623" id="623">623</a> +<a href="#624" id="624">624</a> +<a href="#625" id="625">625</a> +<a href="#626" id="626">626</a> +<a href="#627" id="627">627</a> +<a href="#628" id="628">628</a> +<a href="#629" id="629">629</a> +<a href="#630" id="630">630</a> +<a href="#631" id="631">631</a> +<a href="#632" id="632">632</a> +<a href="#633" id="633">633</a> +<a href="#634" id="634">634</a> +<a href="#635" id="635">635</a> +<a href="#636" id="636">636</a> +<a href="#637" id="637">637</a> +<a href="#638" id="638">638</a> +<a href="#639" id="639">639</a> +<a href="#640" id="640">640</a> +<a href="#641" id="641">641</a> +<a href="#642" id="642">642</a> +<a href="#643" id="643">643</a> +<a href="#644" id="644">644</a> +<a href="#645" id="645">645</a> +<a href="#646" id="646">646</a> +<a href="#647" id="647">647</a> +<a href="#648" id="648">648</a> +<a href="#649" id="649">649</a> +<a href="#650" id="650">650</a> +<a href="#651" id="651">651</a> +<a href="#652" id="652">652</a> +<a href="#653" id="653">653</a> +<a href="#654" id="654">654</a> +<a href="#655" id="655">655</a> +<a href="#656" id="656">656</a> +<a href="#657" id="657">657</a> +<a href="#658" id="658">658</a> +<a href="#659" id="659">659</a> +<a href="#660" id="660">660</a> +<a href="#661" id="661">661</a> +<a href="#662" id="662">662</a> +<a href="#663" id="663">663</a> +<a href="#664" id="664">664</a> +<a href="#665" id="665">665</a> +<a href="#666" id="666">666</a> +<a href="#667" id="667">667</a> +<a href="#668" id="668">668</a> +<a href="#669" id="669">669</a> +<a href="#670" id="670">670</a> +<a href="#671" id="671">671</a> +<a href="#672" id="672">672</a> +<a href="#673" id="673">673</a> +<a href="#674" id="674">674</a> +<a href="#675" id="675">675</a> +<a href="#676" id="676">676</a> +<a href="#677" id="677">677</a> +<a href="#678" id="678">678</a> +<a href="#679" id="679">679</a> +<a href="#680" id="680">680</a> +<a href="#681" id="681">681</a> +<a href="#682" id="682">682</a> +<a href="#683" id="683">683</a> +<a href="#684" id="684">684</a> +<a href="#685" id="685">685</a> +<a href="#686" id="686">686</a> +<a href="#687" id="687">687</a> +<a href="#688" id="688">688</a> +<a href="#689" id="689">689</a> +<a href="#690" id="690">690</a> +<a href="#691" id="691">691</a> +<a href="#692" id="692">692</a> +<a href="#693" id="693">693</a> +<a href="#694" id="694">694</a> +<a href="#695" id="695">695</a> +<a href="#696" id="696">696</a> +<a href="#697" id="697">697</a> +<a href="#698" id="698">698</a> +<a href="#699" id="699">699</a> +<a href="#700" id="700">700</a> +<a href="#701" id="701">701</a> +<a href="#702" id="702">702</a> +<a href="#703" id="703">703</a> +<a href="#704" id="704">704</a> +<a href="#705" id="705">705</a> +<a href="#706" id="706">706</a> +<a href="#707" id="707">707</a> +<a href="#708" id="708">708</a> +<a href="#709" id="709">709</a> +<a href="#710" id="710">710</a> +<a href="#711" id="711">711</a> +<a href="#712" id="712">712</a> +<a href="#713" id="713">713</a> +<a href="#714" id="714">714</a> +<a href="#715" id="715">715</a> +<a href="#716" id="716">716</a> +<a href="#717" id="717">717</a> +<a href="#718" id="718">718</a> +<a href="#719" id="719">719</a> +<a href="#720" id="720">720</a> +<a href="#721" id="721">721</a> +<a href="#722" id="722">722</a> +<a href="#723" id="723">723</a> +<a href="#724" id="724">724</a> +<a href="#725" id="725">725</a> +<a href="#726" id="726">726</a> +<a href="#727" id="727">727</a> +<a href="#728" id="728">728</a> +<a href="#729" id="729">729</a> +<a href="#730" id="730">730</a> +<a href="#731" id="731">731</a> +<a href="#732" id="732">732</a> +<a href="#733" id="733">733</a> +<a href="#734" id="734">734</a> +<a href="#735" id="735">735</a> +<a href="#736" id="736">736</a> +<a href="#737" id="737">737</a> +<a href="#738" id="738">738</a> +<a href="#739" id="739">739</a> +<a href="#740" id="740">740</a> +<a href="#741" id="741">741</a> +<a href="#742" id="742">742</a> +<a href="#743" id="743">743</a> +<a href="#744" id="744">744</a> +<a href="#745" id="745">745</a> +<a href="#746" id="746">746</a> +<a href="#747" id="747">747</a> +<a href="#748" id="748">748</a> +<a href="#749" id="749">749</a> +<a href="#750" id="750">750</a> +<a href="#751" id="751">751</a> +<a href="#752" id="752">752</a> +<a href="#753" id="753">753</a> +<a href="#754" id="754">754</a> +<a href="#755" id="755">755</a> +<a href="#756" id="756">756</a> +<a href="#757" id="757">757</a> +<a href="#758" id="758">758</a> +<a href="#759" id="759">759</a> +<a href="#760" id="760">760</a> +<a href="#761" id="761">761</a> +<a href="#762" id="762">762</a> +<a href="#763" id="763">763</a> +<a href="#764" id="764">764</a> +<a href="#765" id="765">765</a> +<a href="#766" id="766">766</a> +<a href="#767" id="767">767</a> +<a href="#768" id="768">768</a> +<a href="#769" id="769">769</a> +<a href="#770" id="770">770</a> +<a href="#771" id="771">771</a> +<a href="#772" id="772">772</a> +<a href="#773" id="773">773</a> +<a href="#774" id="774">774</a> +<a href="#775" id="775">775</a> +<a href="#776" id="776">776</a> +<a href="#777" id="777">777</a> +<a href="#778" id="778">778</a> +<a href="#779" id="779">779</a> +<a href="#780" id="780">780</a> +<a href="#781" id="781">781</a> +<a href="#782" id="782">782</a> +<a href="#783" id="783">783</a> +<a href="#784" id="784">784</a> +<a href="#785" id="785">785</a> +<a href="#786" id="786">786</a> +<a href="#787" id="787">787</a> +<a href="#788" id="788">788</a> +<a href="#789" id="789">789</a> +<a href="#790" id="790">790</a> +<a href="#791" id="791">791</a> +<a href="#792" id="792">792</a> +<a href="#793" id="793">793</a> +<a href="#794" id="794">794</a> +<a href="#795" id="795">795</a> +<a href="#796" id="796">796</a> +<a href="#797" id="797">797</a> +<a href="#798" id="798">798</a> +<a href="#799" id="799">799</a> +<a href="#800" id="800">800</a> +<a href="#801" id="801">801</a> +<a href="#802" id="802">802</a> +<a href="#803" id="803">803</a> +<a href="#804" id="804">804</a> +<a href="#805" id="805">805</a> +<a href="#806" id="806">806</a> +<a href="#807" id="807">807</a> +<a href="#808" id="808">808</a> +<a href="#809" id="809">809</a> +<a href="#810" id="810">810</a> +<a href="#811" id="811">811</a> +<a href="#812" id="812">812</a> +<a href="#813" id="813">813</a> +<a href="#814" id="814">814</a> +<a href="#815" id="815">815</a> +<a href="#816" id="816">816</a> +<a href="#817" id="817">817</a> +<a href="#818" id="818">818</a> +<a href="#819" id="819">819</a> +<a href="#820" id="820">820</a> +<a href="#821" id="821">821</a> +<a href="#822" id="822">822</a> +<a href="#823" id="823">823</a> +<a href="#824" id="824">824</a> +<a href="#825" id="825">825</a> +<a href="#826" id="826">826</a> +<a href="#827" id="827">827</a> +<a href="#828" id="828">828</a> +<a href="#829" id="829">829</a> +<a href="#830" id="830">830</a> +<a href="#831" id="831">831</a> +<a href="#832" id="832">832</a> +<a href="#833" id="833">833</a> +<a href="#834" id="834">834</a> +<a href="#835" id="835">835</a> +<a href="#836" id="836">836</a> +<a href="#837" id="837">837</a> +<a href="#838" id="838">838</a> +<a href="#839" id="839">839</a> +<a href="#840" id="840">840</a> +<a href="#841" id="841">841</a> +<a href="#842" id="842">842</a> +<a href="#843" id="843">843</a> +<a href="#844" id="844">844</a> +<a href="#845" id="845">845</a> +<a href="#846" id="846">846</a> +<a href="#847" id="847">847</a> +<a href="#848" id="848">848</a> +<a href="#849" id="849">849</a> +<a href="#850" id="850">850</a> +<a href="#851" id="851">851</a> +<a href="#852" id="852">852</a> +<a href="#853" id="853">853</a> +<a href="#854" id="854">854</a> +<a href="#855" id="855">855</a> +<a href="#856" id="856">856</a> +<a href="#857" id="857">857</a> +<a href="#858" id="858">858</a> +<a href="#859" id="859">859</a> +<a href="#860" id="860">860</a> +<a href="#861" id="861">861</a> +<a href="#862" id="862">862</a> +<a href="#863" id="863">863</a> +<a href="#864" id="864">864</a> +<a href="#865" id="865">865</a> +<a href="#866" id="866">866</a> +<a href="#867" id="867">867</a> +<a href="#868" id="868">868</a> +<a href="#869" id="869">869</a> +<a href="#870" id="870">870</a> +<a href="#871" id="871">871</a> +<a href="#872" id="872">872</a> +<a href="#873" id="873">873</a> +<a href="#874" id="874">874</a> +<a href="#875" id="875">875</a> +<a href="#876" id="876">876</a> +<a href="#877" id="877">877</a> +<a href="#878" id="878">878</a> +<a href="#879" id="879">879</a> +<a href="#880" id="880">880</a> +<a href="#881" id="881">881</a> +<a href="#882" id="882">882</a> +<a href="#883" id="883">883</a> +<a href="#884" id="884">884</a> +<a href="#885" id="885">885</a> +<a href="#886" id="886">886</a> +<a href="#887" id="887">887</a> +<a href="#888" id="888">888</a> +<a href="#889" id="889">889</a> +<a href="#890" id="890">890</a> +<a href="#891" id="891">891</a> +<a href="#892" id="892">892</a> +<a href="#893" id="893">893</a> +<a href="#894" id="894">894</a> +<a href="#895" id="895">895</a> +<a href="#896" id="896">896</a> +<a href="#897" id="897">897</a> +<a href="#898" id="898">898</a> +<a href="#899" id="899">899</a> +<a href="#900" id="900">900</a> +<a href="#901" id="901">901</a> +<a href="#902" id="902">902</a> +<a href="#903" id="903">903</a> +<a href="#904" id="904">904</a> +<a href="#905" id="905">905</a> +<a href="#906" id="906">906</a> +<a href="#907" id="907">907</a> +<a href="#908" id="908">908</a> +<a href="#909" id="909">909</a> +<a href="#910" id="910">910</a> +<a href="#911" id="911">911</a> +<a href="#912" id="912">912</a> +<a href="#913" id="913">913</a> +<a href="#914" id="914">914</a> +<a href="#915" id="915">915</a> +<a href="#916" id="916">916</a> +<a href="#917" id="917">917</a> +<a href="#918" id="918">918</a> +<a href="#919" id="919">919</a> +<a href="#920" id="920">920</a> +<a href="#921" id="921">921</a> +<a href="#922" id="922">922</a> +<a href="#923" id="923">923</a> +<a href="#924" id="924">924</a> +<a href="#925" id="925">925</a> +<a href="#926" id="926">926</a> +<a href="#927" id="927">927</a> +<a href="#928" id="928">928</a> +<a href="#929" id="929">929</a> +<a href="#930" id="930">930</a> +<a href="#931" id="931">931</a> +<a href="#932" id="932">932</a> +<a href="#933" id="933">933</a> +<a href="#934" id="934">934</a> +<a href="#935" id="935">935</a> +<a href="#936" id="936">936</a> +<a href="#937" id="937">937</a> +<a href="#938" id="938">938</a> +<a href="#939" id="939">939</a> +<a href="#940" id="940">940</a> +<a href="#941" id="941">941</a> +<a href="#942" id="942">942</a> +<a href="#943" id="943">943</a> +<a href="#944" id="944">944</a> +<a href="#945" id="945">945</a> +<a href="#946" id="946">946</a> +<a href="#947" id="947">947</a> +<a href="#948" id="948">948</a> +<a href="#949" id="949">949</a> +<a href="#950" id="950">950</a> +<a href="#951" id="951">951</a> +<a href="#952" id="952">952</a> +<a href="#953" id="953">953</a> +<a href="#954" id="954">954</a> +<a href="#955" id="955">955</a> +<a href="#956" id="956">956</a> +<a href="#957" id="957">957</a> +<a href="#958" id="958">958</a> +<a href="#959" id="959">959</a> +<a href="#960" id="960">960</a> +<a href="#961" id="961">961</a> +<a href="#962" id="962">962</a> +<a href="#963" id="963">963</a> +<a href="#964" id="964">964</a> +<a href="#965" id="965">965</a> +<a href="#966" id="966">966</a> +<a href="#967" id="967">967</a> +<a href="#968" id="968">968</a> +<a href="#969" id="969">969</a> +<a href="#970" id="970">970</a> +<a href="#971" id="971">971</a> +<a href="#972" id="972">972</a> +<a href="#973" id="973">973</a> +<a href="#974" id="974">974</a> +<a href="#975" id="975">975</a> +<a href="#976" id="976">976</a> +<a href="#977" id="977">977</a> +<a href="#978" id="978">978</a> +<a href="#979" id="979">979</a> +<a href="#980" id="980">980</a> +<a href="#981" id="981">981</a> +<a href="#982" id="982">982</a> +<a href="#983" id="983">983</a> +<a href="#984" id="984">984</a> +<a href="#985" id="985">985</a> +<a href="#986" id="986">986</a> +<a href="#987" id="987">987</a> +<a href="#988" id="988">988</a> +<a href="#989" id="989">989</a> +<a href="#990" id="990">990</a> +<a href="#991" id="991">991</a> +<a href="#992" id="992">992</a> +<a href="#993" id="993">993</a> +<a href="#994" id="994">994</a> +<a href="#995" id="995">995</a> +<a href="#996" id="996">996</a> +<a href="#997" id="997">997</a> +<a href="#998" id="998">998</a> +<a href="#999" id="999">999</a> +<a href="#1000" id="1000">1000</a> +<a href="#1001" id="1001">1001</a> +<a href="#1002" id="1002">1002</a> +<a href="#1003" id="1003">1003</a> +<a href="#1004" id="1004">1004</a> +<a href="#1005" id="1005">1005</a> +<a href="#1006" id="1006">1006</a> +<a href="#1007" id="1007">1007</a> +<a href="#1008" id="1008">1008</a> +<a href="#1009" id="1009">1009</a> +<a href="#1010" id="1010">1010</a> +<a href="#1011" id="1011">1011</a> +<a href="#1012" id="1012">1012</a> +<a href="#1013" id="1013">1013</a> +<a href="#1014" id="1014">1014</a> +<a href="#1015" id="1015">1015</a> +<a href="#1016" id="1016">1016</a> +<a href="#1017" id="1017">1017</a> +<a href="#1018" id="1018">1018</a> +<a href="#1019" id="1019">1019</a> +<a href="#1020" id="1020">1020</a> +<a href="#1021" id="1021">1021</a> +<a href="#1022" id="1022">1022</a> +<a href="#1023" id="1023">1023</a> +<a href="#1024" id="1024">1024</a> +<a href="#1025" id="1025">1025</a> +<a href="#1026" id="1026">1026</a> +<a href="#1027" id="1027">1027</a> +<a href="#1028" id="1028">1028</a> +<a href="#1029" id="1029">1029</a> +<a href="#1030" id="1030">1030</a> +<a href="#1031" id="1031">1031</a> +<a href="#1032" id="1032">1032</a> +<a href="#1033" id="1033">1033</a> +<a href="#1034" id="1034">1034</a> +<a href="#1035" id="1035">1035</a> +<a href="#1036" id="1036">1036</a> +<a href="#1037" id="1037">1037</a> +<a href="#1038" id="1038">1038</a> +<a href="#1039" id="1039">1039</a> +<a href="#1040" id="1040">1040</a> +<a href="#1041" id="1041">1041</a> +<a href="#1042" id="1042">1042</a> +<a href="#1043" id="1043">1043</a> +<a href="#1044" id="1044">1044</a> +<a href="#1045" id="1045">1045</a> +<a href="#1046" id="1046">1046</a> +<a href="#1047" id="1047">1047</a> +<a href="#1048" id="1048">1048</a> +<a href="#1049" id="1049">1049</a> +<a href="#1050" id="1050">1050</a> +<a href="#1051" id="1051">1051</a> +<a href="#1052" id="1052">1052</a> +<a href="#1053" id="1053">1053</a> +<a href="#1054" id="1054">1054</a> +<a href="#1055" id="1055">1055</a> +<a href="#1056" id="1056">1056</a> +<a href="#1057" id="1057">1057</a> +<a href="#1058" id="1058">1058</a> +<a href="#1059" id="1059">1059</a> +<a href="#1060" id="1060">1060</a> +<a href="#1061" id="1061">1061</a> +<a href="#1062" id="1062">1062</a> +<a href="#1063" id="1063">1063</a> +<a href="#1064" id="1064">1064</a> +<a href="#1065" id="1065">1065</a> +<a href="#1066" id="1066">1066</a> +<a href="#1067" id="1067">1067</a> +<a href="#1068" id="1068">1068</a> +<a href="#1069" id="1069">1069</a> +<a href="#1070" id="1070">1070</a> +<a href="#1071" id="1071">1071</a> +<a href="#1072" id="1072">1072</a> +<a href="#1073" id="1073">1073</a> +<a href="#1074" id="1074">1074</a> +<a href="#1075" id="1075">1075</a> +<a href="#1076" id="1076">1076</a> +<a href="#1077" id="1077">1077</a> +<a href="#1078" id="1078">1078</a> +<a href="#1079" id="1079">1079</a> +<a href="#1080" id="1080">1080</a> +<a href="#1081" id="1081">1081</a> +<a href="#1082" id="1082">1082</a> +<a href="#1083" id="1083">1083</a> +<a href="#1084" id="1084">1084</a> +<a href="#1085" id="1085">1085</a> +<a href="#1086" id="1086">1086</a> +<a href="#1087" id="1087">1087</a> +<a href="#1088" id="1088">1088</a> +<a href="#1089" id="1089">1089</a> +<a href="#1090" id="1090">1090</a> +<a href="#1091" id="1091">1091</a> +<a href="#1092" id="1092">1092</a> +<a href="#1093" id="1093">1093</a> +<a href="#1094" id="1094">1094</a> +<a href="#1095" id="1095">1095</a> +<a href="#1096" id="1096">1096</a> +<a href="#1097" id="1097">1097</a> +<a href="#1098" id="1098">1098</a> +<a href="#1099" id="1099">1099</a> +<a href="#1100" id="1100">1100</a> +<a href="#1101" id="1101">1101</a> +<a href="#1102" id="1102">1102</a> +<a href="#1103" id="1103">1103</a> +<a href="#1104" id="1104">1104</a> +<a href="#1105" id="1105">1105</a> +<a href="#1106" id="1106">1106</a> +<a href="#1107" id="1107">1107</a> +<a href="#1108" id="1108">1108</a> +<a href="#1109" id="1109">1109</a> +<a href="#1110" id="1110">1110</a> +<a href="#1111" id="1111">1111</a> +<a href="#1112" id="1112">1112</a> +<a href="#1113" id="1113">1113</a> +<a href="#1114" id="1114">1114</a> +<a href="#1115" id="1115">1115</a> +<a href="#1116" id="1116">1116</a> +<a href="#1117" id="1117">1117</a> +<a href="#1118" id="1118">1118</a> +<a href="#1119" id="1119">1119</a> +<a href="#1120" id="1120">1120</a> +<a href="#1121" id="1121">1121</a> +<a href="#1122" id="1122">1122</a> +<a href="#1123" id="1123">1123</a> +<a href="#1124" id="1124">1124</a> +<a href="#1125" id="1125">1125</a> +<a href="#1126" id="1126">1126</a> +<a href="#1127" id="1127">1127</a> +<a href="#1128" id="1128">1128</a> +<a href="#1129" id="1129">1129</a> +<a href="#1130" id="1130">1130</a> +<a href="#1131" id="1131">1131</a> +<a href="#1132" id="1132">1132</a> +<a href="#1133" id="1133">1133</a> +<a href="#1134" id="1134">1134</a> +<a href="#1135" id="1135">1135</a> +<a href="#1136" id="1136">1136</a> +<a href="#1137" id="1137">1137</a> +<a href="#1138" id="1138">1138</a> +<a href="#1139" id="1139">1139</a> +<a href="#1140" id="1140">1140</a> +<a href="#1141" id="1141">1141</a> +<a href="#1142" id="1142">1142</a> +<a href="#1143" id="1143">1143</a> +<a href="#1144" id="1144">1144</a> +<a href="#1145" id="1145">1145</a> +<a href="#1146" id="1146">1146</a> +<a href="#1147" id="1147">1147</a> +<a href="#1148" id="1148">1148</a> +<a href="#1149" id="1149">1149</a> +<a href="#1150" id="1150">1150</a> +<a href="#1151" id="1151">1151</a> +<a href="#1152" id="1152">1152</a> +<a href="#1153" id="1153">1153</a> +<a href="#1154" id="1154">1154</a> +<a href="#1155" id="1155">1155</a> +<a href="#1156" id="1156">1156</a> +<a href="#1157" id="1157">1157</a> +<a href="#1158" id="1158">1158</a> +<a href="#1159" id="1159">1159</a> +<a href="#1160" id="1160">1160</a> +<a href="#1161" id="1161">1161</a> +<a href="#1162" id="1162">1162</a> +<a href="#1163" id="1163">1163</a> +<a href="#1164" id="1164">1164</a> +<a href="#1165" id="1165">1165</a> +<a href="#1166" id="1166">1166</a> +<a href="#1167" id="1167">1167</a> +<a href="#1168" id="1168">1168</a> +<a href="#1169" id="1169">1169</a> +<a href="#1170" id="1170">1170</a> +<a href="#1171" id="1171">1171</a> +<a href="#1172" id="1172">1172</a> +<a href="#1173" id="1173">1173</a> +<a href="#1174" id="1174">1174</a> +<a href="#1175" id="1175">1175</a> +<a href="#1176" id="1176">1176</a> +<a href="#1177" id="1177">1177</a> +<a href="#1178" id="1178">1178</a> +<a href="#1179" id="1179">1179</a> +<a href="#1180" id="1180">1180</a> +<a href="#1181" id="1181">1181</a> +<a href="#1182" id="1182">1182</a> +<a href="#1183" id="1183">1183</a> +<a href="#1184" id="1184">1184</a> +<a href="#1185" id="1185">1185</a> +<a href="#1186" id="1186">1186</a> +<a href="#1187" id="1187">1187</a> +<a href="#1188" id="1188">1188</a> +<a href="#1189" id="1189">1189</a> +<a href="#1190" id="1190">1190</a> +<a href="#1191" id="1191">1191</a> +<a href="#1192" id="1192">1192</a> +<a href="#1193" id="1193">1193</a> +<a href="#1194" id="1194">1194</a> +<a href="#1195" id="1195">1195</a> +<a href="#1196" id="1196">1196</a> +<a href="#1197" id="1197">1197</a> +<a href="#1198" id="1198">1198</a> +<a href="#1199" id="1199">1199</a> +<a href="#1200" id="1200">1200</a> +<a href="#1201" id="1201">1201</a> +<a href="#1202" id="1202">1202</a> +<a href="#1203" id="1203">1203</a> +<a href="#1204" id="1204">1204</a> +<a href="#1205" id="1205">1205</a> +<a href="#1206" id="1206">1206</a> +<a href="#1207" id="1207">1207</a> +<a href="#1208" id="1208">1208</a> +<a href="#1209" id="1209">1209</a> +<a href="#1210" id="1210">1210</a> +<a href="#1211" id="1211">1211</a> +<a href="#1212" id="1212">1212</a> +<a href="#1213" id="1213">1213</a> +<a href="#1214" id="1214">1214</a> +<a href="#1215" id="1215">1215</a> +<a href="#1216" id="1216">1216</a> +<a href="#1217" id="1217">1217</a> +<a href="#1218" id="1218">1218</a> +<a href="#1219" id="1219">1219</a> +<a href="#1220" id="1220">1220</a> +<a href="#1221" id="1221">1221</a> +<a href="#1222" id="1222">1222</a> +<a href="#1223" id="1223">1223</a> +<a href="#1224" id="1224">1224</a> +<a href="#1225" id="1225">1225</a> +<a href="#1226" id="1226">1226</a> +<a href="#1227" id="1227">1227</a> +<a href="#1228" id="1228">1228</a> +<a href="#1229" id="1229">1229</a> +<a href="#1230" id="1230">1230</a> +<a href="#1231" id="1231">1231</a> +<a href="#1232" id="1232">1232</a> +<a href="#1233" id="1233">1233</a> +<a href="#1234" id="1234">1234</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + containers::Bytes, + derive, + fo4::{ + <span class="self">self</span>, Chunk, CompressionFormat, DX10Header, Error, File, FileHash, FileHeader, Format, + GNMFHeader, Hash, <span class="prelude-ty">Result</span>, Version, + }, + io::{Endian, Sink, Source}, + protocols::WString, +}; +<span class="kw">use </span>bstr::BString; +<span class="kw">use </span>std::io::Write; + +<span class="kw">mod </span>constants { + <span class="kw">use </span><span class="kw">crate</span>::cc; + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>MAGIC: u32 = cc::make_four(<span class="string">b"BTDX"</span>); + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>GNRL: u32 = cc::make_four(<span class="string">b"GNRL"</span>); + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>DX10: u32 = cc::make_four(<span class="string">b"DX10"</span>); + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>GNMF: u32 = cc::make_four(<span class="string">b"GNMF"</span>); + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>HEADER_SIZE_V1: usize = <span class="number">0x18</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>HEADER_SIZE_V2: usize = <span class="number">0x20</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>HEADER_SIZE_V3: usize = <span class="number">0x24</span>; + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>FILE_HEADER_SIZE_GNRL: u16 = <span class="number">0x10</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>FILE_HEADER_SIZE_DX10: u16 = <span class="number">0x18</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>FILE_HEADER_SIZE_GNMF: u16 = <span class="number">0x30</span>; + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>CHUNK_SIZE_GNRL: usize = <span class="number">0x14</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>CHUNK_SIZE_DX10: usize = <span class="number">0x18</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>CHUNK_SIZE_GNMF: usize = <span class="number">0x18</span>; + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>CHUNK_SENTINEL: u32 = <span class="number">0xBAAD_F00D</span>; +} + +<span class="kw">struct </span>Offsets { + file_data: usize, + strings: usize, +} + +<span class="kw">impl </span>Offsets { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new(archive: <span class="kw-2">&</span>Archive, options: Options) -> <span class="self">Self </span>{ + <span class="kw">let </span>chunks_offset = <span class="kw">match </span>options.version { + Version::v1 => constants::HEADER_SIZE_V1, + Version::v2 => constants::HEADER_SIZE_V2, + Version::v3 => constants::HEADER_SIZE_V3, + }; + + <span class="kw">let </span>file_data_offset = { + <span class="kw">let </span>(file_header_size, chunk_size) = <span class="kw">match </span>options.format { + Format::GNRL => (constants::FILE_HEADER_SIZE_GNRL, constants::CHUNK_SIZE_GNRL), + Format::DX10 => (constants::FILE_HEADER_SIZE_DX10, constants::CHUNK_SIZE_DX10), + Format::GNMF => (constants::FILE_HEADER_SIZE_GNMF, constants::CHUNK_SIZE_GNMF), + }; + <span class="kw">let </span>chunks_count: usize = archive.values().map(File::len).sum(); + chunks_offset + + (archive.len() * usize::from(file_header_size)) + + (chunks_count * chunk_size) + }; + + <span class="kw">let </span>strings_offset = { + <span class="kw">let </span>data_size: usize = archive.values().flat_map(File::iter).map(Chunk::len).sum(); + file_data_offset + data_size + }; + + <span class="self">Self </span>{ + file_data: file_data_offset, + strings: strings_offset, + } + } +} + +<span class="kw">struct </span>Header { + version: Version, + format: Format, + file_count: u32, + string_table_offset: u64, + compression_format: CompressionFormat, +} + +<span class="doccomment">/// See also [`ArchiveOptions`](Options). +</span><span class="attr">#[derive(Clone, Copy, Debug, Default)] +#[repr(transparent)] +</span><span class="kw">pub struct </span>OptionsBuilder(Options); + +<span class="kw">impl </span>OptionsBuilder { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>build(<span class="self">self</span>) -> Options { + <span class="self">self</span>.<span class="number">0 + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_format(<span class="kw-2">mut </span><span class="self">self</span>, compression_format: CompressionFormat) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_format = compression_format; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>format(<span class="kw-2">mut </span><span class="self">self</span>, format: Format) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.format = format; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>strings(<span class="kw-2">mut </span><span class="self">self</span>, strings: bool) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.strings = strings; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>version(<span class="kw-2">mut </span><span class="self">self</span>, version: Version) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.version = version; + <span class="self">self + </span>} +} + +<span class="doccomment">/// Info about the contents of the given archive. +/// +/// ```rust +/// use ba2::fo4::{ArchiveOptions, CompressionFormat, Format, Version}; +/// +/// // Write an archive for FO4/FO76, GNRL format +/// let _ = ArchiveOptions::builder() +/// .format(Format::GNRL) +/// .version(Version::v1) +/// .compression_format(CompressionFormat::Zip) +/// .build(); +/// +/// // Write an archive for FO4/FO76, DX10 format +/// let _ = ArchiveOptions::builder() +/// .format(Format::DX10) +/// .version(Version::v1) +/// .compression_format(CompressionFormat::Zip) +/// .build(); +/// +/// // Write an archive for SF, GNRL format +/// let _ = ArchiveOptions::builder() +/// .format(Format::GNRL) +/// .version(Version::v2) +/// .compression_format(CompressionFormat::Zip) +/// .build(); +/// +/// // Write an archive for SF, DX10 format +/// let _ = ArchiveOptions::builder() +/// .format(Format::DX10) +/// .version(Version::v3) +/// .compression_format(CompressionFormat::LZ4) +/// .build(); +/// ``` +</span><span class="attr">#[derive(Clone, Copy, Debug, Default)] +</span><span class="kw">pub struct </span>Options { + format: Format, + version: Version, + compression_format: CompressionFormat, + strings: bool, +} + +<span class="kw">impl </span>Options { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>builder() -> OptionsBuilder { + OptionsBuilder::new() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_format(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionFormat { + <span class="self">self</span>.compression_format + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>format(<span class="kw-2">&</span><span class="self">self</span>) -> Format { + <span class="self">self</span>.format + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>strings(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.strings + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>version(<span class="kw-2">&</span><span class="self">self</span>) -> Version { + <span class="self">self</span>.version + } +} + +<span class="macro">derive::key!</span>(Key: FileHash); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Key<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>hash_in_place(name: <span class="kw-2">&mut </span>BString) -> FileHash { + fo4::hash_file_in_place(name) + } +} + +<span class="kw">type </span>ReadResult<T> = (T, Options); +<span class="macro">derive::archive! </span>{ + <span class="doccomment">/// Represents the FO4 revision of the ba2 format. + </span>Archive => ReadResult + Map: (Key: FileHash) => File +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Archive<<span class="lifetime">'bytes</span>> { + <span class="kw">pub fn </span>write<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out, options: <span class="kw-2">&</span>Options) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>sink = Sink::new(stream); + <span class="kw">let </span>(header, <span class="kw-2">mut </span>offsets) = <span class="self">self</span>.make_header(<span class="kw-2">*</span>options)<span class="question-mark">?</span>; + <span class="self">Self</span>::write_header(<span class="kw-2">&mut </span>sink, <span class="kw-2">&</span>header)<span class="question-mark">?</span>; + + <span class="kw">for </span>(key, file) <span class="kw">in </span><span class="self">self </span>{ + <span class="self">Self</span>::write_file(<span class="kw-2">&mut </span>sink, <span class="kw-2">&</span>header, <span class="kw-2">&mut </span>offsets, key.hash(), file)<span class="question-mark">?</span>; + } + + <span class="kw">for </span>file <span class="kw">in </span><span class="self">self</span>.values() { + <span class="kw">for </span>chunk <span class="kw">in </span>file { + sink.write_bytes(chunk.as_bytes())<span class="question-mark">?</span>; + } + } + + <span class="kw">if </span>options.strings { + <span class="kw">for </span>key <span class="kw">in </span><span class="self">self</span>.keys() { + sink.write_protocol::<WString>(key.name(), Endian::Little)<span class="question-mark">?</span>; + } + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>make_header(<span class="kw-2">&</span><span class="self">self</span>, options: Options) -> <span class="prelude-ty">Result</span><(Header, Offsets)> { + <span class="kw">let </span>offsets = Offsets::new(<span class="self">self</span>, options); + <span class="prelude-val">Ok</span>(( + Header { + version: options.version, + format: options.format, + file_count: <span class="self">self</span>.len().try_into()<span class="question-mark">?</span>, + string_table_offset: <span class="kw">if </span>options.strings { + offsets.strings <span class="kw">as </span>u64 + } <span class="kw">else </span>{ + <span class="number">0 + </span>}, + compression_format: options.compression_format, + }, + offsets, + )) + } + + <span class="kw">fn </span>write_chunk<Out>( + sink: <span class="kw-2">&mut </span>Sink<Out>, + header: <span class="kw-2">&</span>Header, + offsets: <span class="kw-2">&mut </span>Offsets, + chunk: <span class="kw-2">&</span>Chunk<<span class="lifetime">'bytes</span>>, + ) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span>data_offset: u64 = offsets.file_data.try_into()<span class="question-mark">?</span>; + offsets.file_data += chunk.len(); + <span class="kw">let </span>(compressed_size, decompressed_size): (u32, u32) = + <span class="kw">if let </span><span class="prelude-val">Some</span>(decompressed_len) = chunk.decompressed_len() { + (chunk.len().try_into()<span class="question-mark">?</span>, decompressed_len.try_into()<span class="question-mark">?</span>) + } <span class="kw">else </span>{ + (<span class="number">0</span>, chunk.len().try_into()<span class="question-mark">?</span>) + }; + sink.write( + <span class="kw-2">&</span>(data_offset, compressed_size, decompressed_size), + Endian::Little, + )<span class="question-mark">?</span>; + + <span class="kw">match </span>(header.format, <span class="kw-2">&</span>chunk.mips) { + (Format::GNRL, <span class="prelude-val">None</span>) => (), + (Format::DX10 | Format::GNMF, <span class="prelude-val">Some</span>(mips)) => { + sink.write(<span class="kw-2">&</span>(<span class="kw-2">*</span>mips.start(), <span class="kw-2">*</span>mips.end()), Endian::Little)<span class="question-mark">?</span>; + } + <span class="kw">_ </span>=> { + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::FormatMismatch); + } + } + + sink.write(<span class="kw-2">&</span>constants::CHUNK_SENTINEL, Endian::Little)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_file<Out>( + sink: <span class="kw-2">&mut </span>Sink<Out>, + header: <span class="kw-2">&</span>Header, + offsets: <span class="kw-2">&mut </span>Offsets, + hash: <span class="kw-2">&</span>FileHash, + file: <span class="kw-2">&</span>File<<span class="lifetime">'bytes</span>>, + ) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="self">Self</span>::write_hash(sink, hash)<span class="question-mark">?</span>; + + <span class="kw">let </span>chunk_count: u8 = file.len().try_into()<span class="question-mark">?</span>; + <span class="kw">let </span>chunk_size = <span class="kw">match </span>header.format { + Format::GNRL => constants::FILE_HEADER_SIZE_GNRL, + Format::DX10 => constants::FILE_HEADER_SIZE_DX10, + Format::GNMF => constants::FILE_HEADER_SIZE_GNMF, + }; + sink.write(<span class="kw-2">&</span>(<span class="number">0u8</span>, chunk_count, chunk_size), Endian::Little)<span class="question-mark">?</span>; + + <span class="kw">match </span>(header.format, <span class="kw-2">&</span>file.header) { + (Format::GNRL, FileHeader::GNRL) => (), + (Format::DX10, FileHeader::DX10(x)) => { + sink.write( + <span class="kw-2">&</span>( + x.height, + x.width, + x.mip_count, + x.format, + x.flags, + x.tile_mode, + ), + Endian::Little, + )<span class="question-mark">?</span>; + } + (Format::GNMF, FileHeader::GNMF(x)) => { + sink.write(<span class="kw-2">&</span>x.metadata, Endian::Little)<span class="question-mark">?</span>; + } + (<span class="kw">_</span>, <span class="kw">_</span>) => { + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::FormatMismatch); + } + } + + <span class="kw">for </span>chunk <span class="kw">in </span>file { + <span class="self">Self</span>::write_chunk(sink, header, offsets, chunk)<span class="question-mark">?</span>; + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_hash<Out>(sink: <span class="kw-2">&mut </span>Sink<Out>, hash: <span class="kw-2">&</span>Hash) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + sink.write(<span class="kw-2">&</span>(hash.file, hash.extension, hash.directory), Endian::Little)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_header<Out>(sink: <span class="kw-2">&mut </span>Sink<Out>, header: <span class="kw-2">&</span>Header) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span>format = <span class="kw">match </span>header.format { + Format::GNRL => constants::GNRL, + Format::DX10 => constants::DX10, + Format::GNMF => constants::GNMF, + }; + + sink.write( + <span class="kw-2">&</span>( + constants::MAGIC, + header.version <span class="kw">as </span>u32, + format, + header.file_count, + header.string_table_offset, + ), + Endian::Little, + )<span class="question-mark">?</span>; + + <span class="kw">if </span>header.version >= Version::v2 { + sink.write(<span class="kw-2">&</span><span class="number">1u64</span>, Endian::Little)<span class="question-mark">?</span>; + } + + <span class="kw">if </span>header.version >= Version::v3 { + <span class="kw">let </span>format: u32 = <span class="kw">match </span>header.compression_format { + CompressionFormat::Zip => <span class="number">0</span>, + CompressionFormat::LZ4 => <span class="number">3</span>, + }; + sink.write(<span class="kw-2">&</span>format, Endian::Little)<span class="question-mark">?</span>; + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>do_read<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><ReadResult<<span class="self">Self</span>>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>header = <span class="self">Self</span>::read_header(source)<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>map = Map::default(); + <span class="kw">let </span><span class="kw-2">mut </span>strings: usize = header.string_table_offset.try_into()<span class="question-mark">?</span>; + <span class="kw">for _ in </span><span class="number">0</span>..header.file_count { + <span class="kw">let </span>(key, value) = <span class="self">Self</span>::read_file(source, <span class="kw-2">&</span>header, <span class="kw-2">&mut </span>strings)<span class="question-mark">?</span>; + map.insert(key, value); + } + + <span class="prelude-val">Ok</span>(( + <span class="self">Self </span>{ map }, + Options { + format: header.format, + version: header.version, + compression_format: header.compression_format, + strings: header.string_table_offset != <span class="number">0</span>, + }, + )) + } + + <span class="kw">fn </span>read_chunk<In>(source: <span class="kw-2">&mut </span>In, header: <span class="kw-2">&</span>Header) -> <span class="prelude-ty">Result</span><Chunk<<span class="lifetime">'bytes</span>>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>(data_offset, compressed_size, decompressed_size): (u64, u32, u32) = + source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="kw">let </span>mips = <span class="kw">match </span>header.format { + Format::GNRL => <span class="prelude-val">None</span>, + Format::DX10 | Format::GNMF => { + <span class="kw">let </span>(mip_first, mip_last) = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(mip_first..=mip_last) + } + }; + + <span class="kw">let </span>sentinel = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="kw">if </span>sentinel != constants::CHUNK_SENTINEL { + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::InvalidChunkSentinel(sentinel)); + } + + <span class="kw">let </span>bytes = source.save_restore_position(|source| -> <span class="prelude-ty">Result</span><Bytes<<span class="lifetime">'bytes</span>>> { + source.seek_absolute(data_offset.try_into()<span class="question-mark">?</span>)<span class="question-mark">?</span>; + <span class="kw">let </span>len = <span class="kw">if </span>compressed_size == <span class="number">0 </span>{ + decompressed_size + } <span class="kw">else </span>{ + compressed_size + }; + <span class="kw">let </span>bytes = source.read_bytes(len <span class="kw">as </span>usize)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(bytes) + })<span class="question-mark">??</span>; + <span class="kw">let </span>decompressed_len = (compressed_size != <span class="number">0</span>).then_some(decompressed_size <span class="kw">as </span>usize); + <span class="kw">let </span>bytes = bytes.into_compressable(decompressed_len); + + <span class="prelude-val">Ok</span>(Chunk { bytes, mips }) + } + + <span class="kw">fn </span>read_file<In>( + source: <span class="kw-2">&mut </span>In, + header: <span class="kw-2">&</span>Header, + strings: <span class="kw-2">&mut </span>usize, + ) -> <span class="prelude-ty">Result</span><(Key<<span class="lifetime">'bytes</span>>, File<<span class="lifetime">'bytes</span>>)> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>name = <span class="kw">if </span><span class="kw-2">*</span>strings == <span class="number">0 </span>{ + Bytes::default() + } <span class="kw">else </span>{ + source.save_restore_position(|source| -> <span class="prelude-ty">Result</span><Bytes<<span class="lifetime">'bytes</span>>> { + source.seek_absolute(<span class="kw-2">*</span>strings)<span class="question-mark">?</span>; + <span class="kw">let </span>name = source.read_protocol::<WString>(Endian::Little)<span class="question-mark">?</span>; + <span class="kw-2">*</span>strings = source.stream_position(); + <span class="prelude-val">Ok</span>(name) + })<span class="question-mark">?? + </span>}; + + <span class="kw">let </span>hash = <span class="self">Self</span>::read_hash(source)<span class="question-mark">?</span>; + <span class="kw">let </span>(<span class="kw">_</span>, chunk_count, chunk_size): (u8, u8, u16) = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="kw">if </span>!<span class="macro">matches!</span>( + (header.format, chunk_size), + (Format::GNRL, constants::FILE_HEADER_SIZE_GNRL) + | (Format::DX10, constants::FILE_HEADER_SIZE_DX10) + | (Format::GNMF, constants::FILE_HEADER_SIZE_GNMF) + ) { + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::InvalidChunkSize(chunk_size)); + } + + <span class="kw">let </span>file_header = <span class="kw">match </span>header.format { + Format::GNRL => FileHeader::GNRL, + Format::DX10 => { + <span class="kw">let </span>(height, width, mip_count, format, flags, tile_mode) = + source.read(Endian::Little)<span class="question-mark">?</span>; + DX10Header { + height, + width, + mip_count, + format, + flags, + tile_mode, + } + .into() + } + Format::GNMF => { + <span class="kw">let </span>metadata = source.read(Endian::Little)<span class="question-mark">?</span>; + GNMFHeader { metadata }.into() + } + }; + + <span class="kw">let </span><span class="kw-2">mut </span>chunks = Vec::with_capacity(chunk_count.into()); + <span class="kw">for _ in </span><span class="number">0</span>..chunk_count { + <span class="kw">let </span>chunk = <span class="self">Self</span>::read_chunk(source, header)<span class="question-mark">?</span>; + chunks.push(chunk); + } + + <span class="prelude-val">Ok</span>(( + Key { + hash: hash.into(), + name, + }, + File { + chunks, + header: file_header, + }, + )) + } + + <span class="kw">fn </span>read_hash<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><Hash> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>(file, extension, directory) = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(Hash { + file, + extension, + directory, + }) + } + + <span class="kw">fn </span>read_header<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><Header> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>(magic, version, contents_format, file_count, string_table_offset) = + source.read(Endian::Little)<span class="question-mark">?</span>; + + <span class="kw">if </span>magic != constants::MAGIC { + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::InvalidMagic(magic)); + } + + <span class="kw">let </span>format = <span class="kw">match </span>contents_format { + constants::GNRL => Format::GNRL, + constants::DX10 => Format::DX10, + constants::GNMF => Format::GNMF, + <span class="kw">_ </span>=> <span class="kw">return </span><span class="prelude-val">Err</span>(Error::InvalidFormat(contents_format)), + }; + + <span class="kw">let </span>version = <span class="kw">match </span>version { + <span class="number">1 </span>=> Version::v1, + <span class="number">2 </span>=> Version::v2, + <span class="number">3 </span>=> Version::v3, + <span class="kw">_ </span>=> <span class="kw">return </span><span class="prelude-val">Err</span>(Error::InvalidVersion(version)), + }; + + <span class="kw">if </span>version >= Version::v2 { + source.read::<u64>(Endian::Little)<span class="question-mark">?</span>; + } + + <span class="kw">let </span>compression_format = <span class="kw">if </span>version >= Version::v3 { + <span class="kw">let </span>format: u32 = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="kw">if </span>format == <span class="number">3 </span>{ + CompressionFormat::LZ4 + } <span class="kw">else </span>{ + CompressionFormat::Zip + } + } <span class="kw">else </span>{ + CompressionFormat::Zip + }; + + <span class="prelude-val">Ok</span>(Header { + version, + format, + file_count, + string_table_offset, + compression_format, + }) + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use crate</span>::{ + cc, + fo4::{ + Archive, ArchiveKey, ArchiveOptions, CompressionFormat, Error, File, FileHeader, + FileReadOptions, Format, Version, + }, + prelude::<span class="kw-2">*</span>, + Borrowed, CompressionResult, + }; + <span class="kw">use </span>anyhow::Context <span class="kw">as _</span>; + <span class="kw">use </span>bstr::ByteSlice <span class="kw">as _</span>; + <span class="kw">use </span>core::mem; + <span class="kw">use </span>directxtex::DXGI_FORMAT; + <span class="kw">use </span>memmap2::Mmap; + <span class="kw">use </span>std::{ + ffi::OsString, + fs, + io::{<span class="self">self</span>, Read <span class="kw">as _</span>}, + path::{Path, PathBuf}, + str::FromStr <span class="kw">as _</span>, + }; + <span class="kw">use </span>walkdir::WalkDir; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() { + <span class="kw">let </span>archive = Archive::default(); + <span class="macro">assert!</span>(archive.is_empty()); + <span class="macro">assert_eq!</span>(archive.len(), <span class="number">0</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>chunking_strategy() -> anyhow::Result<()> { + <span class="kw">let </span>file = { + <span class="kw">let </span>options = FileReadOptions::builder() + .format(Format::DX10) + .compression_result(CompressionResult::Compressed) + .build(); + File::read(Path::new(<span class="string">"data/fo4_chunk_test/test.dds"</span>), <span class="kw-2">&</span>options) + .context(<span class="string">"failed to read file"</span>)<span class="question-mark">? + </span>}; + + <span class="kw">let </span>FileHeader::DX10(header) = <span class="kw-2">&</span>file.header <span class="kw">else </span>{ + <span class="macro">anyhow::bail!</span>(<span class="string">"file was not dx10"</span>); + }; + <span class="macro">assert_eq!</span>(header.mip_count, <span class="number">11</span>); + <span class="macro">assert_eq!</span>( + header.format, + DXGI_FORMAT::DXGI_FORMAT_BC1_UNORM.bits() <span class="kw">as </span>u8 + ); + <span class="macro">assert_eq!</span>(file.len(), <span class="number">3</span>); + + <span class="kw">let </span><span class="kw-2">mut </span>index = <span class="number">0</span>; + <span class="kw">let </span><span class="kw-2">mut </span>next_chunk = || { + <span class="kw">let </span>chunk = <span class="kw-2">&</span>file[index]; + index += <span class="number">1</span>; + <span class="kw">let </span><span class="prelude-val">Some</span>(mips) = <span class="kw-2">&</span>chunk.mips <span class="kw">else </span>{ + <span class="macro">anyhow::bail!</span>(<span class="string">"chunk was missing mips"</span>); + }; + <span class="prelude-val">Ok</span>((chunk, mips)) + }; + + <span class="kw">let </span>(chunk, mips) = next_chunk()<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(chunk.decompressed_len(), <span class="prelude-val">Some</span>(<span class="number">0x8_0000</span>)); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips, <span class="number">0</span>..=<span class="number">0</span>); + + <span class="kw">let </span>(chunk, mips) = next_chunk()<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(chunk.decompressed_len(), <span class="prelude-val">Some</span>(<span class="number">0x2_0000</span>)); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips, <span class="number">1</span>..=<span class="number">1</span>); + + <span class="kw">let </span>(chunk, mips) = next_chunk()<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(chunk.decompressed_len(), <span class="prelude-val">Some</span>(<span class="number">0xAAB8</span>)); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips, <span class="number">2</span>..=<span class="number">10</span>); + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>archives_with_compression() -> anyhow::Result<()> { + <span class="kw">let </span>root_path = Path::new(<span class="string">"data/fo4_compression_test"</span>); + <span class="kw">for </span>archive_name <span class="kw">in </span>[<span class="string">"normal.ba2"</span>, <span class="string">"xbox.ba2"</span>] { + <span class="kw">let </span>(archive, options) = Archive::read(root_path.join(archive_name).as_path()) + .context(<span class="string">"failed to read archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(options.format(), Format::GNRL); + <span class="macro">assert_eq!</span>(options.compression_format(), CompressionFormat::Zip); + + <span class="kw">let </span>root_path = root_path.join(<span class="string">"data"</span>); + <span class="kw">for </span>file_path <span class="kw">in </span>WalkDir::new(<span class="kw-2">&</span>root_path) { + <span class="kw">if let </span><span class="prelude-val">Ok</span>(file_path) = file_path { + <span class="kw">let </span>metadata = file_path.metadata().with_context(|| { + <span class="macro">format!</span>( + <span class="string">"failed to get metadata for file path: {:?}"</span>, + file_path.path() + ) + })<span class="question-mark">?</span>; + <span class="kw">if </span>metadata.is_file() { + <span class="kw">let </span>key = file_path + .path() + .strip_prefix(<span class="kw-2">&</span>root_path) + .with_context(|| { + <span class="macro">format!</span>( + <span class="string">"failed to strip prefix ({root_path:?}) from path ({file_path:?})" + </span>) + })<span class="question-mark">? + </span>.as_os_str(); + <span class="kw">let </span>file = archive + .get(<span class="kw-2">&</span>ArchiveKey::from(key.as_encoded_bytes())) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get file with key: {key:?}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(file.len(), <span class="number">1</span>); + + <span class="kw">let </span>chunk = <span class="kw-2">&</span>file[<span class="number">0</span>]; + <span class="macro">assert!</span>(chunk.is_compressed()); + <span class="kw">let </span>chunk = chunk.decompress(<span class="kw-2">&</span>Default::default()).with_context(|| { + <span class="macro">format!</span>(<span class="string">"failed to decompress chunk for file: {file_path:?}"</span>) + })<span class="question-mark">?</span>; + <span class="macro">assert!</span>(chunk.is_decompressed()); + <span class="macro">assert_eq!</span>(chunk.len() <span class="kw">as </span>u64, metadata.len()); + + <span class="kw">let </span><span class="kw-2">mut </span>original_data = Vec::new(); + fs::File::open(file_path.path()) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {file_path:?}"</span>))<span class="question-mark">? + </span>.read_to_end(<span class="kw-2">&mut </span>original_data) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to read from file: {file_path:?}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(chunk.len(), original_data.len()); + <span class="macro">assert_eq!</span>(chunk.as_bytes(), <span class="kw-2">&</span>original_data); + } + } + } + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>files_with_cubemaps() -> anyhow::Result<()> { + <span class="kw">let </span>file = { + <span class="kw">let </span>options = FileReadOptions::builder() + .format(Format::DX10) + .compression_result(CompressionResult::Compressed) + .build(); + File::read(Path::new(<span class="string">"data/fo4_cubemap_test/blacksky_e.dds"</span>), <span class="kw-2">&</span>options) + .context(<span class="string">"failed to read file"</span>)<span class="question-mark">? + </span>}; + + <span class="kw">let </span>FileHeader::DX10(header) = <span class="kw-2">&</span>file.header <span class="kw">else </span>{ + <span class="macro">anyhow::bail!</span>(<span class="string">"file was not dx10"</span>); + }; + <span class="macro">assert_eq!</span>(header.mip_count, <span class="number">10</span>); + <span class="macro">assert_eq!</span>(header.flags, <span class="number">1</span>); + <span class="macro">assert_eq!</span>(header.tile_mode, <span class="number">8</span>); + <span class="macro">assert_eq!</span>(file.len(), <span class="number">1</span>); + + <span class="kw">let </span>chunk = <span class="kw-2">&</span>file[<span class="number">0</span>]; + <span class="kw">let </span><span class="prelude-val">Some</span>(mips) = <span class="kw-2">&</span>chunk.mips <span class="kw">else </span>{ + <span class="macro">anyhow::bail!</span>(<span class="string">"chunk was missing mips"</span>); + }; + + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips, <span class="number">0</span>..=<span class="number">9</span>); + <span class="macro">assert_eq!</span>(chunk.decompressed_len(), <span class="prelude-val">Some</span>(<span class="number">0x20_00A0</span>)); + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>read_write_texture_archives() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/fo4_dds_test/in.ba2"</span>); + <span class="kw">let </span>original = { + <span class="kw">let </span>fd = + fs::File::open(path).with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) } + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to memory map file: {path:?}"</span>))<span class="question-mark">? + </span>}; + + <span class="kw">let </span>(archive, options) = Archive::read(Borrowed(<span class="kw-2">&</span>original[..])) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to read archive: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(options.compression_format, CompressionFormat::Zip); + <span class="macro">assert_eq!</span>(options.format, Format::DX10); + <span class="macro">assert_eq!</span>(options.strings, <span class="bool-val">true</span>); + <span class="macro">assert_eq!</span>(options.version, Version::v1); + <span class="macro">assert_eq!</span>(archive.len(), <span class="number">1</span>); + + <span class="kw">let </span>file = archive + .get(<span class="kw-2">&</span>ArchiveKey::from(<span class="string">"Fence006_1K_Roughness.dds"</span>)) + .context(<span class="string">"failed to get file from archive"</span>)<span class="question-mark">?</span>; + <span class="kw">let </span>FileHeader::DX10(header) = <span class="kw-2">&</span>file.header <span class="kw">else </span>{ + <span class="macro">anyhow::bail!</span>(<span class="string">"file header was not dx10"</span>); + }; + <span class="macro">assert_eq!</span>(file.len(), <span class="number">3</span>); + <span class="macro">assert_eq!</span>(header.height, <span class="number">1024</span>); + <span class="macro">assert_eq!</span>(header.width, <span class="number">1024</span>); + <span class="macro">assert_eq!</span>(header.mip_count, <span class="number">11</span>); + <span class="macro">assert_eq!</span>(header.format, <span class="number">98</span>); + <span class="macro">assert_eq!</span>(header.flags, <span class="number">0</span>); + <span class="macro">assert_eq!</span>(header.tile_mode, <span class="number">8</span>); + + <span class="kw">let </span><span class="kw-2">mut </span>idx = <span class="number">0</span>; + <span class="kw">let </span><span class="kw-2">mut </span>next_chunk = || { + <span class="kw">let </span>chunk = <span class="kw-2">&</span>file[idx]; + idx += <span class="number">1</span>; + <span class="kw">let </span><span class="prelude-val">Some</span>(mips) = <span class="kw-2">&</span>chunk.mips <span class="kw">else </span>{ + <span class="macro">anyhow::bail!</span>(<span class="string">"chunk extra was missing mips"</span>); + }; + <span class="prelude-val">Ok</span>((chunk, mips)) + }; + + <span class="kw">let </span>(chunk, mips) = next_chunk()<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(chunk.len(), <span class="number">0x100_000</span>); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips.start(), <span class="number">0</span>); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips.end(), <span class="number">0</span>); + + <span class="kw">let </span>(chunk, mips) = next_chunk()<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(chunk.len(), <span class="number">0x40_000</span>); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips.start(), <span class="number">1</span>); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips.end(), <span class="number">1</span>); + + <span class="kw">let </span>(chunk, mips) = next_chunk()<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(chunk.len(), <span class="number">0x15_570</span>); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips.start(), <span class="number">2</span>); + <span class="macro">assert_eq!</span>(<span class="kw-2">*</span>mips.end(), <span class="number">10</span>); + + <span class="kw">let </span>copy = { + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); + archive + .write(<span class="kw-2">&mut </span>v, <span class="kw-2">&</span>options) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to write archive: {path:?}"</span>))<span class="question-mark">?</span>; + v + }; + + <span class="macro">assert_eq!</span>(original.len(), copy.len()); + <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>original[..], copy); + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + </span><span class="kw">struct </span>DDS_PIXELFORMAT { + dwSize: u32, + dwFlags: u32, + dwFourCC: u32, + dwRGBBitCount: u32, + dwRBitMask: u32, + dwGBitMask: u32, + dwBBitMask: u32, + dwABitMask: u32, + } + + <span class="attr">#[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone, Copy, Debug)] + </span><span class="kw">struct </span>DDS_HEADER { + dwSize: u32, + dwFlags: u32, + dwHeight: u32, + dwWidth: u32, + dwPitchOrLinearSize: u32, + dwDepth: u32, + dwMipMapCount: u32, + <span class="attr">#[allow(unused)] + </span>dwReserved1: [u32; <span class="number">11</span>], + ddspf: DDS_PIXELFORMAT, + dwCaps: u32, + dwCaps2: u32, + dwCaps3: u32, + dwCaps4: u32, + <span class="attr">#[allow(unused)] + </span>dwReserved2: u32, + } + + <span class="kw">impl </span>Eq <span class="kw">for </span>DDS_HEADER {} + + <span class="kw">impl </span>PartialEq <span class="kw">for </span>DDS_HEADER { + <span class="kw">fn </span>eq(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> bool { + <span class="macro">macro_rules! </span>compare { + (<span class="macro-nonterminal">$name</span>:ident) => { + <span class="self">self</span>.<span class="macro-nonterminal">$name </span>== other.<span class="macro-nonterminal">$name + </span>}; + } + + <span class="macro">compare!</span>(dwSize) + && <span class="macro">compare!</span>(dwFlags) + && <span class="macro">compare!</span>(dwHeight) + && <span class="macro">compare!</span>(dwWidth) + && <span class="macro">compare!</span>(dwPitchOrLinearSize) + && <span class="macro">compare!</span>(dwDepth) + && <span class="macro">compare!</span>(dwMipMapCount) + && <span class="macro">compare!</span>(ddspf) + && <span class="macro">compare!</span>(dwCaps) + && <span class="macro">compare!</span>(dwCaps2) + && <span class="macro">compare!</span>(dwCaps3) + && <span class="macro">compare!</span>(dwCaps4) + } + } + + <span class="attr">#[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone, Copy, Debug)] + </span><span class="kw">struct </span>DDS_HEADER_DXT10 { + dxgiFormat: DXGI_FORMAT, + resourceDimension: u32, + miscFlag: u32, + arraySize: u32, + <span class="attr">#[allow(unused)] + </span>miscFlags2: u32, + } + + <span class="kw">impl </span>Eq <span class="kw">for </span>DDS_HEADER_DXT10 {} + + <span class="kw">impl </span>PartialEq <span class="kw">for </span>DDS_HEADER_DXT10 { + <span class="kw">fn </span>eq(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> bool { + <span class="macro">macro_rules! </span>compare { + (<span class="macro-nonterminal">$name</span>:ident) => { + <span class="self">self</span>.<span class="macro-nonterminal">$name </span>== other.<span class="macro-nonterminal">$name + </span>}; + } + + <span class="macro">compare!</span>(dxgiFormat) + && <span class="macro">compare!</span>(resourceDimension) + && <span class="macro">compare!</span>(miscFlag) + && <span class="macro">compare!</span>(arraySize) + } + } + + <span class="attr">#[allow(non_snake_case)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + </span><span class="kw">struct </span>DDS9Header { + dwMagic: u32, + header: DDS_HEADER, + } + + <span class="attr">#[allow(non_snake_case)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + </span><span class="kw">struct </span>DDS10Header { + header9: DDS9Header, + header10: DDS_HEADER_DXT10, + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>pack_unpack_texture_archives() -> anyhow::Result<()> { + <span class="kw">let </span>root = Path::new(<span class="string">"data/fo4_dds_test"</span>); + <span class="kw">let </span>original = { + <span class="kw">let </span>fd = fs::File::open(root.join(<span class="string">"in.ba2"</span>)).context(<span class="string">"failed to open archive"</span>)<span class="question-mark">?</span>; + <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) }.context(<span class="string">"failed to map archive"</span>)<span class="question-mark">? + </span>}; + + <span class="kw">let </span>(archive, options) = + Archive::read(Borrowed(<span class="kw-2">&</span>original[..])).context(<span class="string">"failed to read archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(options.format(), Format::DX10); + <span class="macro">assert_eq!</span>(options.compression_format(), CompressionFormat::Zip); + + { + <span class="kw">let </span>file_name = <span class="string">"Fence006_1K_Roughness.dds"</span>; + <span class="kw">let </span>original = { + <span class="kw">let </span>fd = fs::File::open(root.join(file_name)).context(<span class="string">"failed to open file"</span>)<span class="question-mark">?</span>; + <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) }.context(<span class="string">"failed to map file"</span>)<span class="question-mark">? + </span>}; + <span class="kw">let </span>file = { + <span class="kw">let </span>from_archive = archive + .get(<span class="kw-2">&</span>ArchiveKey::from(file_name)) + .context(<span class="string">"failed to get file from archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert!</span>(!from_archive.is_empty()); + <span class="kw">for </span>chunk <span class="kw">in </span>from_archive { + <span class="macro">assert!</span>(chunk.is_decompressed()); + } + + <span class="kw">let </span>options = FileReadOptions::builder().format(Format::DX10).build(); + <span class="kw">let </span>from_disk = + File::read(Borrowed(<span class="kw-2">&</span>original), <span class="kw-2">&</span>options).context(<span class="string">"failed to read file"</span>)<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(from_disk.header, from_archive.header); + <span class="macro">assert_eq!</span>(from_disk.len(), from_archive.len()); + <span class="kw">for </span>(disk, archived) <span class="kw">in </span>from_disk.iter().zip(from_archive) { + <span class="macro">assert_eq!</span>(disk.mips, archived.mips); + <span class="macro">assert_eq!</span>(disk.as_bytes(), archived.as_bytes()); + } + + from_archive + }; + <span class="kw">let </span>copy = { + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); + file.write(<span class="kw-2">&mut </span>v, <span class="kw-2">&</span>Default::default()) + .context(<span class="string">"failed to write file"</span>)<span class="question-mark">?</span>; + v + }; + <span class="macro">assert_eq!</span>(original.len(), copy.len()); + + <span class="kw">let </span>header_size = mem::size_of::<DDS10Header>(); + <span class="kw">let </span>get_header = |bytes: <span class="kw-2">&</span>[u8]| <span class="kw">unsafe </span>{ + bytes[..header_size] + .as_ptr() + .cast::<DDS10Header>() + .read_unaligned() + }; + <span class="kw">let </span>original_header = get_header(<span class="kw-2">&</span>original[..]); + <span class="kw">let </span>copy_header = get_header(<span class="kw-2">&</span>copy); + <span class="macro">assert_eq!</span>(original_header, copy_header); + <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>original[header_size..], <span class="kw-2">&</span>copy[header_size..]); + } + + <span class="kw">let </span>copy = { + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); + archive + .write(<span class="kw-2">&mut </span>v, <span class="kw-2">&</span>options) + .context(<span class="string">"failed to write archive"</span>)<span class="question-mark">?</span>; + v + }; + + <span class="macro">assert_eq!</span>(original.len(), copy.len()); + <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>original[..], <span class="kw-2">&</span>copy); + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>dx9() -> anyhow::Result<()> { + <span class="kw">let </span>root = Path::new(<span class="string">"data/fo4_dx9_test"</span>); + <span class="kw">let </span>file_names = [<span class="string">"dx9.dds"</span>, <span class="string">"blacksky_e.dds"</span>, <span class="string">"bleakfallscube_e.dds"</span>]; + <span class="kw">for </span>file_name <span class="kw">in </span>file_names { + <span class="kw">let </span>original = { + <span class="kw">let </span>fd = fs::File::open(root.join(file_name)) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) } + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to map file: {file_name}"</span>))<span class="question-mark">? + </span>}; + + <span class="kw">let </span>copy = { + <span class="kw">let </span>options = FileReadOptions::builder().format(Format::DX10).build(); + <span class="kw">let </span>file = File::read(Borrowed(<span class="kw-2">&</span>original[..]), <span class="kw-2">&</span>options) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to read file: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); + file.write(<span class="kw-2">&mut </span>v, <span class="kw-2">&</span>Default::default()) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to write file: {file_name}"</span>))<span class="question-mark">?</span>; + v + }; + + <span class="macro">assert_eq!</span>(original.len(), copy.len()); + <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>original[..], <span class="kw-2">&</span>copy); + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_exhausted() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/fo4_invalid_test/invalid_exhausted.ba2"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::Io(error)) => { + <span class="macro">assert_eq!</span>(error.kind(), io::ErrorKind::UnexpectedEof); + <span class="prelude-val">Ok</span>(()) + } + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(err.into()), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_format() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/fo4_invalid_test/invalid_format.ba2"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidFormat(x)) <span class="kw">if </span>x == cc::make_four(<span class="string">b"BLAH"</span>) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(anyhow::Error::from(err)), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_magic() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/fo4_invalid_test/invalid_magic.ba2"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidMagic(x)) <span class="kw">if </span>x == cc::make_four(<span class="string">b"BLAH"</span>) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(anyhow::Error::from(err)), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_sentinel() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/fo4_invalid_test/invalid_sentinel.ba2"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidChunkSentinel(<span class="number">0xDEADBEEF</span>)) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(anyhow::Error::from(err)), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_size() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/fo4_invalid_test/invalid_size.ba2"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidChunkSize(<span class="number">0xCCCC</span>)) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(anyhow::Error::from(err)), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_version() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/fo4_invalid_test/invalid_version.ba2"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidVersion(<span class="number">0x101</span>)) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(anyhow::Error::from(err)), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>string_tables_are_optional() -> anyhow::Result<()> { + <span class="kw">let </span>root = Path::new(<span class="string">"data/fo4_missing_string_table_test"</span>); + <span class="kw">let </span>original = { + <span class="kw">let </span>fd = fs::File::open(root.join(<span class="string">"in.ba2"</span>)).context(<span class="string">"failed to open archive"</span>)<span class="question-mark">?</span>; + <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) }.context(<span class="string">"failed to map archive"</span>)<span class="question-mark">? + </span>}; + + <span class="kw">let </span>(archive, options) = { + <span class="kw">let </span>(archive, options) = + Archive::read(Borrowed(<span class="kw-2">&</span>original[..])).context(<span class="string">"failed to read archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(options.format(), Format::GNRL); + + <span class="kw">let </span>file_name = <span class="string">"misc/example.txt"</span>; + <span class="kw">let </span>(key, file) = archive + .get_key_value(<span class="kw-2">&</span>ArchiveKey::from(<span class="string">"misc/example.txt"</span>)) + .context(<span class="string">"failed to get file"</span>)<span class="question-mark">?</span>; + <span class="macro">assert!</span>(key.name().is_empty()); + <span class="macro">assert_eq!</span>(file.len(), <span class="number">1</span>); + + <span class="kw">let </span>chunk = <span class="kw-2">&</span>file[<span class="number">0</span>]; + <span class="kw">let </span>mapped = { + <span class="kw">let </span>fd = fs::File::open(root.join(<span class="string">"data"</span>).join(file_name)) + .context(<span class="string">"failed to open original file"</span>)<span class="question-mark">?</span>; + <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) }.context(<span class="string">"failed to map file"</span>)<span class="question-mark">? + </span>}; + + <span class="macro">assert!</span>(chunk.is_decompressed()); + <span class="macro">assert_eq!</span>(chunk.len(), mapped.len()); + <span class="macro">assert_eq!</span>(chunk.as_bytes(), <span class="kw-2">&</span>mapped[..]); + + (archive, options) + }; + + <span class="kw">let </span>copy = { + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); + archive + .write(<span class="kw-2">&mut </span>v, <span class="kw-2">&</span>options) + .context(<span class="string">"failed to write archive"</span>)<span class="question-mark">?</span>; + v + }; + + <span class="macro">assert_eq!</span>(copy.len(), original.len()); + <span class="macro">assert_eq!</span>(copy, <span class="kw-2">&</span>original[..]); + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>write_general_archives() -> anyhow::Result<()> { + <span class="kw">let </span>root = Path::new(<span class="string">"data/fo4_write_test/data"</span>); + + <span class="kw">struct </span>Info { + key: ArchiveKey<<span class="lifetime">'static</span>>, + path: OsString, + } + + <span class="kw">impl </span>Info { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>new(file: u32, extension: <span class="kw-2">&</span>[u8], directory: u32, path: <span class="kw-2">&</span>str) -> <span class="self">Self </span>{ + <span class="kw">let </span>key: ArchiveKey = path.into(); + <span class="macro">assert_eq!</span>(key.hash().file, file); + <span class="macro">assert_eq!</span>(key.hash().extension, cc::make_four(extension)); + <span class="macro">assert_eq!</span>(key.hash().directory, directory); + <span class="self">Self </span>{ + key, + path: OsString::from_str(path).unwrap(), + } + } + } + + <span class="kw">let </span>infos = [ + Info::new( + <span class="number">0x35B94567</span>, + <span class="string">b"png"</span>, + <span class="number">0x5FE2DC26</span>, + <span class="string">"Background/background_tilemap.png"</span>, + ), + Info::new( + <span class="number">0x53D5F897</span>, + <span class="string">b"png"</span>, + <span class="number">0xD9A32978</span>, + <span class="string">"Characters/character_0003.png"</span>, + ), + Info::new(<span class="number">0x36F72750</span>, <span class="string">b"txt"</span>, <span class="number">0x60648919</span>, <span class="string">"Construct 3/Readme.txt"</span>), + Info::new(<span class="number">0xCA042B67</span>, <span class="string">b"txt"</span>, <span class="number">0x29246A47</span>, <span class="string">"Share/License.txt"</span>), + Info::new(<span class="number">0xDA3773A6</span>, <span class="string">b"png"</span>, <span class="number">0x0B0A447E</span>, <span class="string">"Tilemap/tiles.png"</span>), + Info::new(<span class="number">0x785183FF</span>, <span class="string">b"png"</span>, <span class="number">0xDA3773A6</span>, <span class="string">"Tiles/tile_0003.png"</span>), + ]; + + <span class="kw">let </span>mappings: Vec<<span class="kw">_</span>> = infos + .iter() + .map(|info| { + <span class="kw">let </span>path: PathBuf = [root.as_os_str(), info.path.as_ref()].into_iter().collect(); + <span class="kw">let </span>fd = fs::File::open(<span class="kw-2">&</span>path) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>map = <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) } + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to memory map file: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(map) + }) + .collect::<anyhow::Result<<span class="kw">_</span>>>()<span class="question-mark">?</span>; + <span class="kw">let </span>main: Archive = infos + .iter() + .zip(<span class="kw-2">&</span>mappings) + .map(|(info, mapping)| { + <span class="kw">let </span>file = File::read(Borrowed(<span class="kw-2">&</span>mapping[..]), <span class="kw-2">&</span>Default::default())<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>((info.key.clone(), file)) + }) + .collect::<anyhow::Result<<span class="kw">_</span>>>()<span class="question-mark">?</span>; + + <span class="kw">let </span>test = |strings: bool| -> anyhow::Result<()> { + <span class="kw">let </span>buffer = { + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); + <span class="kw">let </span>options = ArchiveOptions::builder().strings(strings).build(); + main.write(<span class="kw-2">&mut </span>v, <span class="kw-2">&</span>options) + .context(<span class="string">"failed to write archive to buffer"</span>)<span class="question-mark">?</span>; + v + }; + + <span class="kw">let </span>(child, options) = + Archive::read(Borrowed(<span class="kw-2">&</span>buffer)).context(<span class="string">"failed to read archive from buffer"</span>)<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(options.strings(), strings); + <span class="macro">assert_eq!</span>(main.len(), child.len()); + + <span class="kw">for </span>(info, mapping) <span class="kw">in </span>infos.iter().zip(<span class="kw-2">&</span>mappings) { + <span class="kw">let </span>file = child.get_key_value(<span class="kw-2">&</span>info.key).with_context(|| { + <span class="macro">format!</span>(<span class="string">"failed to get file: {}"</span>, info.key.name().to_str_lossy()) + })<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(file.<span class="number">0</span>.hash(), info.key.hash()); + <span class="macro">assert_eq!</span>(file.<span class="number">1</span>.len(), <span class="number">1</span>); + <span class="kw">if </span>strings { + <span class="macro">assert_eq!</span>(file.<span class="number">0</span>.name(), info.key.name()); + } + + <span class="kw">let </span>chunk = <span class="kw-2">&</span>file.<span class="number">1</span>[<span class="number">0</span>]; + <span class="kw">let </span>decompressed_chunk = <span class="kw">if </span>chunk.is_compressed() { + <span class="kw">let </span>result = chunk.decompress(<span class="kw-2">&</span>Default::default()).with_context(|| { + <span class="macro">format!</span>( + <span class="string">"failed to decompress chunk: {}"</span>, + info.key.name().to_str_lossy() + ) + })<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(result) + } <span class="kw">else </span>{ + <span class="prelude-val">None + </span>}; + <span class="kw">let </span>decompressed_bytes = decompressed_chunk.as_ref().unwrap_or(chunk).as_bytes(); + <span class="macro">assert_eq!</span>(decompressed_bytes, <span class="kw-2">&</span>mapping[..]); + } + + <span class="prelude-val">Ok</span>(()) + }; + + test(<span class="bool-val">true</span>)<span class="question-mark">?</span>; + test(<span class="bool-val">false</span>)<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(()) + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/fo4/chunk.rs.html b/src/ba2/fo4/chunk.rs.html new file mode 100644 index 0000000..7b81718 --- /dev/null +++ b/src/ba2/fo4/chunk.rs.html @@ -0,0 +1,503 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/fo4/chunk.rs`."><title>chunk.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + containers::CompressableBytes, + derive, + fo4::{ArchiveOptions, CompressionFormat, CompressionLevel, Error, FileWriteOptions, <span class="prelude-ty">Result</span>}, +}; +<span class="kw">use </span>core::ops::RangeInclusive; +<span class="kw">use </span>flate2::{ + write::{ZlibDecoder, ZlibEncoder}, + Compress, Compression, +}; +<span class="kw">use </span>lzzzz::{lz4, lz4_hc}; +<span class="kw">use </span>std::io::Write; + +<span class="doccomment">/// See also [`ChunkCompressionOptions`](CompressionOptions). +</span><span class="attr">#[derive(Debug, Default)] +#[repr(transparent)] +</span><span class="kw">pub struct </span>CompressionOptionsBuilder(CompressionOptions); + +<span class="kw">impl </span>CompressionOptionsBuilder { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>build(<span class="self">self</span>) -> CompressionOptions { + <span class="self">self</span>.<span class="number">0 + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_format(<span class="kw-2">mut </span><span class="self">self</span>, compression_format: CompressionFormat) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_format = compression_format; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_level(<span class="kw-2">mut </span><span class="self">self</span>, compression_level: CompressionLevel) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_level = compression_level; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>CompressionOptionsBuilder { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>CompressionOptionsBuilder { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self</span>(value.into()) + } +} + +<span class="kw">impl </span>From<FileWriteOptions> <span class="kw">for </span>CompressionOptionsBuilder { + <span class="kw">fn </span>from(value: FileWriteOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>FileWriteOptions> <span class="kw">for </span>CompressionOptionsBuilder { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>FileWriteOptions) -> <span class="self">Self </span>{ + <span class="self">Self</span>(value.into()) + } +} + +<span class="doccomment">/// Common parameters to configure how chunks are compressed. +/// +/// ```rust +/// use ba2::fo4::{ChunkCompressionOptions, CompressionFormat, CompressionLevel}; +/// +/// // Configure for FO4/FO76 +/// let _ = ChunkCompressionOptions::builder() +/// .compression_format(CompressionFormat::Zip) +/// .compression_level(CompressionLevel::FO4) +/// .build(); +/// +/// // Configure for FO4 on the xbox +/// let _ = ChunkCompressionOptions::builder() +/// .compression_format(CompressionFormat::Zip) +/// .compression_level(CompressionLevel::FO4Xbox) +/// .build(); +/// +/// // Configure for SF, GNRL format +/// let _ = ChunkCompressionOptions::builder() +/// .compression_format(CompressionFormat::Zip) +/// .compression_level(CompressionLevel::SF) +/// .build(); +/// +/// // Configure for SF, DX10 format +/// let _ = ChunkCompressionOptions::builder() +/// .compression_format(CompressionFormat::LZ4) +/// .build(); +/// ``` +</span><span class="attr">#[derive(Clone, Copy, Debug, Default)] +</span><span class="kw">pub struct </span>CompressionOptions { + <span class="kw">pub</span>(<span class="kw">crate</span>) compression_format: CompressionFormat, + <span class="kw">pub</span>(<span class="kw">crate</span>) compression_level: CompressionLevel, +} + +<span class="kw">impl </span>CompressionOptions { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>builder() -> CompressionOptionsBuilder { + CompressionOptionsBuilder::new() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_format(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionFormat { + <span class="self">self</span>.compression_format + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_level(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionLevel { + <span class="self">self</span>.compression_level + } +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>CompressionOptions { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>CompressionOptions { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + compression_format: value.compression_format(), + ..Default::default() + } + } +} + +<span class="kw">impl </span>From<FileWriteOptions> <span class="kw">for </span>CompressionOptions { + <span class="kw">fn </span>from(value: FileWriteOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>FileWriteOptions> <span class="kw">for </span>CompressionOptions { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>FileWriteOptions) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + compression_format: value.compression_format(), + ..Default::default() + } + } +} + +<span class="doccomment">/// Represents a chunk of a file within the FO4 virtual filesystem. +</span><span class="attr">#[derive(Clone, Debug, Default)] +</span><span class="kw">pub struct </span>Chunk<<span class="lifetime">'bytes</span>> { + <span class="kw">pub</span>(<span class="kw">crate</span>) bytes: CompressableBytes<<span class="lifetime">'bytes</span>>, + <span class="kw">pub </span>mips: <span class="prelude-ty">Option</span><RangeInclusive<u16>>, +} + +<span class="macro">derive::compressable_bytes!</span>(Chunk: CompressionOptions); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Chunk<<span class="lifetime">'bytes</span>> { + <span class="kw">pub fn </span>compress_into(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>, options: <span class="kw-2">&</span>CompressionOptions) -> <span class="prelude-ty">Result</span><()> { + <span class="kw">if </span><span class="self">self</span>.is_compressed() { + <span class="prelude-val">Err</span>(Error::AlreadyCompressed) + } <span class="kw">else </span>{ + <span class="kw">match </span>options.compression_format { + CompressionFormat::Zip => <span class="kw">match </span>options.compression_level { + CompressionLevel::FO4 => { + <span class="self">self</span>.compress_into_zlib(out, Compression::default(), <span class="number">15</span>) + } + CompressionLevel::FO4Xbox => { + <span class="self">self</span>.compress_into_zlib(out, Compression::best(), <span class="number">12</span>) + } + CompressionLevel::SF => <span class="self">self</span>.compress_into_zlib(out, Compression::best(), <span class="number">15</span>), + }, + CompressionFormat::LZ4 => <span class="self">self</span>.compress_into_lz4(out), + } + } + } + + <span class="kw">pub fn </span>decompress_into(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>, options: <span class="kw-2">&</span>CompressionOptions) -> <span class="prelude-ty">Result</span><()> { + <span class="kw">let </span><span class="prelude-val">Some</span>(decompressed_len) = <span class="self">self</span>.decompressed_len() <span class="kw">else </span>{ + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::AlreadyDecompressed); + }; + + out.reserve_exact(decompressed_len); + <span class="kw">let </span>out_len = <span class="kw">match </span>options.compression_format { + CompressionFormat::Zip => <span class="self">self</span>.decompress_into_zlib(out), + CompressionFormat::LZ4 => <span class="self">self</span>.decompress_into_lz4(out), + }<span class="question-mark">?</span>; + + <span class="kw">if </span>out_len == decompressed_len { + <span class="prelude-val">Ok</span>(()) + } <span class="kw">else </span>{ + <span class="prelude-val">Err</span>(Error::DecompressionSizeMismatch { + expected: decompressed_len, + actual: out_len, + }) + } + } + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>copy_with<<span class="lifetime">'other</span>>(<span class="kw-2">&</span><span class="self">self</span>, bytes: CompressableBytes<<span class="lifetime">'other</span>>) -> Chunk<<span class="lifetime">'other</span>> { + Chunk { + bytes, + mips: <span class="self">self</span>.mips.clone(), + } + } + + <span class="kw">fn </span>compress_into_lz4(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>) -> <span class="prelude-ty">Result</span><()> { + lz4_hc::compress_to_vec(<span class="self">self</span>.as_bytes(), out, lz4_hc::CLEVEL_MAX)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>compress_into_zlib( + <span class="kw-2">&</span><span class="self">self</span>, + out: <span class="kw-2">&mut </span>Vec<u8>, + level: Compression, + window_bits: u8, + ) -> <span class="prelude-ty">Result</span><()> { + <span class="kw">let </span><span class="kw-2">mut </span>e = ZlibEncoder::new_with_compress( + out, + Compress::new_with_window_bits(level, <span class="bool-val">true</span>, window_bits), + ); + e.write_all(<span class="self">self</span>.as_bytes())<span class="question-mark">?</span>; + e.finish()<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>decompress_into_lz4(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>[u8]) -> <span class="prelude-ty">Result</span><usize> { + <span class="kw">let </span>len = lz4::decompress(<span class="self">self</span>.as_bytes(), out)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(len) + } + + <span class="kw">fn </span>decompress_into_zlib(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>) -> <span class="prelude-ty">Result</span><usize> { + <span class="kw">let </span><span class="kw-2">mut </span>d = ZlibDecoder::new(out); + d.write_all(<span class="self">self</span>.as_bytes())<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(d.total_out().try_into()<span class="question-mark">?</span>) + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">super</span>::Chunk; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() { + <span class="kw">let </span>c = Chunk::default(); + <span class="macro">assert!</span>(c.is_empty()); + <span class="macro">assert!</span>(!c.is_compressed()); + <span class="macro">assert!</span>(c.is_decompressed()); + <span class="macro">assert_eq!</span>(c.len(), <span class="number">0</span>); + <span class="macro">assert_eq!</span>(c.mips, <span class="prelude-val">None</span>); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/fo4/file.rs.html b/src/ba2/fo4/file.rs.html new file mode 100644 index 0000000..8d2b747 --- /dev/null +++ b/src/ba2/fo4/file.rs.html @@ -0,0 +1,3077 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/fo4/file.rs`."><title>file.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +<a href="#285" id="285">285</a> +<a href="#286" id="286">286</a> +<a href="#287" id="287">287</a> +<a href="#288" id="288">288</a> +<a href="#289" id="289">289</a> +<a href="#290" id="290">290</a> +<a href="#291" id="291">291</a> +<a href="#292" id="292">292</a> +<a href="#293" id="293">293</a> +<a href="#294" id="294">294</a> +<a href="#295" id="295">295</a> +<a href="#296" id="296">296</a> +<a href="#297" id="297">297</a> +<a href="#298" id="298">298</a> +<a href="#299" id="299">299</a> +<a href="#300" id="300">300</a> +<a href="#301" id="301">301</a> +<a href="#302" id="302">302</a> +<a href="#303" id="303">303</a> +<a href="#304" id="304">304</a> +<a href="#305" id="305">305</a> +<a href="#306" id="306">306</a> +<a href="#307" id="307">307</a> +<a href="#308" id="308">308</a> +<a href="#309" id="309">309</a> +<a href="#310" id="310">310</a> +<a href="#311" id="311">311</a> +<a href="#312" id="312">312</a> +<a href="#313" id="313">313</a> +<a href="#314" id="314">314</a> +<a href="#315" id="315">315</a> +<a href="#316" id="316">316</a> +<a href="#317" id="317">317</a> +<a href="#318" id="318">318</a> +<a href="#319" id="319">319</a> +<a href="#320" id="320">320</a> +<a href="#321" id="321">321</a> +<a href="#322" id="322">322</a> +<a href="#323" id="323">323</a> +<a href="#324" id="324">324</a> +<a href="#325" id="325">325</a> +<a href="#326" id="326">326</a> +<a href="#327" id="327">327</a> +<a href="#328" id="328">328</a> +<a href="#329" id="329">329</a> +<a href="#330" id="330">330</a> +<a href="#331" id="331">331</a> +<a href="#332" id="332">332</a> +<a href="#333" id="333">333</a> +<a href="#334" id="334">334</a> +<a href="#335" id="335">335</a> +<a href="#336" id="336">336</a> +<a href="#337" id="337">337</a> +<a href="#338" id="338">338</a> +<a href="#339" id="339">339</a> +<a href="#340" id="340">340</a> +<a href="#341" id="341">341</a> +<a href="#342" id="342">342</a> +<a href="#343" id="343">343</a> +<a href="#344" id="344">344</a> +<a href="#345" id="345">345</a> +<a href="#346" id="346">346</a> +<a href="#347" id="347">347</a> +<a href="#348" id="348">348</a> +<a href="#349" id="349">349</a> +<a href="#350" id="350">350</a> +<a href="#351" id="351">351</a> +<a href="#352" id="352">352</a> +<a href="#353" id="353">353</a> +<a href="#354" id="354">354</a> +<a href="#355" id="355">355</a> +<a href="#356" id="356">356</a> +<a href="#357" id="357">357</a> +<a href="#358" id="358">358</a> +<a href="#359" id="359">359</a> +<a href="#360" id="360">360</a> +<a href="#361" id="361">361</a> +<a href="#362" id="362">362</a> +<a href="#363" id="363">363</a> +<a href="#364" id="364">364</a> +<a href="#365" id="365">365</a> +<a href="#366" id="366">366</a> +<a href="#367" id="367">367</a> +<a href="#368" id="368">368</a> +<a href="#369" id="369">369</a> +<a href="#370" id="370">370</a> +<a href="#371" id="371">371</a> +<a href="#372" id="372">372</a> +<a href="#373" id="373">373</a> +<a href="#374" id="374">374</a> +<a href="#375" id="375">375</a> +<a href="#376" id="376">376</a> +<a href="#377" id="377">377</a> +<a href="#378" id="378">378</a> +<a href="#379" id="379">379</a> +<a href="#380" id="380">380</a> +<a href="#381" id="381">381</a> +<a href="#382" id="382">382</a> +<a href="#383" id="383">383</a> +<a href="#384" id="384">384</a> +<a href="#385" id="385">385</a> +<a href="#386" id="386">386</a> +<a href="#387" id="387">387</a> +<a href="#388" id="388">388</a> +<a href="#389" id="389">389</a> +<a href="#390" id="390">390</a> +<a href="#391" id="391">391</a> +<a href="#392" id="392">392</a> +<a href="#393" id="393">393</a> +<a href="#394" id="394">394</a> +<a href="#395" id="395">395</a> +<a href="#396" id="396">396</a> +<a href="#397" id="397">397</a> +<a href="#398" id="398">398</a> +<a href="#399" id="399">399</a> +<a href="#400" id="400">400</a> +<a href="#401" id="401">401</a> +<a href="#402" id="402">402</a> +<a href="#403" id="403">403</a> +<a href="#404" id="404">404</a> +<a href="#405" id="405">405</a> +<a href="#406" id="406">406</a> +<a href="#407" id="407">407</a> +<a href="#408" id="408">408</a> +<a href="#409" id="409">409</a> +<a href="#410" id="410">410</a> +<a href="#411" id="411">411</a> +<a href="#412" id="412">412</a> +<a href="#413" id="413">413</a> +<a href="#414" id="414">414</a> +<a href="#415" id="415">415</a> +<a href="#416" id="416">416</a> +<a href="#417" id="417">417</a> +<a href="#418" id="418">418</a> +<a href="#419" id="419">419</a> +<a href="#420" id="420">420</a> +<a href="#421" id="421">421</a> +<a href="#422" id="422">422</a> +<a href="#423" id="423">423</a> +<a href="#424" id="424">424</a> +<a href="#425" id="425">425</a> +<a href="#426" id="426">426</a> +<a href="#427" id="427">427</a> +<a href="#428" id="428">428</a> +<a href="#429" id="429">429</a> +<a href="#430" id="430">430</a> +<a href="#431" id="431">431</a> +<a href="#432" id="432">432</a> +<a href="#433" id="433">433</a> +<a href="#434" id="434">434</a> +<a href="#435" id="435">435</a> +<a href="#436" id="436">436</a> +<a href="#437" id="437">437</a> +<a href="#438" id="438">438</a> +<a href="#439" id="439">439</a> +<a href="#440" id="440">440</a> +<a href="#441" id="441">441</a> +<a href="#442" id="442">442</a> +<a href="#443" id="443">443</a> +<a href="#444" id="444">444</a> +<a href="#445" id="445">445</a> +<a href="#446" id="446">446</a> +<a href="#447" id="447">447</a> +<a href="#448" id="448">448</a> +<a href="#449" id="449">449</a> +<a href="#450" id="450">450</a> +<a href="#451" id="451">451</a> +<a href="#452" id="452">452</a> +<a href="#453" id="453">453</a> +<a href="#454" id="454">454</a> +<a href="#455" id="455">455</a> +<a href="#456" id="456">456</a> +<a href="#457" id="457">457</a> +<a href="#458" id="458">458</a> +<a href="#459" id="459">459</a> +<a href="#460" id="460">460</a> +<a href="#461" id="461">461</a> +<a href="#462" id="462">462</a> +<a href="#463" id="463">463</a> +<a href="#464" id="464">464</a> +<a href="#465" id="465">465</a> +<a href="#466" id="466">466</a> +<a href="#467" id="467">467</a> +<a href="#468" id="468">468</a> +<a href="#469" id="469">469</a> +<a href="#470" id="470">470</a> +<a href="#471" id="471">471</a> +<a href="#472" id="472">472</a> +<a href="#473" id="473">473</a> +<a href="#474" id="474">474</a> +<a href="#475" id="475">475</a> +<a href="#476" id="476">476</a> +<a href="#477" id="477">477</a> +<a href="#478" id="478">478</a> +<a href="#479" id="479">479</a> +<a href="#480" id="480">480</a> +<a href="#481" id="481">481</a> +<a href="#482" id="482">482</a> +<a href="#483" id="483">483</a> +<a href="#484" id="484">484</a> +<a href="#485" id="485">485</a> +<a href="#486" id="486">486</a> +<a href="#487" id="487">487</a> +<a href="#488" id="488">488</a> +<a href="#489" id="489">489</a> +<a href="#490" id="490">490</a> +<a href="#491" id="491">491</a> +<a href="#492" id="492">492</a> +<a href="#493" id="493">493</a> +<a href="#494" id="494">494</a> +<a href="#495" id="495">495</a> +<a href="#496" id="496">496</a> +<a href="#497" id="497">497</a> +<a href="#498" id="498">498</a> +<a href="#499" id="499">499</a> +<a href="#500" id="500">500</a> +<a href="#501" id="501">501</a> +<a href="#502" id="502">502</a> +<a href="#503" id="503">503</a> +<a href="#504" id="504">504</a> +<a href="#505" id="505">505</a> +<a href="#506" id="506">506</a> +<a href="#507" id="507">507</a> +<a href="#508" id="508">508</a> +<a href="#509" id="509">509</a> +<a href="#510" id="510">510</a> +<a href="#511" id="511">511</a> +<a href="#512" id="512">512</a> +<a href="#513" id="513">513</a> +<a href="#514" id="514">514</a> +<a href="#515" id="515">515</a> +<a href="#516" id="516">516</a> +<a href="#517" id="517">517</a> +<a href="#518" id="518">518</a> +<a href="#519" id="519">519</a> +<a href="#520" id="520">520</a> +<a href="#521" id="521">521</a> +<a href="#522" id="522">522</a> +<a href="#523" id="523">523</a> +<a href="#524" id="524">524</a> +<a href="#525" id="525">525</a> +<a href="#526" id="526">526</a> +<a href="#527" id="527">527</a> +<a href="#528" id="528">528</a> +<a href="#529" id="529">529</a> +<a href="#530" id="530">530</a> +<a href="#531" id="531">531</a> +<a href="#532" id="532">532</a> +<a href="#533" id="533">533</a> +<a href="#534" id="534">534</a> +<a href="#535" id="535">535</a> +<a href="#536" id="536">536</a> +<a href="#537" id="537">537</a> +<a href="#538" id="538">538</a> +<a href="#539" id="539">539</a> +<a href="#540" id="540">540</a> +<a href="#541" id="541">541</a> +<a href="#542" id="542">542</a> +<a href="#543" id="543">543</a> +<a href="#544" id="544">544</a> +<a href="#545" id="545">545</a> +<a href="#546" id="546">546</a> +<a href="#547" id="547">547</a> +<a href="#548" id="548">548</a> +<a href="#549" id="549">549</a> +<a href="#550" id="550">550</a> +<a href="#551" id="551">551</a> +<a href="#552" id="552">552</a> +<a href="#553" id="553">553</a> +<a href="#554" id="554">554</a> +<a href="#555" id="555">555</a> +<a href="#556" id="556">556</a> +<a href="#557" id="557">557</a> +<a href="#558" id="558">558</a> +<a href="#559" id="559">559</a> +<a href="#560" id="560">560</a> +<a href="#561" id="561">561</a> +<a href="#562" id="562">562</a> +<a href="#563" id="563">563</a> +<a href="#564" id="564">564</a> +<a href="#565" id="565">565</a> +<a href="#566" id="566">566</a> +<a href="#567" id="567">567</a> +<a href="#568" id="568">568</a> +<a href="#569" id="569">569</a> +<a href="#570" id="570">570</a> +<a href="#571" id="571">571</a> +<a href="#572" id="572">572</a> +<a href="#573" id="573">573</a> +<a href="#574" id="574">574</a> +<a href="#575" id="575">575</a> +<a href="#576" id="576">576</a> +<a href="#577" id="577">577</a> +<a href="#578" id="578">578</a> +<a href="#579" id="579">579</a> +<a href="#580" id="580">580</a> +<a href="#581" id="581">581</a> +<a href="#582" id="582">582</a> +<a href="#583" id="583">583</a> +<a href="#584" id="584">584</a> +<a href="#585" id="585">585</a> +<a href="#586" id="586">586</a> +<a href="#587" id="587">587</a> +<a href="#588" id="588">588</a> +<a href="#589" id="589">589</a> +<a href="#590" id="590">590</a> +<a href="#591" id="591">591</a> +<a href="#592" id="592">592</a> +<a href="#593" id="593">593</a> +<a href="#594" id="594">594</a> +<a href="#595" id="595">595</a> +<a href="#596" id="596">596</a> +<a href="#597" id="597">597</a> +<a href="#598" id="598">598</a> +<a href="#599" id="599">599</a> +<a href="#600" id="600">600</a> +<a href="#601" id="601">601</a> +<a href="#602" id="602">602</a> +<a href="#603" id="603">603</a> +<a href="#604" id="604">604</a> +<a href="#605" id="605">605</a> +<a href="#606" id="606">606</a> +<a href="#607" id="607">607</a> +<a href="#608" id="608">608</a> +<a href="#609" id="609">609</a> +<a href="#610" id="610">610</a> +<a href="#611" id="611">611</a> +<a href="#612" id="612">612</a> +<a href="#613" id="613">613</a> +<a href="#614" id="614">614</a> +<a href="#615" id="615">615</a> +<a href="#616" id="616">616</a> +<a href="#617" id="617">617</a> +<a href="#618" id="618">618</a> +<a href="#619" id="619">619</a> +<a href="#620" id="620">620</a> +<a href="#621" id="621">621</a> +<a href="#622" id="622">622</a> +<a href="#623" id="623">623</a> +<a href="#624" id="624">624</a> +<a href="#625" id="625">625</a> +<a href="#626" id="626">626</a> +<a href="#627" id="627">627</a> +<a href="#628" id="628">628</a> +<a href="#629" id="629">629</a> +<a href="#630" id="630">630</a> +<a href="#631" id="631">631</a> +<a href="#632" id="632">632</a> +<a href="#633" id="633">633</a> +<a href="#634" id="634">634</a> +<a href="#635" id="635">635</a> +<a href="#636" id="636">636</a> +<a href="#637" id="637">637</a> +<a href="#638" id="638">638</a> +<a href="#639" id="639">639</a> +<a href="#640" id="640">640</a> +<a href="#641" id="641">641</a> +<a href="#642" id="642">642</a> +<a href="#643" id="643">643</a> +<a href="#644" id="644">644</a> +<a href="#645" id="645">645</a> +<a href="#646" id="646">646</a> +<a href="#647" id="647">647</a> +<a href="#648" id="648">648</a> +<a href="#649" id="649">649</a> +<a href="#650" id="650">650</a> +<a href="#651" id="651">651</a> +<a href="#652" id="652">652</a> +<a href="#653" id="653">653</a> +<a href="#654" id="654">654</a> +<a href="#655" id="655">655</a> +<a href="#656" id="656">656</a> +<a href="#657" id="657">657</a> +<a href="#658" id="658">658</a> +<a href="#659" id="659">659</a> +<a href="#660" id="660">660</a> +<a href="#661" id="661">661</a> +<a href="#662" id="662">662</a> +<a href="#663" id="663">663</a> +<a href="#664" id="664">664</a> +<a href="#665" id="665">665</a> +<a href="#666" id="666">666</a> +<a href="#667" id="667">667</a> +<a href="#668" id="668">668</a> +<a href="#669" id="669">669</a> +<a href="#670" id="670">670</a> +<a href="#671" id="671">671</a> +<a href="#672" id="672">672</a> +<a href="#673" id="673">673</a> +<a href="#674" id="674">674</a> +<a href="#675" id="675">675</a> +<a href="#676" id="676">676</a> +<a href="#677" id="677">677</a> +<a href="#678" id="678">678</a> +<a href="#679" id="679">679</a> +<a href="#680" id="680">680</a> +<a href="#681" id="681">681</a> +<a href="#682" id="682">682</a> +<a href="#683" id="683">683</a> +<a href="#684" id="684">684</a> +<a href="#685" id="685">685</a> +<a href="#686" id="686">686</a> +<a href="#687" id="687">687</a> +<a href="#688" id="688">688</a> +<a href="#689" id="689">689</a> +<a href="#690" id="690">690</a> +<a href="#691" id="691">691</a> +<a href="#692" id="692">692</a> +<a href="#693" id="693">693</a> +<a href="#694" id="694">694</a> +<a href="#695" id="695">695</a> +<a href="#696" id="696">696</a> +<a href="#697" id="697">697</a> +<a href="#698" id="698">698</a> +<a href="#699" id="699">699</a> +<a href="#700" id="700">700</a> +<a href="#701" id="701">701</a> +<a href="#702" id="702">702</a> +<a href="#703" id="703">703</a> +<a href="#704" id="704">704</a> +<a href="#705" id="705">705</a> +<a href="#706" id="706">706</a> +<a href="#707" id="707">707</a> +<a href="#708" id="708">708</a> +<a href="#709" id="709">709</a> +<a href="#710" id="710">710</a> +<a href="#711" id="711">711</a> +<a href="#712" id="712">712</a> +<a href="#713" id="713">713</a> +<a href="#714" id="714">714</a> +<a href="#715" id="715">715</a> +<a href="#716" id="716">716</a> +<a href="#717" id="717">717</a> +<a href="#718" id="718">718</a> +<a href="#719" id="719">719</a> +<a href="#720" id="720">720</a> +<a href="#721" id="721">721</a> +<a href="#722" id="722">722</a> +<a href="#723" id="723">723</a> +<a href="#724" id="724">724</a> +<a href="#725" id="725">725</a> +<a href="#726" id="726">726</a> +<a href="#727" id="727">727</a> +<a href="#728" id="728">728</a> +<a href="#729" id="729">729</a> +<a href="#730" id="730">730</a> +<a href="#731" id="731">731</a> +<a href="#732" id="732">732</a> +<a href="#733" id="733">733</a> +<a href="#734" id="734">734</a> +<a href="#735" id="735">735</a> +<a href="#736" id="736">736</a> +<a href="#737" id="737">737</a> +<a href="#738" id="738">738</a> +<a href="#739" id="739">739</a> +<a href="#740" id="740">740</a> +<a href="#741" id="741">741</a> +<a href="#742" id="742">742</a> +<a href="#743" id="743">743</a> +<a href="#744" id="744">744</a> +<a href="#745" id="745">745</a> +<a href="#746" id="746">746</a> +<a href="#747" id="747">747</a> +<a href="#748" id="748">748</a> +<a href="#749" id="749">749</a> +<a href="#750" id="750">750</a> +<a href="#751" id="751">751</a> +<a href="#752" id="752">752</a> +<a href="#753" id="753">753</a> +<a href="#754" id="754">754</a> +<a href="#755" id="755">755</a> +<a href="#756" id="756">756</a> +<a href="#757" id="757">757</a> +<a href="#758" id="758">758</a> +<a href="#759" id="759">759</a> +<a href="#760" id="760">760</a> +<a href="#761" id="761">761</a> +<a href="#762" id="762">762</a> +<a href="#763" id="763">763</a> +<a href="#764" id="764">764</a> +<a href="#765" id="765">765</a> +<a href="#766" id="766">766</a> +<a href="#767" id="767">767</a> +<a href="#768" id="768">768</a> +<a href="#769" id="769">769</a> +<a href="#770" id="770">770</a> +<a href="#771" id="771">771</a> +<a href="#772" id="772">772</a> +<a href="#773" id="773">773</a> +<a href="#774" id="774">774</a> +<a href="#775" id="775">775</a> +<a href="#776" id="776">776</a> +<a href="#777" id="777">777</a> +<a href="#778" id="778">778</a> +<a href="#779" id="779">779</a> +<a href="#780" id="780">780</a> +<a href="#781" id="781">781</a> +<a href="#782" id="782">782</a> +<a href="#783" id="783">783</a> +<a href="#784" id="784">784</a> +<a href="#785" id="785">785</a> +<a href="#786" id="786">786</a> +<a href="#787" id="787">787</a> +<a href="#788" id="788">788</a> +<a href="#789" id="789">789</a> +<a href="#790" id="790">790</a> +<a href="#791" id="791">791</a> +<a href="#792" id="792">792</a> +<a href="#793" id="793">793</a> +<a href="#794" id="794">794</a> +<a href="#795" id="795">795</a> +<a href="#796" id="796">796</a> +<a href="#797" id="797">797</a> +<a href="#798" id="798">798</a> +<a href="#799" id="799">799</a> +<a href="#800" id="800">800</a> +<a href="#801" id="801">801</a> +<a href="#802" id="802">802</a> +<a href="#803" id="803">803</a> +<a href="#804" id="804">804</a> +<a href="#805" id="805">805</a> +<a href="#806" id="806">806</a> +<a href="#807" id="807">807</a> +<a href="#808" id="808">808</a> +<a href="#809" id="809">809</a> +<a href="#810" id="810">810</a> +<a href="#811" id="811">811</a> +<a href="#812" id="812">812</a> +<a href="#813" id="813">813</a> +<a href="#814" id="814">814</a> +<a href="#815" id="815">815</a> +<a href="#816" id="816">816</a> +<a href="#817" id="817">817</a> +<a href="#818" id="818">818</a> +<a href="#819" id="819">819</a> +<a href="#820" id="820">820</a> +<a href="#821" id="821">821</a> +<a href="#822" id="822">822</a> +<a href="#823" id="823">823</a> +<a href="#824" id="824">824</a> +<a href="#825" id="825">825</a> +<a href="#826" id="826">826</a> +<a href="#827" id="827">827</a> +<a href="#828" id="828">828</a> +<a href="#829" id="829">829</a> +<a href="#830" id="830">830</a> +<a href="#831" id="831">831</a> +<a href="#832" id="832">832</a> +<a href="#833" id="833">833</a> +<a href="#834" id="834">834</a> +<a href="#835" id="835">835</a> +<a href="#836" id="836">836</a> +<a href="#837" id="837">837</a> +<a href="#838" id="838">838</a> +<a href="#839" id="839">839</a> +<a href="#840" id="840">840</a> +<a href="#841" id="841">841</a> +<a href="#842" id="842">842</a> +<a href="#843" id="843">843</a> +<a href="#844" id="844">844</a> +<a href="#845" id="845">845</a> +<a href="#846" id="846">846</a> +<a href="#847" id="847">847</a> +<a href="#848" id="848">848</a> +<a href="#849" id="849">849</a> +<a href="#850" id="850">850</a> +<a href="#851" id="851">851</a> +<a href="#852" id="852">852</a> +<a href="#853" id="853">853</a> +<a href="#854" id="854">854</a> +<a href="#855" id="855">855</a> +<a href="#856" id="856">856</a> +<a href="#857" id="857">857</a> +<a href="#858" id="858">858</a> +<a href="#859" id="859">859</a> +<a href="#860" id="860">860</a> +<a href="#861" id="861">861</a> +<a href="#862" id="862">862</a> +<a href="#863" id="863">863</a> +<a href="#864" id="864">864</a> +<a href="#865" id="865">865</a> +<a href="#866" id="866">866</a> +<a href="#867" id="867">867</a> +<a href="#868" id="868">868</a> +<a href="#869" id="869">869</a> +<a href="#870" id="870">870</a> +<a href="#871" id="871">871</a> +<a href="#872" id="872">872</a> +<a href="#873" id="873">873</a> +<a href="#874" id="874">874</a> +<a href="#875" id="875">875</a> +<a href="#876" id="876">876</a> +<a href="#877" id="877">877</a> +<a href="#878" id="878">878</a> +<a href="#879" id="879">879</a> +<a href="#880" id="880">880</a> +<a href="#881" id="881">881</a> +<a href="#882" id="882">882</a> +<a href="#883" id="883">883</a> +<a href="#884" id="884">884</a> +<a href="#885" id="885">885</a> +<a href="#886" id="886">886</a> +<a href="#887" id="887">887</a> +<a href="#888" id="888">888</a> +<a href="#889" id="889">889</a> +<a href="#890" id="890">890</a> +<a href="#891" id="891">891</a> +<a href="#892" id="892">892</a> +<a href="#893" id="893">893</a> +<a href="#894" id="894">894</a> +<a href="#895" id="895">895</a> +<a href="#896" id="896">896</a> +<a href="#897" id="897">897</a> +<a href="#898" id="898">898</a> +<a href="#899" id="899">899</a> +<a href="#900" id="900">900</a> +<a href="#901" id="901">901</a> +<a href="#902" id="902">902</a> +<a href="#903" id="903">903</a> +<a href="#904" id="904">904</a> +<a href="#905" id="905">905</a> +<a href="#906" id="906">906</a> +<a href="#907" id="907">907</a> +<a href="#908" id="908">908</a> +<a href="#909" id="909">909</a> +<a href="#910" id="910">910</a> +<a href="#911" id="911">911</a> +<a href="#912" id="912">912</a> +<a href="#913" id="913">913</a> +<a href="#914" id="914">914</a> +<a href="#915" id="915">915</a> +<a href="#916" id="916">916</a> +<a href="#917" id="917">917</a> +<a href="#918" id="918">918</a> +<a href="#919" id="919">919</a> +<a href="#920" id="920">920</a> +<a href="#921" id="921">921</a> +<a href="#922" id="922">922</a> +<a href="#923" id="923">923</a> +<a href="#924" id="924">924</a> +<a href="#925" id="925">925</a> +<a href="#926" id="926">926</a> +<a href="#927" id="927">927</a> +<a href="#928" id="928">928</a> +<a href="#929" id="929">929</a> +<a href="#930" id="930">930</a> +<a href="#931" id="931">931</a> +<a href="#932" id="932">932</a> +<a href="#933" id="933">933</a> +<a href="#934" id="934">934</a> +<a href="#935" id="935">935</a> +<a href="#936" id="936">936</a> +<a href="#937" id="937">937</a> +<a href="#938" id="938">938</a> +<a href="#939" id="939">939</a> +<a href="#940" id="940">940</a> +<a href="#941" id="941">941</a> +<a href="#942" id="942">942</a> +<a href="#943" id="943">943</a> +<a href="#944" id="944">944</a> +<a href="#945" id="945">945</a> +<a href="#946" id="946">946</a> +<a href="#947" id="947">947</a> +<a href="#948" id="948">948</a> +<a href="#949" id="949">949</a> +<a href="#950" id="950">950</a> +<a href="#951" id="951">951</a> +<a href="#952" id="952">952</a> +<a href="#953" id="953">953</a> +<a href="#954" id="954">954</a> +<a href="#955" id="955">955</a> +<a href="#956" id="956">956</a> +<a href="#957" id="957">957</a> +<a href="#958" id="958">958</a> +<a href="#959" id="959">959</a> +<a href="#960" id="960">960</a> +<a href="#961" id="961">961</a> +<a href="#962" id="962">962</a> +<a href="#963" id="963">963</a> +<a href="#964" id="964">964</a> +<a href="#965" id="965">965</a> +<a href="#966" id="966">966</a> +<a href="#967" id="967">967</a> +<a href="#968" id="968">968</a> +<a href="#969" id="969">969</a> +<a href="#970" id="970">970</a> +<a href="#971" id="971">971</a> +<a href="#972" id="972">972</a> +<a href="#973" id="973">973</a> +<a href="#974" id="974">974</a> +<a href="#975" id="975">975</a> +<a href="#976" id="976">976</a> +<a href="#977" id="977">977</a> +<a href="#978" id="978">978</a> +<a href="#979" id="979">979</a> +<a href="#980" id="980">980</a> +<a href="#981" id="981">981</a> +<a href="#982" id="982">982</a> +<a href="#983" id="983">983</a> +<a href="#984" id="984">984</a> +<a href="#985" id="985">985</a> +<a href="#986" id="986">986</a> +<a href="#987" id="987">987</a> +<a href="#988" id="988">988</a> +<a href="#989" id="989">989</a> +<a href="#990" id="990">990</a> +<a href="#991" id="991">991</a> +<a href="#992" id="992">992</a> +<a href="#993" id="993">993</a> +<a href="#994" id="994">994</a> +<a href="#995" id="995">995</a> +<a href="#996" id="996">996</a> +<a href="#997" id="997">997</a> +<a href="#998" id="998">998</a> +<a href="#999" id="999">999</a> +<a href="#1000" id="1000">1000</a> +<a href="#1001" id="1001">1001</a> +<a href="#1002" id="1002">1002</a> +<a href="#1003" id="1003">1003</a> +<a href="#1004" id="1004">1004</a> +<a href="#1005" id="1005">1005</a> +<a href="#1006" id="1006">1006</a> +<a href="#1007" id="1007">1007</a> +<a href="#1008" id="1008">1008</a> +<a href="#1009" id="1009">1009</a> +<a href="#1010" id="1010">1010</a> +<a href="#1011" id="1011">1011</a> +<a href="#1012" id="1012">1012</a> +<a href="#1013" id="1013">1013</a> +<a href="#1014" id="1014">1014</a> +<a href="#1015" id="1015">1015</a> +<a href="#1016" id="1016">1016</a> +<a href="#1017" id="1017">1017</a> +<a href="#1018" id="1018">1018</a> +<a href="#1019" id="1019">1019</a> +<a href="#1020" id="1020">1020</a> +<a href="#1021" id="1021">1021</a> +<a href="#1022" id="1022">1022</a> +<a href="#1023" id="1023">1023</a> +<a href="#1024" id="1024">1024</a> +<a href="#1025" id="1025">1025</a> +<a href="#1026" id="1026">1026</a> +<a href="#1027" id="1027">1027</a> +<a href="#1028" id="1028">1028</a> +<a href="#1029" id="1029">1029</a> +<a href="#1030" id="1030">1030</a> +<a href="#1031" id="1031">1031</a> +<a href="#1032" id="1032">1032</a> +<a href="#1033" id="1033">1033</a> +<a href="#1034" id="1034">1034</a> +<a href="#1035" id="1035">1035</a> +<a href="#1036" id="1036">1036</a> +<a href="#1037" id="1037">1037</a> +<a href="#1038" id="1038">1038</a> +<a href="#1039" id="1039">1039</a> +<a href="#1040" id="1040">1040</a> +<a href="#1041" id="1041">1041</a> +<a href="#1042" id="1042">1042</a> +<a href="#1043" id="1043">1043</a> +<a href="#1044" id="1044">1044</a> +<a href="#1045" id="1045">1045</a> +<a href="#1046" id="1046">1046</a> +<a href="#1047" id="1047">1047</a> +<a href="#1048" id="1048">1048</a> +<a href="#1049" id="1049">1049</a> +<a href="#1050" id="1050">1050</a> +<a href="#1051" id="1051">1051</a> +<a href="#1052" id="1052">1052</a> +<a href="#1053" id="1053">1053</a> +<a href="#1054" id="1054">1054</a> +<a href="#1055" id="1055">1055</a> +<a href="#1056" id="1056">1056</a> +<a href="#1057" id="1057">1057</a> +<a href="#1058" id="1058">1058</a> +<a href="#1059" id="1059">1059</a> +<a href="#1060" id="1060">1060</a> +<a href="#1061" id="1061">1061</a> +<a href="#1062" id="1062">1062</a> +<a href="#1063" id="1063">1063</a> +<a href="#1064" id="1064">1064</a> +<a href="#1065" id="1065">1065</a> +<a href="#1066" id="1066">1066</a> +<a href="#1067" id="1067">1067</a> +<a href="#1068" id="1068">1068</a> +<a href="#1069" id="1069">1069</a> +<a href="#1070" id="1070">1070</a> +<a href="#1071" id="1071">1071</a> +<a href="#1072" id="1072">1072</a> +<a href="#1073" id="1073">1073</a> +<a href="#1074" id="1074">1074</a> +<a href="#1075" id="1075">1075</a> +<a href="#1076" id="1076">1076</a> +<a href="#1077" id="1077">1077</a> +<a href="#1078" id="1078">1078</a> +<a href="#1079" id="1079">1079</a> +<a href="#1080" id="1080">1080</a> +<a href="#1081" id="1081">1081</a> +<a href="#1082" id="1082">1082</a> +<a href="#1083" id="1083">1083</a> +<a href="#1084" id="1084">1084</a> +<a href="#1085" id="1085">1085</a> +<a href="#1086" id="1086">1086</a> +<a href="#1087" id="1087">1087</a> +<a href="#1088" id="1088">1088</a> +<a href="#1089" id="1089">1089</a> +<a href="#1090" id="1090">1090</a> +<a href="#1091" id="1091">1091</a> +<a href="#1092" id="1092">1092</a> +<a href="#1093" id="1093">1093</a> +<a href="#1094" id="1094">1094</a> +<a href="#1095" id="1095">1095</a> +<a href="#1096" id="1096">1096</a> +<a href="#1097" id="1097">1097</a> +<a href="#1098" id="1098">1098</a> +<a href="#1099" id="1099">1099</a> +<a href="#1100" id="1100">1100</a> +<a href="#1101" id="1101">1101</a> +<a href="#1102" id="1102">1102</a> +<a href="#1103" id="1103">1103</a> +<a href="#1104" id="1104">1104</a> +<a href="#1105" id="1105">1105</a> +<a href="#1106" id="1106">1106</a> +<a href="#1107" id="1107">1107</a> +<a href="#1108" id="1108">1108</a> +<a href="#1109" id="1109">1109</a> +<a href="#1110" id="1110">1110</a> +<a href="#1111" id="1111">1111</a> +<a href="#1112" id="1112">1112</a> +<a href="#1113" id="1113">1113</a> +<a href="#1114" id="1114">1114</a> +<a href="#1115" id="1115">1115</a> +<a href="#1116" id="1116">1116</a> +<a href="#1117" id="1117">1117</a> +<a href="#1118" id="1118">1118</a> +<a href="#1119" id="1119">1119</a> +<a href="#1120" id="1120">1120</a> +<a href="#1121" id="1121">1121</a> +<a href="#1122" id="1122">1122</a> +<a href="#1123" id="1123">1123</a> +<a href="#1124" id="1124">1124</a> +<a href="#1125" id="1125">1125</a> +<a href="#1126" id="1126">1126</a> +<a href="#1127" id="1127">1127</a> +<a href="#1128" id="1128">1128</a> +<a href="#1129" id="1129">1129</a> +<a href="#1130" id="1130">1130</a> +<a href="#1131" id="1131">1131</a> +<a href="#1132" id="1132">1132</a> +<a href="#1133" id="1133">1133</a> +<a href="#1134" id="1134">1134</a> +<a href="#1135" id="1135">1135</a> +<a href="#1136" id="1136">1136</a> +<a href="#1137" id="1137">1137</a> +<a href="#1138" id="1138">1138</a> +<a href="#1139" id="1139">1139</a> +<a href="#1140" id="1140">1140</a> +<a href="#1141" id="1141">1141</a> +<a href="#1142" id="1142">1142</a> +<a href="#1143" id="1143">1143</a> +<a href="#1144" id="1144">1144</a> +<a href="#1145" id="1145">1145</a> +<a href="#1146" id="1146">1146</a> +<a href="#1147" id="1147">1147</a> +<a href="#1148" id="1148">1148</a> +<a href="#1149" id="1149">1149</a> +<a href="#1150" id="1150">1150</a> +<a href="#1151" id="1151">1151</a> +<a href="#1152" id="1152">1152</a> +<a href="#1153" id="1153">1153</a> +<a href="#1154" id="1154">1154</a> +<a href="#1155" id="1155">1155</a> +<a href="#1156" id="1156">1156</a> +<a href="#1157" id="1157">1157</a> +<a href="#1158" id="1158">1158</a> +<a href="#1159" id="1159">1159</a> +<a href="#1160" id="1160">1160</a> +<a href="#1161" id="1161">1161</a> +<a href="#1162" id="1162">1162</a> +<a href="#1163" id="1163">1163</a> +<a href="#1164" id="1164">1164</a> +<a href="#1165" id="1165">1165</a> +<a href="#1166" id="1166">1166</a> +<a href="#1167" id="1167">1167</a> +<a href="#1168" id="1168">1168</a> +<a href="#1169" id="1169">1169</a> +<a href="#1170" id="1170">1170</a> +<a href="#1171" id="1171">1171</a> +<a href="#1172" id="1172">1172</a> +<a href="#1173" id="1173">1173</a> +<a href="#1174" id="1174">1174</a> +<a href="#1175" id="1175">1175</a> +<a href="#1176" id="1176">1176</a> +<a href="#1177" id="1177">1177</a> +<a href="#1178" id="1178">1178</a> +<a href="#1179" id="1179">1179</a> +<a href="#1180" id="1180">1180</a> +<a href="#1181" id="1181">1181</a> +<a href="#1182" id="1182">1182</a> +<a href="#1183" id="1183">1183</a> +<a href="#1184" id="1184">1184</a> +<a href="#1185" id="1185">1185</a> +<a href="#1186" id="1186">1186</a> +<a href="#1187" id="1187">1187</a> +<a href="#1188" id="1188">1188</a> +<a href="#1189" id="1189">1189</a> +<a href="#1190" id="1190">1190</a> +<a href="#1191" id="1191">1191</a> +<a href="#1192" id="1192">1192</a> +<a href="#1193" id="1193">1193</a> +<a href="#1194" id="1194">1194</a> +<a href="#1195" id="1195">1195</a> +<a href="#1196" id="1196">1196</a> +<a href="#1197" id="1197">1197</a> +<a href="#1198" id="1198">1198</a> +<a href="#1199" id="1199">1199</a> +<a href="#1200" id="1200">1200</a> +<a href="#1201" id="1201">1201</a> +<a href="#1202" id="1202">1202</a> +<a href="#1203" id="1203">1203</a> +<a href="#1204" id="1204">1204</a> +<a href="#1205" id="1205">1205</a> +<a href="#1206" id="1206">1206</a> +<a href="#1207" id="1207">1207</a> +<a href="#1208" id="1208">1208</a> +<a href="#1209" id="1209">1209</a> +<a href="#1210" id="1210">1210</a> +<a href="#1211" id="1211">1211</a> +<a href="#1212" id="1212">1212</a> +<a href="#1213" id="1213">1213</a> +<a href="#1214" id="1214">1214</a> +<a href="#1215" id="1215">1215</a> +<a href="#1216" id="1216">1216</a> +<a href="#1217" id="1217">1217</a> +<a href="#1218" id="1218">1218</a> +<a href="#1219" id="1219">1219</a> +<a href="#1220" id="1220">1220</a> +<a href="#1221" id="1221">1221</a> +<a href="#1222" id="1222">1222</a> +<a href="#1223" id="1223">1223</a> +<a href="#1224" id="1224">1224</a> +<a href="#1225" id="1225">1225</a> +<a href="#1226" id="1226">1226</a> +<a href="#1227" id="1227">1227</a> +<a href="#1228" id="1228">1228</a> +<a href="#1229" id="1229">1229</a> +<a href="#1230" id="1230">1230</a> +<a href="#1231" id="1231">1231</a> +<a href="#1232" id="1232">1232</a> +<a href="#1233" id="1233">1233</a> +<a href="#1234" id="1234">1234</a> +<a href="#1235" id="1235">1235</a> +<a href="#1236" id="1236">1236</a> +<a href="#1237" id="1237">1237</a> +<a href="#1238" id="1238">1238</a> +<a href="#1239" id="1239">1239</a> +<a href="#1240" id="1240">1240</a> +<a href="#1241" id="1241">1241</a> +<a href="#1242" id="1242">1242</a> +<a href="#1243" id="1243">1243</a> +<a href="#1244" id="1244">1244</a> +<a href="#1245" id="1245">1245</a> +<a href="#1246" id="1246">1246</a> +<a href="#1247" id="1247">1247</a> +<a href="#1248" id="1248">1248</a> +<a href="#1249" id="1249">1249</a> +<a href="#1250" id="1250">1250</a> +<a href="#1251" id="1251">1251</a> +<a href="#1252" id="1252">1252</a> +<a href="#1253" id="1253">1253</a> +<a href="#1254" id="1254">1254</a> +<a href="#1255" id="1255">1255</a> +<a href="#1256" id="1256">1256</a> +<a href="#1257" id="1257">1257</a> +<a href="#1258" id="1258">1258</a> +<a href="#1259" id="1259">1259</a> +<a href="#1260" id="1260">1260</a> +<a href="#1261" id="1261">1261</a> +<a href="#1262" id="1262">1262</a> +<a href="#1263" id="1263">1263</a> +<a href="#1264" id="1264">1264</a> +<a href="#1265" id="1265">1265</a> +<a href="#1266" id="1266">1266</a> +<a href="#1267" id="1267">1267</a> +<a href="#1268" id="1268">1268</a> +<a href="#1269" id="1269">1269</a> +<a href="#1270" id="1270">1270</a> +<a href="#1271" id="1271">1271</a> +<a href="#1272" id="1272">1272</a> +<a href="#1273" id="1273">1273</a> +<a href="#1274" id="1274">1274</a> +<a href="#1275" id="1275">1275</a> +<a href="#1276" id="1276">1276</a> +<a href="#1277" id="1277">1277</a> +<a href="#1278" id="1278">1278</a> +<a href="#1279" id="1279">1279</a> +<a href="#1280" id="1280">1280</a> +<a href="#1281" id="1281">1281</a> +<a href="#1282" id="1282">1282</a> +<a href="#1283" id="1283">1283</a> +<a href="#1284" id="1284">1284</a> +<a href="#1285" id="1285">1285</a> +<a href="#1286" id="1286">1286</a> +<a href="#1287" id="1287">1287</a> +<a href="#1288" id="1288">1288</a> +<a href="#1289" id="1289">1289</a> +<a href="#1290" id="1290">1290</a> +<a href="#1291" id="1291">1291</a> +<a href="#1292" id="1292">1292</a> +<a href="#1293" id="1293">1293</a> +<a href="#1294" id="1294">1294</a> +<a href="#1295" id="1295">1295</a> +<a href="#1296" id="1296">1296</a> +<a href="#1297" id="1297">1297</a> +<a href="#1298" id="1298">1298</a> +<a href="#1299" id="1299">1299</a> +<a href="#1300" id="1300">1300</a> +<a href="#1301" id="1301">1301</a> +<a href="#1302" id="1302">1302</a> +<a href="#1303" id="1303">1303</a> +<a href="#1304" id="1304">1304</a> +<a href="#1305" id="1305">1305</a> +<a href="#1306" id="1306">1306</a> +<a href="#1307" id="1307">1307</a> +<a href="#1308" id="1308">1308</a> +<a href="#1309" id="1309">1309</a> +<a href="#1310" id="1310">1310</a> +<a href="#1311" id="1311">1311</a> +<a href="#1312" id="1312">1312</a> +<a href="#1313" id="1313">1313</a> +<a href="#1314" id="1314">1314</a> +<a href="#1315" id="1315">1315</a> +<a href="#1316" id="1316">1316</a> +<a href="#1317" id="1317">1317</a> +<a href="#1318" id="1318">1318</a> +<a href="#1319" id="1319">1319</a> +<a href="#1320" id="1320">1320</a> +<a href="#1321" id="1321">1321</a> +<a href="#1322" id="1322">1322</a> +<a href="#1323" id="1323">1323</a> +<a href="#1324" id="1324">1324</a> +<a href="#1325" id="1325">1325</a> +<a href="#1326" id="1326">1326</a> +<a href="#1327" id="1327">1327</a> +<a href="#1328" id="1328">1328</a> +<a href="#1329" id="1329">1329</a> +<a href="#1330" id="1330">1330</a> +<a href="#1331" id="1331">1331</a> +<a href="#1332" id="1332">1332</a> +<a href="#1333" id="1333">1333</a> +<a href="#1334" id="1334">1334</a> +<a href="#1335" id="1335">1335</a> +<a href="#1336" id="1336">1336</a> +<a href="#1337" id="1337">1337</a> +<a href="#1338" id="1338">1338</a> +<a href="#1339" id="1339">1339</a> +<a href="#1340" id="1340">1340</a> +<a href="#1341" id="1341">1341</a> +<a href="#1342" id="1342">1342</a> +<a href="#1343" id="1343">1343</a> +<a href="#1344" id="1344">1344</a> +<a href="#1345" id="1345">1345</a> +<a href="#1346" id="1346">1346</a> +<a href="#1347" id="1347">1347</a> +<a href="#1348" id="1348">1348</a> +<a href="#1349" id="1349">1349</a> +<a href="#1350" id="1350">1350</a> +<a href="#1351" id="1351">1351</a> +<a href="#1352" id="1352">1352</a> +<a href="#1353" id="1353">1353</a> +<a href="#1354" id="1354">1354</a> +<a href="#1355" id="1355">1355</a> +<a href="#1356" id="1356">1356</a> +<a href="#1357" id="1357">1357</a> +<a href="#1358" id="1358">1358</a> +<a href="#1359" id="1359">1359</a> +<a href="#1360" id="1360">1360</a> +<a href="#1361" id="1361">1361</a> +<a href="#1362" id="1362">1362</a> +<a href="#1363" id="1363">1363</a> +<a href="#1364" id="1364">1364</a> +<a href="#1365" id="1365">1365</a> +<a href="#1366" id="1366">1366</a> +<a href="#1367" id="1367">1367</a> +<a href="#1368" id="1368">1368</a> +<a href="#1369" id="1369">1369</a> +<a href="#1370" id="1370">1370</a> +<a href="#1371" id="1371">1371</a> +<a href="#1372" id="1372">1372</a> +<a href="#1373" id="1373">1373</a> +<a href="#1374" id="1374">1374</a> +<a href="#1375" id="1375">1375</a> +<a href="#1376" id="1376">1376</a> +<a href="#1377" id="1377">1377</a> +<a href="#1378" id="1378">1378</a> +<a href="#1379" id="1379">1379</a> +<a href="#1380" id="1380">1380</a> +<a href="#1381" id="1381">1381</a> +<a href="#1382" id="1382">1382</a> +<a href="#1383" id="1383">1383</a> +<a href="#1384" id="1384">1384</a> +<a href="#1385" id="1385">1385</a> +<a href="#1386" id="1386">1386</a> +<a href="#1387" id="1387">1387</a> +<a href="#1388" id="1388">1388</a> +<a href="#1389" id="1389">1389</a> +<a href="#1390" id="1390">1390</a> +<a href="#1391" id="1391">1391</a> +<a href="#1392" id="1392">1392</a> +<a href="#1393" id="1393">1393</a> +<a href="#1394" id="1394">1394</a> +<a href="#1395" id="1395">1395</a> +<a href="#1396" id="1396">1396</a> +<a href="#1397" id="1397">1397</a> +<a href="#1398" id="1398">1398</a> +<a href="#1399" id="1399">1399</a> +<a href="#1400" id="1400">1400</a> +<a href="#1401" id="1401">1401</a> +<a href="#1402" id="1402">1402</a> +<a href="#1403" id="1403">1403</a> +<a href="#1404" id="1404">1404</a> +<a href="#1405" id="1405">1405</a> +<a href="#1406" id="1406">1406</a> +<a href="#1407" id="1407">1407</a> +<a href="#1408" id="1408">1408</a> +<a href="#1409" id="1409">1409</a> +<a href="#1410" id="1410">1410</a> +<a href="#1411" id="1411">1411</a> +<a href="#1412" id="1412">1412</a> +<a href="#1413" id="1413">1413</a> +<a href="#1414" id="1414">1414</a> +<a href="#1415" id="1415">1415</a> +<a href="#1416" id="1416">1416</a> +<a href="#1417" id="1417">1417</a> +<a href="#1418" id="1418">1418</a> +<a href="#1419" id="1419">1419</a> +<a href="#1420" id="1420">1420</a> +<a href="#1421" id="1421">1421</a> +<a href="#1422" id="1422">1422</a> +<a href="#1423" id="1423">1423</a> +<a href="#1424" id="1424">1424</a> +<a href="#1425" id="1425">1425</a> +<a href="#1426" id="1426">1426</a> +<a href="#1427" id="1427">1427</a> +<a href="#1428" id="1428">1428</a> +<a href="#1429" id="1429">1429</a> +<a href="#1430" id="1430">1430</a> +<a href="#1431" id="1431">1431</a> +<a href="#1432" id="1432">1432</a> +<a href="#1433" id="1433">1433</a> +<a href="#1434" id="1434">1434</a> +<a href="#1435" id="1435">1435</a> +<a href="#1436" id="1436">1436</a> +<a href="#1437" id="1437">1437</a> +<a href="#1438" id="1438">1438</a> +<a href="#1439" id="1439">1439</a> +<a href="#1440" id="1440">1440</a> +<a href="#1441" id="1441">1441</a> +<a href="#1442" id="1442">1442</a> +<a href="#1443" id="1443">1443</a> +<a href="#1444" id="1444">1444</a> +<a href="#1445" id="1445">1445</a> +<a href="#1446" id="1446">1446</a> +<a href="#1447" id="1447">1447</a> +<a href="#1448" id="1448">1448</a> +<a href="#1449" id="1449">1449</a> +<a href="#1450" id="1450">1450</a> +<a href="#1451" id="1451">1451</a> +<a href="#1452" id="1452">1452</a> +<a href="#1453" id="1453">1453</a> +<a href="#1454" id="1454">1454</a> +<a href="#1455" id="1455">1455</a> +<a href="#1456" id="1456">1456</a> +<a href="#1457" id="1457">1457</a> +<a href="#1458" id="1458">1458</a> +<a href="#1459" id="1459">1459</a> +<a href="#1460" id="1460">1460</a> +<a href="#1461" id="1461">1461</a> +<a href="#1462" id="1462">1462</a> +<a href="#1463" id="1463">1463</a> +<a href="#1464" id="1464">1464</a> +<a href="#1465" id="1465">1465</a> +<a href="#1466" id="1466">1466</a> +<a href="#1467" id="1467">1467</a> +<a href="#1468" id="1468">1468</a> +<a href="#1469" id="1469">1469</a> +<a href="#1470" id="1470">1470</a> +<a href="#1471" id="1471">1471</a> +<a href="#1472" id="1472">1472</a> +<a href="#1473" id="1473">1473</a> +<a href="#1474" id="1474">1474</a> +<a href="#1475" id="1475">1475</a> +<a href="#1476" id="1476">1476</a> +<a href="#1477" id="1477">1477</a> +<a href="#1478" id="1478">1478</a> +<a href="#1479" id="1479">1479</a> +<a href="#1480" id="1480">1480</a> +<a href="#1481" id="1481">1481</a> +<a href="#1482" id="1482">1482</a> +<a href="#1483" id="1483">1483</a> +<a href="#1484" id="1484">1484</a> +<a href="#1485" id="1485">1485</a> +<a href="#1486" id="1486">1486</a> +<a href="#1487" id="1487">1487</a> +<a href="#1488" id="1488">1488</a> +<a href="#1489" id="1489">1489</a> +<a href="#1490" id="1490">1490</a> +<a href="#1491" id="1491">1491</a> +<a href="#1492" id="1492">1492</a> +<a href="#1493" id="1493">1493</a> +<a href="#1494" id="1494">1494</a> +<a href="#1495" id="1495">1495</a> +<a href="#1496" id="1496">1496</a> +<a href="#1497" id="1497">1497</a> +<a href="#1498" id="1498">1498</a> +<a href="#1499" id="1499">1499</a> +<a href="#1500" id="1500">1500</a> +<a href="#1501" id="1501">1501</a> +<a href="#1502" id="1502">1502</a> +<a href="#1503" id="1503">1503</a> +<a href="#1504" id="1504">1504</a> +<a href="#1505" id="1505">1505</a> +<a href="#1506" id="1506">1506</a> +<a href="#1507" id="1507">1507</a> +<a href="#1508" id="1508">1508</a> +<a href="#1509" id="1509">1509</a> +<a href="#1510" id="1510">1510</a> +<a href="#1511" id="1511">1511</a> +<a href="#1512" id="1512">1512</a> +<a href="#1513" id="1513">1513</a> +<a href="#1514" id="1514">1514</a> +<a href="#1515" id="1515">1515</a> +<a href="#1516" id="1516">1516</a> +<a href="#1517" id="1517">1517</a> +<a href="#1518" id="1518">1518</a> +<a href="#1519" id="1519">1519</a> +<a href="#1520" id="1520">1520</a> +<a href="#1521" id="1521">1521</a> +<a href="#1522" id="1522">1522</a> +<a href="#1523" id="1523">1523</a> +<a href="#1524" id="1524">1524</a> +<a href="#1525" id="1525">1525</a> +<a href="#1526" id="1526">1526</a> +<a href="#1527" id="1527">1527</a> +<a href="#1528" id="1528">1528</a> +<a href="#1529" id="1529">1529</a> +<a href="#1530" id="1530">1530</a> +<a href="#1531" id="1531">1531</a> +<a href="#1532" id="1532">1532</a> +<a href="#1533" id="1533">1533</a> +<a href="#1534" id="1534">1534</a> +<a href="#1535" id="1535">1535</a> +<a href="#1536" id="1536">1536</a> +<a href="#1537" id="1537">1537</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + containers::CompressableBytes, + derive, + fo4::{ + ArchiveOptions, Chunk, ChunkCompressionOptions, CompressionFormat, CompressionLevel, Error, + Format, <span class="prelude-ty">Result</span>, + }, + io::Source, + CompressionResult, Sealed, +}; +<span class="kw">use </span>core::{ + fmt::{<span class="self">self</span>, Debug, Display, Formatter}, + num::NonZeroUsize, + ops::{Index, IndexMut, Range, RangeBounds}, + ptr::NonNull, + result, slice, +}; +<span class="kw">use </span>directxtex::{ + ScratchImage, TexMetadata, CP_FLAGS, DDS_FLAGS, DXGI_FORMAT, FORMAT_TYPE, TEX_DIMENSION, + TEX_MISC_FLAG, +}; +<span class="kw">use </span>std::{error, io::Write}; + +<span class="attr">#[allow(clippy::cast_possible_truncation, clippy::unnecessary_cast)] +</span><span class="kw">const </span>TEX_MISC_TEXTURECUBE: u32 = TEX_MISC_FLAG::TEX_MISC_TEXTURECUBE.bits() <span class="kw">as </span>u32; + +<span class="doccomment">/// File is at chunk capacity. +</span><span class="kw">pub struct </span>CapacityError<<span class="lifetime">'bytes</span>>(Chunk<<span class="lifetime">'bytes</span>>); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> CapacityError<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>into_element(<span class="self">self</span>) -> Chunk<<span class="lifetime">'bytes</span>> { + <span class="self">self</span>.<span class="number">0 + </span>} +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Debug <span class="kw">for </span>CapacityError<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>Formatter<<span class="lifetime">'_</span>>) -> fmt::Result { + <<span class="self">Self </span><span class="kw">as </span>Display>::fmt(<span class="self">self</span>, f) + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Display <span class="kw">for </span>CapacityError<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>Formatter<<span class="lifetime">'_</span>>) -> fmt::Result { + <span class="macro">write!</span>( + f, + <span class="string">"could not insert another chunk because the file was already full" + </span>) + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> error::Error <span class="kw">for </span>CapacityError<<span class="lifetime">'bytes</span>> {} + +<span class="doccomment">/// See also [`FileReadOptions`](ReadOptions). +</span><span class="attr">#[derive(Debug, Default)] +#[repr(transparent)] +</span><span class="kw">pub struct </span>ReadOptionsBuilder(ReadOptions); + +<span class="kw">impl </span>ReadOptionsBuilder { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>build(<span class="self">self</span>) -> ReadOptions { + <span class="self">self</span>.<span class="number">0 + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_format(<span class="kw-2">mut </span><span class="self">self</span>, compression_format: CompressionFormat) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_options.compression_format = compression_format; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_level(<span class="kw-2">mut </span><span class="self">self</span>, compression_level: CompressionLevel) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_options.compression_level = compression_level; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_result(<span class="kw-2">mut </span><span class="self">self</span>, compression_result: CompressionResult) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_result = compression_result; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>format(<span class="kw-2">mut </span><span class="self">self</span>, format: Format) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.format = format; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>mip_chunk_height(<span class="kw-2">mut </span><span class="self">self</span>, mip_chunk_height: usize) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.mip_chunk_height = mip_chunk_height; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>mip_chunk_width(<span class="kw-2">mut </span><span class="self">self</span>, mip_chunk_width: usize) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.mip_chunk_width = mip_chunk_width; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>ReadOptionsBuilder { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>ReadOptionsBuilder { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self</span>(value.into()) + } +} + +<span class="doccomment">/// Common parameters to configure how files are read. +/// +/// ```rust +/// use ba2::{ +/// fo4::{CompressionFormat, CompressionLevel, FileReadOptions, Format}, +/// CompressionResult, +/// }; +/// +/// // Read and compress a file for FO4/FO76, GNRL format +/// let _ = FileReadOptions::builder() +/// .format(Format::GNRL) +/// .compression_format(CompressionFormat::Zip) +/// .compression_level(CompressionLevel::FO4) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// +/// // Read and compress a file for FO4/FO76, DX10 format +/// let _ = FileReadOptions::builder() +/// .format(Format::DX10) +/// .compression_format(CompressionFormat::Zip) +/// .compression_level(CompressionLevel::FO4) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// +/// // Read and compress a file for FO4 on the xbox, GNRL format +/// let _ = FileReadOptions::builder() +/// .format(Format::GNRL) +/// .compression_format(CompressionFormat::Zip) +/// .compression_level(CompressionLevel::FO4Xbox) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// +/// // Read and compress a file for FO4 on the xbox, DX10 format +/// let _ = FileReadOptions::builder() +/// .format(Format::DX10) +/// .compression_format(CompressionFormat::Zip) +/// .compression_level(CompressionLevel::FO4Xbox) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// +/// // Read and compress a file for SF, GNRL format +/// let _ = FileReadOptions::builder() +/// .format(Format::GNRL) +/// .compression_format(CompressionFormat::Zip) +/// .compression_level(CompressionLevel::SF) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// +/// // Read and compress a file for SF, DX10 format +/// let _ = FileReadOptions::builder() +/// .format(Format::DX10) +/// .compression_format(CompressionFormat::LZ4) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// ``` +</span><span class="attr">#[derive(Clone, Copy, Debug)] +</span><span class="kw">pub struct </span>ReadOptions { + format: Format, + mip_chunk_width: usize, + mip_chunk_height: usize, + compression_options: ChunkCompressionOptions, + compression_result: CompressionResult, +} + +<span class="kw">impl </span>ReadOptions { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>builder() -> ReadOptionsBuilder { + ReadOptionsBuilder::new() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_format(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionFormat { + <span class="self">self</span>.compression_options.compression_format + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_level(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionLevel { + <span class="self">self</span>.compression_options.compression_level + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_result(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionResult { + <span class="self">self</span>.compression_result + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>format(<span class="kw-2">&</span><span class="self">self</span>) -> Format { + <span class="self">self</span>.format + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>mip_chunk_height(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="self">self</span>.mip_chunk_height + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>mip_chunk_width(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="self">self</span>.mip_chunk_width + } +} + +<span class="kw">impl </span>Default <span class="kw">for </span>ReadOptions { + <span class="kw">fn </span>default() -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + format: Format::default(), + mip_chunk_width: <span class="number">512</span>, + mip_chunk_height: <span class="number">512</span>, + compression_options: ChunkCompressionOptions::default(), + compression_result: CompressionResult::default(), + } + } +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>ReadOptions { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>ReadOptions { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + format: value.format(), + compression_options: value.into(), + ..Default::default() + } + } +} + +<span class="doccomment">/// See also [`FileWriteOptions`](WriteOptions). +</span><span class="attr">#[derive(Debug, Default)] +#[repr(transparent)] +</span><span class="kw">pub struct </span>WriteOptionsBuilder(WriteOptions); + +<span class="kw">impl </span>WriteOptionsBuilder { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>build(<span class="self">self</span>) -> WriteOptions { + <span class="self">self</span>.<span class="number">0 + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_format(<span class="kw-2">mut </span><span class="self">self</span>, compression_format: CompressionFormat) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_format = compression_format; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>WriteOptionsBuilder { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>WriteOptionsBuilder { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self</span>(value.into()) + } +} + +<span class="doccomment">/// Common parameters to configure how files are written. +/// +/// ```rust +/// use ba2::fo4::{CompressionFormat, FileWriteOptions, Format}; +/// +/// // Write a file for FO4/FO76 +/// let _ = FileWriteOptions::builder() +/// .compression_format(CompressionFormat::Zip) +/// .build(); +/// +/// // Write a file for SF, GNRL format +/// let _ = FileWriteOptions::builder() +/// .compression_format(CompressionFormat::Zip) +/// .build(); +/// +/// // Write a file for SF, DX10 format +/// let _ = FileWriteOptions::builder() +/// .compression_format(CompressionFormat::LZ4) +/// .build(); +/// ``` +</span><span class="attr">#[derive(Clone, Copy, Debug, Default)] +</span><span class="kw">pub struct </span>WriteOptions { + compression_format: CompressionFormat, +} + +<span class="kw">impl </span>WriteOptions { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>builder() -> WriteOptionsBuilder { + WriteOptionsBuilder::new() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_format(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionFormat { + <span class="self">self</span>.compression_format + } +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>WriteOptions { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>WriteOptions { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + compression_format: value.compression_format(), + } + } +} + +<span class="doccomment">/// File header for DX10 archives. +</span><span class="attr">#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +</span><span class="kw">pub struct </span>DX10 { + <span class="kw">pub </span>height: u16, + <span class="kw">pub </span>width: u16, + <span class="kw">pub </span>mip_count: u8, + <span class="kw">pub </span>format: u8, + <span class="kw">pub </span>flags: u8, + <span class="kw">pub </span>tile_mode: u8, +} + +<span class="doccomment">/// File header for GNMF archives. +</span><span class="attr">#[derive(Clone, Copy, Debug, Eq, PartialEq)] +</span><span class="kw">pub struct </span>GNMF { + <span class="doccomment">/// See [here](https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/GNFTexture.cs#L529-L536) for more info. + </span><span class="kw">pub </span>metadata: [u32; <span class="number">8</span>], +} + +<span class="macro">macro_rules! </span>bit_field { + (<span class="macro-nonterminal">$getter</span>:ident, <span class="macro-nonterminal">$setter</span>:ident, [<span class="macro-nonterminal">$slot</span>:literal], <span class="macro-nonterminal">$count</span>:literal << <span class="macro-nonterminal">$shift</span>:literal,) => { + <span class="attr">#[allow(unused)] + </span><span class="kw">fn </span><span class="macro-nonterminal">$getter</span>(<span class="kw-2">&</span><span class="self">self</span>) -> u32 { + <span class="kw">const </span>MASK: u32 = { + <span class="kw">let </span><span class="kw-2">mut </span>i = <span class="number">0</span>; + <span class="kw">let </span><span class="kw-2">mut </span>mask: u32 = <span class="number">0</span>; + <span class="kw">while </span>i < <span class="macro-nonterminal">$count </span>{ + mask = (mask << <span class="number">1</span>) | <span class="number">1</span>; + i += <span class="number">1</span>; + } + mask << <span class="macro-nonterminal">$shift + </span>}; + (<span class="self">self</span>.metadata[<span class="macro-nonterminal">$slot</span>] & MASK) >> <span class="macro-nonterminal">$shift + </span>} + + <span class="attr">#[allow(unused)] + </span><span class="kw">fn </span><span class="macro-nonterminal">$setter</span>(<span class="kw-2">&mut </span><span class="self">self</span>, <span class="macro-nonterminal">$getter</span>: u32) -> <span class="kw-2">&mut </span><span class="self">Self </span>{ + <span class="kw">const </span>MASK: u32 = { + <span class="kw">let </span><span class="kw-2">mut </span>i = <span class="number">0</span>; + <span class="kw">let </span><span class="kw-2">mut </span>mask: u32 = <span class="number">0</span>; + <span class="kw">while </span>i < <span class="macro-nonterminal">$count </span>{ + mask = (mask << <span class="number">1</span>) | <span class="number">1</span>; + i += <span class="number">1</span>; + } + mask << <span class="macro-nonterminal">$shift + </span>}; + <span class="self">self</span>.metadata[<span class="macro-nonterminal">$slot</span>] |= (<span class="macro-nonterminal">$getter </span><< <span class="macro-nonterminal">$shift</span>) & MASK; + <span class="self">self + </span>} + }; +} + +<span class="kw">impl </span>GNMF { + <span class="macro">bit_field! </span>{ + min_lod_clamp, + with_min_lod_clamp, + [<span class="number">1</span>], + <span class="number">12 </span><< <span class="number">8</span>, + } + + <span class="macro">bit_field! </span>{ + surface_format, + with_surface_format, + [<span class="number">1</span>], + <span class="number">6 </span><< <span class="number">20</span>, + } + + <span class="macro">bit_field! </span>{ + channel_type, + with_channel_type, + [<span class="number">1</span>], + <span class="number">4 </span><< <span class="number">26</span>, + } + + <span class="macro">bit_field! </span>{ + width, + with_width, + [<span class="number">2</span>], + <span class="number">14 </span><< <span class="number">0</span>, + } + + <span class="macro">bit_field! </span>{ + height, + with_height, + [<span class="number">2</span>], + <span class="number">14 </span><< <span class="number">14</span>, + } + + <span class="macro">bit_field! </span>{ + sampler_modulation_factor, + with_sampler_modulation_factor, + [<span class="number">2</span>], + <span class="number">3 </span><< <span class="number">28</span>, + } + + <span class="macro">bit_field! </span>{ + channel_order_x, + with_channel_order_x, + [<span class="number">3</span>], + <span class="number">3 </span><< <span class="number">0</span>, + } + + <span class="macro">bit_field! </span>{ + channel_order_y, + with_channel_order_y, + [<span class="number">3</span>], + <span class="number">3 </span><< <span class="number">3</span>, + } + + <span class="macro">bit_field! </span>{ + channel_order_z, + with_channel_order_z, + [<span class="number">3</span>], + <span class="number">3 </span><< <span class="number">6</span>, + } + + <span class="macro">bit_field! </span>{ + channel_order_w, + with_channel_order_w, + [<span class="number">3</span>], + <span class="number">3 </span><< <span class="number">9</span>, + } + + <span class="macro">bit_field! </span>{ + base_mip_level, + with_base_mip_level, + [<span class="number">3</span>], + <span class="number">4 </span><< <span class="number">12</span>, + } + + <span class="macro">bit_field! </span>{ + last_mip_level, + with_last_mip_level, + [<span class="number">3</span>], + <span class="number">4 </span><< <span class="number">16</span>, + } + + <span class="macro">bit_field! </span>{ + tile_mode, + with_tile_mode, + [<span class="number">3</span>], + <span class="number">5 </span><< <span class="number">20</span>, + } + + <span class="macro">bit_field! </span>{ + padded_to_pow2, + with_padded_to_pow2, + [<span class="number">3</span>], + <span class="number">1 </span><< <span class="number">25</span>, + } + + <span class="macro">bit_field! </span>{ + texture_type, + with_texture_type, + [<span class="number">3</span>], + <span class="number">4 </span><< <span class="number">28</span>, + } + + <span class="macro">bit_field! </span>{ + depth, + with_depth, + [<span class="number">4</span>], + <span class="number">13 </span><< <span class="number">0</span>, + } + + <span class="macro">bit_field! </span>{ + pitch, + with_pitch, + [<span class="number">4</span>], + <span class="number">14 </span><< <span class="number">13</span>, + } + + <span class="macro">bit_field! </span>{ + base_array_slice_index, + with_base_array_slice_index, + [<span class="number">5</span>], + <span class="number">13 </span><< <span class="number">0</span>, + } + + <span class="macro">bit_field! </span>{ + last_array_slice_index, + with_last_array_slice_index, + [<span class="number">5</span>], + <span class="number">13 </span><< <span class="number">13</span>, + } + + <span class="macro">bit_field! </span>{ + min_lod_warning, + with_min_lod_warning, + [<span class="number">6</span>], + <span class="number">12 </span><< <span class="number">0</span>, + } + + <span class="macro">bit_field! </span>{ + mip_stats_counter_index, + with_mip_stats_counter_index, + [<span class="number">6</span>], + <span class="number">8 </span><< <span class="number">12</span>, + } + + <span class="macro">bit_field! </span>{ + mip_stats_enabled, + with_mip_stats_enabled, + [<span class="number">6</span>], + <span class="number">1 </span><< <span class="number">20</span>, + } + + <span class="macro">bit_field! </span>{ + metadata_compression_enabled, + with_metadata_compression_enabled, + [<span class="number">6</span>], + <span class="number">1 </span><< <span class="number">21</span>, + } + + <span class="macro">bit_field! </span>{ + dcc_alpha_on_msb, + with_dcc_alpha_on_msb, + [<span class="number">6</span>], + <span class="number">1 </span><< <span class="number">22</span>, + } + + <span class="macro">bit_field! </span>{ + dcc_color_transform, + with_dcc_color_transform, + [<span class="number">6</span>], + <span class="number">1 </span><< <span class="number">23</span>, + } + + <span class="macro">bit_field! </span>{ + use_alt_tile_mode, + with_use_alt_tile_mode, + [<span class="number">6</span>], + <span class="number">1 </span><< <span class="number">24</span>, + } + + <span class="kw">fn </span>block_size(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="prelude-ty">Result</span><usize> { + <span class="comment">// https://learn.microsoft.com/en-us/windows/win32/direct3d11/texture-block-compression-in-direct3d-11 + </span><span class="kw">match </span><span class="self">self</span>.surface_format() { + SurfaceFormat::FORMAT_8_8_8_8 => <span class="prelude-val">Ok</span>(<span class="number">4</span>), + SurfaceFormat::BC1 | SurfaceFormat::BC4 => <span class="prelude-val">Ok</span>(<span class="number">8</span>), + SurfaceFormat::BC2 + | SurfaceFormat::BC3 + | SurfaceFormat::BC5 + | SurfaceFormat::BC6 + | SurfaceFormat::BC7 => <span class="prelude-val">Ok</span>(<span class="number">16</span>), + <span class="kw">_ </span>=> <span class="prelude-val">Err</span>(Error::NotImplemented), + } + } +} + +<span class="kw">impl </span>Default <span class="kw">for </span>GNMF { + <span class="kw">fn </span>default() -> <span class="self">Self </span>{ + <span class="kw">let </span><span class="kw-2">mut </span>this = <span class="self">Self </span>{ + metadata: Default::default(), + }; + <span class="kw">_ </span>= this + .with_sampler_modulation_factor(SamplerModulationFactor::FACTOR_1_0000) + .with_channel_order_x(TextureChannel::X) + .with_channel_order_y(TextureChannel::Y) + .with_channel_order_z(TextureChannel::Z) + .with_channel_order_w(TextureChannel::W) + .with_tile_mode(TileMode::THIN_1D_THIN) + .with_texture_type(TextureType::TYPE_2D) + .with_depth(<span class="number">1</span>); + this + } +} + +<span class="kw">impl </span>TryFrom<<span class="kw-2">&</span>TexMetadata> <span class="kw">for </span>GNMF { + <span class="kw">type </span>Error = Error; + + <span class="kw">fn </span>try_from(value: <span class="kw-2">&</span>TexMetadata) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>> { + <span class="kw">let </span><span class="kw-2">mut </span>this = <span class="self">Self</span>::default(); + <span class="kw">_ </span>= this + .with_surface_format(<span class="kw">match </span>value.format { + DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_TYPELESS + | DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_UNORM + | DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_UNORM_SRGB + | DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_UINT + | DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_SNORM + | DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_SINT => SurfaceFormat::FORMAT_8_8_8_8, + DXGI_FORMAT::DXGI_FORMAT_BC1_TYPELESS + | DXGI_FORMAT::DXGI_FORMAT_BC1_UNORM + | DXGI_FORMAT::DXGI_FORMAT_BC1_UNORM_SRGB => SurfaceFormat::BC1, + DXGI_FORMAT::DXGI_FORMAT_BC2_TYPELESS + | DXGI_FORMAT::DXGI_FORMAT_BC2_UNORM + | DXGI_FORMAT::DXGI_FORMAT_BC2_UNORM_SRGB => SurfaceFormat::BC2, + DXGI_FORMAT::DXGI_FORMAT_BC3_TYPELESS + | DXGI_FORMAT::DXGI_FORMAT_BC3_UNORM + | DXGI_FORMAT::DXGI_FORMAT_BC3_UNORM_SRGB => SurfaceFormat::BC3, + DXGI_FORMAT::DXGI_FORMAT_BC4_TYPELESS + | DXGI_FORMAT::DXGI_FORMAT_BC4_UNORM + | DXGI_FORMAT::DXGI_FORMAT_BC4_SNORM => SurfaceFormat::BC4, + DXGI_FORMAT::DXGI_FORMAT_BC5_TYPELESS + | DXGI_FORMAT::DXGI_FORMAT_BC5_UNORM + | DXGI_FORMAT::DXGI_FORMAT_BC5_SNORM => SurfaceFormat::BC5, + DXGI_FORMAT::DXGI_FORMAT_BC6H_TYPELESS + | DXGI_FORMAT::DXGI_FORMAT_BC6H_UF16 + | DXGI_FORMAT::DXGI_FORMAT_BC6H_SF16 => SurfaceFormat::BC6, + DXGI_FORMAT::DXGI_FORMAT_BC7_TYPELESS + | DXGI_FORMAT::DXGI_FORMAT_BC7_UNORM + | DXGI_FORMAT::DXGI_FORMAT_BC7_UNORM_SRGB => SurfaceFormat::BC7, + <span class="kw">_ </span>=> <span class="kw">return </span><span class="prelude-val">Err</span>(Error::NotImplemented), + }) + .with_channel_type(<span class="kw">if </span>value.format.is_srgb() { + ChannelType::SRGB + } <span class="kw">else </span>{ + <span class="kw">match </span>value.format.format_data_type() { + FORMAT_TYPE::FORMAT_TYPE_FLOAT => ChannelType::FLOAT, + FORMAT_TYPE::FORMAT_TYPE_UNORM => ChannelType::UNORM, + FORMAT_TYPE::FORMAT_TYPE_SNORM => ChannelType::SNORM, + FORMAT_TYPE::FORMAT_TYPE_UINT => ChannelType::UINT, + FORMAT_TYPE::FORMAT_TYPE_SINT => ChannelType::SINT, + <span class="kw">_ </span>=> <span class="kw">return </span><span class="prelude-val">Err</span>(Error::NotImplemented), + } + }) + .with_width((value.width - <span class="number">1</span>).try_into()<span class="question-mark">?</span>) + .with_height((value.height - <span class="number">1</span>).try_into()<span class="question-mark">?</span>) + .with_last_mip_level((value.mip_levels - <span class="number">1</span>).try_into()<span class="question-mark">?</span>) + .with_texture_type(<span class="kw">if </span>value.is_cubemap() { + TextureType::CUBEMAP + } <span class="kw">else </span>{ + <span class="kw">match </span>value.dimension { + TEX_DIMENSION::TEX_DIMENSION_TEXTURE1D => TextureType::TYPE_1D, + TEX_DIMENSION::TEX_DIMENSION_TEXTURE2D => TextureType::TYPE_2D, + TEX_DIMENSION::TEX_DIMENSION_TEXTURE3D => TextureType::TYPE_3D, + <span class="kw">_ </span>=> <span class="kw">return </span><span class="prelude-val">Err</span>(Error::NotImplemented), + } + }) + .with_depth((value.depth - <span class="number">1</span>).try_into()<span class="question-mark">?</span>) + .with_last_array_slice_index((value.array_size - <span class="number">1</span>).try_into()<span class="question-mark">?</span>); + <span class="prelude-val">Ok</span>(this) + } +} + +<span class="kw">impl </span>TryFrom<<span class="kw-2">&</span>GNMF> <span class="kw">for </span>TexMetadata { + <span class="kw">type </span>Error = Error; + + <span class="kw">fn </span>try_from(value: <span class="kw-2">&</span>GNMF) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>> { + <span class="kw">let </span>texture_type = value.texture_type(); + <span class="prelude-val">Ok</span>(<span class="self">Self </span>{ + width: value.width() <span class="kw">as </span>usize + <span class="number">1</span>, + height: value.height() <span class="kw">as </span>usize + <span class="number">1</span>, + depth: value.depth() <span class="kw">as </span>usize + <span class="number">1</span>, + array_size: (value.last_array_slice_index() - value.base_array_slice_index()) <span class="kw">as </span>usize + + <span class="number">1</span>, + mip_levels: (value.last_mip_level() - value.base_mip_level()) <span class="kw">as </span>usize + <span class="number">1</span>, + misc_flags: <span class="kw">if </span>texture_type == TextureType::CUBEMAP { + TEX_MISC_TEXTURECUBE + } <span class="kw">else </span>{ + <span class="number">0 + </span>}, + misc_flags2: <span class="number">0</span>, + format: <span class="kw">match </span>(value.surface_format(), value.channel_type()) { + (SurfaceFormat::FORMAT_8_8_8_8, ChannelType::UNORM) => { + DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_UNORM + } + (SurfaceFormat::FORMAT_8_8_8_8, ChannelType::SRGB) => { + DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_UNORM_SRGB + } + (SurfaceFormat::FORMAT_8_8_8_8, ChannelType::UINT) => { + DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_UINT + } + (SurfaceFormat::FORMAT_8_8_8_8, ChannelType::SNORM) => { + DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_SNORM + } + (SurfaceFormat::FORMAT_8_8_8_8, ChannelType::SINT) => { + DXGI_FORMAT::DXGI_FORMAT_R8G8B8A8_SINT + } + + (SurfaceFormat::BC1, ChannelType::UNORM) => DXGI_FORMAT::DXGI_FORMAT_BC1_UNORM, + (SurfaceFormat::BC1, ChannelType::SRGB) => DXGI_FORMAT::DXGI_FORMAT_BC1_UNORM_SRGB, + + (SurfaceFormat::BC2, ChannelType::UNORM) => DXGI_FORMAT::DXGI_FORMAT_BC2_UNORM, + (SurfaceFormat::BC2, ChannelType::SRGB) => DXGI_FORMAT::DXGI_FORMAT_BC2_UNORM_SRGB, + + (SurfaceFormat::BC3, ChannelType::UNORM) => DXGI_FORMAT::DXGI_FORMAT_BC3_UNORM, + (SurfaceFormat::BC3, ChannelType::SRGB) => DXGI_FORMAT::DXGI_FORMAT_BC3_UNORM_SRGB, + + (SurfaceFormat::BC4, ChannelType::UNORM) => DXGI_FORMAT::DXGI_FORMAT_BC4_UNORM, + (SurfaceFormat::BC4, ChannelType::SNORM) => DXGI_FORMAT::DXGI_FORMAT_BC4_SNORM, + + (SurfaceFormat::BC5, ChannelType::UNORM) => DXGI_FORMAT::DXGI_FORMAT_BC5_UNORM, + (SurfaceFormat::BC5, ChannelType::SNORM) => DXGI_FORMAT::DXGI_FORMAT_BC5_SNORM, + + (SurfaceFormat::BC6, <span class="kw">_</span>) => DXGI_FORMAT::DXGI_FORMAT_BC6H_UF16, + + (SurfaceFormat::BC7, ChannelType::UNORM) => DXGI_FORMAT::DXGI_FORMAT_BC7_UNORM, + (SurfaceFormat::BC7, ChannelType::SRGB) => DXGI_FORMAT::DXGI_FORMAT_BC7_UNORM_SRGB, + + <span class="kw">_ </span>=> <span class="kw">return </span><span class="prelude-val">Err</span>(Error::NotImplemented), + }, + dimension: <span class="kw">match </span>texture_type { + TextureType::TYPE_1D => TEX_DIMENSION::TEX_DIMENSION_TEXTURE1D, + TextureType::TYPE_2D | TextureType::CUBEMAP => { + TEX_DIMENSION::TEX_DIMENSION_TEXTURE2D + } + TextureType::TYPE_3D => TEX_DIMENSION::TEX_DIMENSION_TEXTURE3D, + <span class="kw">_ </span>=> <span class="kw">return </span><span class="prelude-val">Err</span>(Error::NotImplemented), + }, + }) + } +} + +<span class="kw">struct </span>ChannelType; + +<span class="comment">// https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/ChannelType.cs#L3 +</span><span class="attr">#[allow(unused)] +</span><span class="kw">impl </span>ChannelType { + <span class="kw">const </span>UNORM: u32 = <span class="number">0x0</span>; + <span class="kw">const </span>SNORM: u32 = <span class="number">0x1</span>; + <span class="kw">const </span>USCALED: u32 = <span class="number">0x2</span>; + <span class="kw">const </span>SSCALED: u32 = <span class="number">0x3</span>; + <span class="kw">const </span>UINT: u32 = <span class="number">0x4</span>; + <span class="kw">const </span>SINT: u32 = <span class="number">0x5</span>; + <span class="kw">const </span>SNORM_NO_ZERO: u32 = <span class="number">0x6</span>; + <span class="kw">const </span>FLOAT: u32 = <span class="number">0x7</span>; + <span class="kw">const </span>SRGB: u32 = <span class="number">0x9</span>; + <span class="kw">const </span>UBNORM: u32 = <span class="number">0xA</span>; + <span class="kw">const </span>UBNORM_NO_ZERO: u32 = <span class="number">0xB</span>; + <span class="kw">const </span>UBINT: u32 = <span class="number">0xC</span>; + <span class="kw">const </span>UBSCALED: u32 = <span class="number">0xD</span>; +} + +<span class="kw">struct </span>SamplerModulationFactor; + +<span class="comment">// https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/SamplerModulationFactor.cs#L3 +</span><span class="attr">#[allow(unused)] +</span><span class="kw">impl </span>SamplerModulationFactor { + <span class="kw">const </span>FACTOR_0_0000: u32 = <span class="number">0x0</span>; + <span class="kw">const </span>FACTOR_0_1250: u32 = <span class="number">0x1</span>; + <span class="kw">const </span>FACTOR_0_3125: u32 = <span class="number">0x2</span>; + <span class="kw">const </span>FACTOR_0_4375: u32 = <span class="number">0x3</span>; + <span class="kw">const </span>FACTOR_0_5625: u32 = <span class="number">0x4</span>; + <span class="kw">const </span>FACTOR_0_6875: u32 = <span class="number">0x5</span>; + <span class="kw">const </span>FACTOR_0_8750: u32 = <span class="number">0x6</span>; + <span class="kw">const </span>FACTOR_1_0000: u32 = <span class="number">0x7</span>; +} + +<span class="kw">struct </span>SurfaceFormat; + +<span class="comment">// https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/SurfaceFormat.cs#L3 +</span><span class="attr">#[allow(unused)] +</span><span class="kw">impl </span>SurfaceFormat { + <span class="kw">const </span>INVALID: u32 = <span class="number">0x0</span>; + <span class="kw">const </span>FORMAT_8: u32 = <span class="number">0x1</span>; + <span class="kw">const </span>FORMAT_16: u32 = <span class="number">0x2</span>; + <span class="kw">const </span>FORMAT_8_8: u32 = <span class="number">0x3</span>; + <span class="kw">const </span>FORMAT_32: u32 = <span class="number">0x4</span>; + <span class="kw">const </span>FORMAT_16_16: u32 = <span class="number">0x5</span>; + <span class="kw">const </span>FORMAT_10_11_11: u32 = <span class="number">0x6</span>; + <span class="kw">const </span>FORMAT_11_11_10: u32 = <span class="number">0x7</span>; + <span class="kw">const </span>FORMAT_10_10_10_2: u32 = <span class="number">0x8</span>; + <span class="kw">const </span>FORMAT_2_10_10_10: u32 = <span class="number">0x9</span>; + <span class="kw">const </span>FORMAT_8_8_8_8: u32 = <span class="number">0xA</span>; + <span class="kw">const </span>FORMAT_32_32: u32 = <span class="number">0xB</span>; + <span class="kw">const </span>FORMAT_16_16_16_16: u32 = <span class="number">0xC</span>; + <span class="kw">const </span>FORMAT_32_32_32: u32 = <span class="number">0xD</span>; + <span class="kw">const </span>FORMAT_32_32_32_32: u32 = <span class="number">0xE</span>; + <span class="kw">const </span>FORMAT_5_6_5: u32 = <span class="number">0x10</span>; + <span class="kw">const </span>FORMAT_1_5_5_5: u32 = <span class="number">0x11</span>; + <span class="kw">const </span>FORMAT_5_5_5_1: u32 = <span class="number">0x12</span>; + <span class="kw">const </span>FORMAT_4_4_4_4: u32 = <span class="number">0x13</span>; + <span class="kw">const </span>FORMAT_8_24: u32 = <span class="number">0x14</span>; + <span class="kw">const </span>FORMAT_24_8: u32 = <span class="number">0x15</span>; + <span class="kw">const </span>FORMAT_X24_8_32: u32 = <span class="number">0x16</span>; + <span class="kw">const </span>GB_GR: u32 = <span class="number">0x20</span>; + <span class="kw">const </span>BG_RG: u32 = <span class="number">0x21</span>; + <span class="kw">const </span>FORMAT_5_9_9_9: u32 = <span class="number">0x22</span>; + <span class="kw">const </span>BC1: u32 = <span class="number">0x23</span>; + <span class="kw">const </span>BC2: u32 = <span class="number">0x24</span>; + <span class="kw">const </span>BC3: u32 = <span class="number">0x25</span>; + <span class="kw">const </span>BC4: u32 = <span class="number">0x26</span>; + <span class="kw">const </span>BC5: u32 = <span class="number">0x27</span>; + <span class="kw">const </span>BC6: u32 = <span class="number">0x28</span>; + <span class="kw">const </span>BC7: u32 = <span class="number">0x29</span>; + <span class="kw">const </span>FMASK_8_S2_F1: u32 = <span class="number">0x2C</span>; + <span class="kw">const </span>FMASK_8_S4_F1: u32 = <span class="number">0x2D</span>; + <span class="kw">const </span>FMASK_8_S8_F1: u32 = <span class="number">0x2E</span>; + <span class="kw">const </span>FMASK_8_S2_F2: u32 = <span class="number">0x2F</span>; + <span class="kw">const </span>FMASK_8_S4_F2: u32 = <span class="number">0x30</span>; + <span class="kw">const </span>FMASK_8_S4_F4: u32 = <span class="number">0x31</span>; + <span class="kw">const </span>FMASK_16_S16_F1: u32 = <span class="number">0x32</span>; + <span class="kw">const </span>FMASK_16_S8_F2: u32 = <span class="number">0x33</span>; + <span class="kw">const </span>FMASK_32_S16_F2: u32 = <span class="number">0x34</span>; + <span class="kw">const </span>FMASK_32_S8_F4: u32 = <span class="number">0x35</span>; + <span class="kw">const </span>FMASK_32_S8_F8: u32 = <span class="number">0x36</span>; + <span class="kw">const </span>FMASK_64_S16_F4: u32 = <span class="number">0x37</span>; + <span class="kw">const </span>FMASK_64_S16_F8: u32 = <span class="number">0x38</span>; + <span class="kw">const </span>FORMAT_4_4: u32 = <span class="number">0x39</span>; + <span class="kw">const </span>FORMAT_6_5_5: u32 = <span class="number">0x3A</span>; + <span class="kw">const </span>FORMAT_1: u32 = <span class="number">0x3B</span>; + <span class="kw">const </span>FORMAT_1_REVERSED: u32 = <span class="number">0x3C</span>; +} + +<span class="kw">struct </span>TextureChannel; + +<span class="comment">// https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/TextureChannel.cs#L3 +</span><span class="attr">#[allow(unused)] +</span><span class="kw">impl </span>TextureChannel { + <span class="kw">const </span>CONSTANT_0: u32 = <span class="number">0x0</span>; + <span class="kw">const </span>CONSTANT_1: u32 = <span class="number">0x1</span>; + <span class="kw">const </span>X: u32 = <span class="number">0x4</span>; + <span class="kw">const </span>Y: u32 = <span class="number">0x5</span>; + <span class="kw">const </span>Z: u32 = <span class="number">0x6</span>; + <span class="kw">const </span>W: u32 = <span class="number">0x7</span>; +} + +<span class="kw">struct </span>TextureType; + +<span class="comment">// https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/TextureType.cs#L3 +</span><span class="attr">#[allow(unused)] +</span><span class="kw">impl </span>TextureType { + <span class="kw">const </span>TYPE_1D: u32 = <span class="number">0x8</span>; + <span class="kw">const </span>TYPE_2D: u32 = <span class="number">0x9</span>; + <span class="kw">const </span>TYPE_3D: u32 = <span class="number">0xA</span>; + <span class="kw">const </span>CUBEMAP: u32 = <span class="number">0xB</span>; + <span class="kw">const </span>TYPE_1D_ARRAY: u32 = <span class="number">0xC</span>; + <span class="kw">const </span>TYPE_2D_ARRAY: u32 = <span class="number">0xD</span>; + <span class="kw">const </span>TYPE_2D_MSAA: u32 = <span class="number">0xE</span>; + <span class="kw">const </span>TYPE_2D_ARRAY_MSAA: u32 = <span class="number">0xF</span>; +} + +<span class="kw">struct </span>TileMode; + +<span class="comment">// https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/GNF/TileMode.cs#L6 +</span><span class="attr">#[allow(unused)] +</span><span class="kw">impl </span>TileMode { + <span class="kw">const </span>DEPTH_2D_THIN_64: u32 = <span class="number">0x0</span>; + <span class="kw">const </span>DEPTH_2D_THIN_128: u32 = <span class="number">0x1</span>; + <span class="kw">const </span>DEPTH_2D_THIN_256: u32 = <span class="number">0x2</span>; + <span class="kw">const </span>DEPTH_2D_THIN_512: u32 = <span class="number">0x3</span>; + <span class="kw">const </span>DEPTH_2D_THIN_1K: u32 = <span class="number">0x4</span>; + <span class="kw">const </span>DEPTH_1D_THIN: u32 = <span class="number">0x5</span>; + <span class="kw">const </span>DEPTH_2D_THIN_PRT_256: u32 = <span class="number">0x6</span>; + <span class="kw">const </span>DEPTH_2D_THIN_PRT_1K: u32 = <span class="number">0x7</span>; + <span class="kw">const </span>DISPLAY_LINEAR_ALIGNED: u32 = <span class="number">0x8</span>; + <span class="kw">const </span>DISPLAY_1D_THIN: u32 = <span class="number">0x9</span>; + <span class="kw">const </span>DISPLAY_2D_THIN: u32 = <span class="number">0xA</span>; + <span class="kw">const </span>DISPLAY_THIN_PRT: u32 = <span class="number">0xB</span>; + <span class="kw">const </span>DISPLAY_2D_THIN_PRT: u32 = <span class="number">0xC</span>; + <span class="kw">const </span>THIN_1D_THIN: u32 = <span class="number">0xD</span>; + <span class="kw">const </span>THIN_2D_THIN: u32 = <span class="number">0xE</span>; + <span class="kw">const </span>THIN_3D_THIN: u32 = <span class="number">0xF</span>; + <span class="kw">const </span>THIN_THIN_PRT: u32 = <span class="number">0x10</span>; + <span class="kw">const </span>THIN_2D_THIN_PRT: u32 = <span class="number">0x11</span>; + <span class="kw">const </span>THIN_3D_THIN_PRT: u32 = <span class="number">0x12</span>; + <span class="kw">const </span>THIN_1D_THICK: u32 = <span class="number">0x13</span>; + <span class="kw">const </span>THIN_2D_THICK: u32 = <span class="number">0x14</span>; + <span class="kw">const </span>THIN_3D_THICK: u32 = <span class="number">0x15</span>; + <span class="kw">const </span>THIN_THICK_PRT: u32 = <span class="number">0x16</span>; + <span class="kw">const </span>THIN_2D_THICK_PRT: u32 = <span class="number">0x17</span>; + <span class="kw">const </span>THIN_3D_THICK_PRT: u32 = <span class="number">0x18</span>; + <span class="kw">const </span>THIN_2DX_THICK: u32 = <span class="number">0x19</span>; + <span class="kw">const </span>THIN_3DX_THICK: u32 = <span class="number">0x1A</span>; + <span class="kw">const </span>DISPLAY_LINEAR_GENERAL: u32 = <span class="number">0x1F</span>; +} + +<span class="doccomment">/// Optionally present file header. +/// +/// The header variant must match the archive [`Format`] when writing. +</span><span class="attr">#[allow(clippy::upper_case_acronyms)] +#[derive(Clone, Debug, Default, Eq, PartialEq)] +</span><span class="kw">pub enum </span>Header { + <span class="attr">#[default] + </span>GNRL, + DX10(DX10), + GNMF(GNMF), +} + +<span class="kw">impl </span>From<DX10> <span class="kw">for </span>Header { + <span class="kw">fn </span>from(value: DX10) -> <span class="self">Self </span>{ + <span class="self">Self</span>::DX10(value) + } +} + +<span class="kw">impl </span>From<GNMF> <span class="kw">for </span>Header { + <span class="kw">fn </span>from(value: GNMF) -> <span class="self">Self </span>{ + <span class="self">Self</span>::GNMF(value) + } +} + +<span class="kw">mod </span>swizzle { + <span class="comment">// https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/Swizzle/SwizzleUtilities.cs#L9 + </span><span class="kw">fn </span>morton(t: usize, sx: usize, sy: usize) -> usize { + <span class="kw">let </span><span class="kw-2">mut </span>num1 = <span class="number">1</span>; + <span class="kw">let </span><span class="kw-2">mut </span>num2 = <span class="number">1</span>; + <span class="kw">let </span><span class="kw-2">mut </span>num3 = t; + <span class="kw">let </span><span class="kw-2">mut </span>num4 = sx; + <span class="kw">let </span><span class="kw-2">mut </span>num5 = sy; + <span class="kw">let </span><span class="kw-2">mut </span>num6 = <span class="number">0</span>; + <span class="kw">let </span><span class="kw-2">mut </span>num7 = <span class="number">0</span>; + + <span class="kw">while </span>num4 > <span class="number">1 </span>|| num5 > <span class="number">1 </span>{ + <span class="kw">if </span>num4 > <span class="number">1 </span>{ + num6 += num2 * (num3 & <span class="number">1</span>); + num3 >>= <span class="number">1</span>; + num2 <span class="kw-2">*</span>= <span class="number">2</span>; + num4 >>= <span class="number">1</span>; + } + <span class="kw">if </span>num5 > <span class="number">1 </span>{ + num7 += num1 * (num3 & <span class="number">1</span>); + num3 >>= <span class="number">1</span>; + num1 <span class="kw-2">*</span>= <span class="number">2</span>; + num5 >>= <span class="number">1</span>; + } + } + + num7 * sx + num6 + } + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod </span>ps4 { + <span class="comment">// https://github.com/tge-was-taken/GFD-Studio/blob/dad6c2183a6ec0716c3943b71991733bfbd4649d/GFDLibrary/Textures/Swizzle/PS4SwizzleAlgorithm.cs#L20 + </span><span class="kw">fn </span>do_swizzle( + source: <span class="kw-2">&</span>[u8], + destination: <span class="kw-2">&mut </span>Vec<u8>, + width: usize, + height: usize, + block_size: usize, + unswizzle: bool, + ) { + destination.clear(); + destination.resize_with(source.len(), Default::default); + <span class="kw">let </span>height_texels = height / <span class="number">4</span>; + <span class="kw">let </span>height_texels_aligned = (height_texels + <span class="number">7</span>) / <span class="number">8</span>; + <span class="kw">let </span>width_texels = width / <span class="number">4</span>; + <span class="kw">let </span>width_texels_aligned = (width_texels + <span class="number">7</span>) / <span class="number">8</span>; + <span class="kw">let </span><span class="kw-2">mut </span>data_index = <span class="number">0</span>; + + <span class="kw">for </span>y <span class="kw">in </span><span class="number">0</span>..height_texels_aligned { + <span class="kw">for </span>x <span class="kw">in </span><span class="number">0</span>..width_texels_aligned { + <span class="kw">for </span>t <span class="kw">in </span><span class="number">0</span>..<span class="number">64 </span>{ + <span class="kw">let </span>pixel_index = <span class="kw">super</span>::morton(t, <span class="number">8</span>, <span class="number">8</span>); + <span class="kw">let </span>div = pixel_index / <span class="number">8</span>; + <span class="kw">let </span>rem = pixel_index % <span class="number">8</span>; + <span class="kw">let </span>y_offset = (y * <span class="number">8</span>) + div; + <span class="kw">let </span>x_offset = (x * <span class="number">8</span>) + rem; + + <span class="kw">if </span>x_offset < width_texels && y_offset < height_texels { + <span class="kw">let </span>dest_pixel_index = y_offset * width_texels + x_offset; + <span class="kw">let </span>dest_index = block_size * dest_pixel_index; + <span class="kw">let </span>(src, dst) = <span class="kw">if </span>unswizzle { + (data_index, dest_index) + } <span class="kw">else </span>{ + (dest_index, data_index) + }; + destination[dst..dst + block_size] + .copy_from_slice(<span class="kw-2">&</span>source[src..src + block_size]); + } + + data_index += block_size; + } + } + } + } + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>swizzle( + source: <span class="kw-2">&</span>[u8], + destination: <span class="kw-2">&mut </span>Vec<u8>, + width: usize, + height: usize, + block_size: usize, + ) { + do_swizzle(source, destination, width, height, block_size, <span class="bool-val">false</span>); + } + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>unswizzle( + source: <span class="kw-2">&</span>[u8], + destination: <span class="kw-2">&mut </span>Vec<u8>, + width: usize, + height: usize, + block_size: usize, + ) { + do_swizzle(source, destination, width, height, block_size, <span class="bool-val">true</span>); + } + } +} + +<span class="kw">type </span>Container<<span class="lifetime">'bytes</span>> = Vec<Chunk<<span class="lifetime">'bytes</span>>>; + +<span class="doccomment">/// Represents a file within the FO4 virtual filesystem. +</span><span class="attr">#[derive(Clone, Debug, Default)] +</span><span class="kw">pub struct </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">pub</span>(<span class="kw">crate</span>) chunks: Container<<span class="lifetime">'bytes</span>>, + <span class="kw">pub </span>header: Header, +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Sealed <span class="kw">for </span>File<<span class="lifetime">'bytes</span>> {} + +<span class="kw">type </span>ReadResult<T> = T; +<span class="macro">derive::reader_with_options!</span>((File: ReadOptions) => ReadResult); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> File<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>as_mut_ptr(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="kw-2">*mut </span>Chunk<<span class="lifetime">'bytes</span>> { + <span class="self">self</span>.chunks.as_mut_ptr() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>as_mut_slice(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="kw-2">&mut </span>[Chunk<<span class="lifetime">'bytes</span>>] { + <span class="self">self</span>.chunks.as_mut_slice() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>as_ptr(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">*const </span>Chunk<<span class="lifetime">'bytes</span>> { + <span class="self">self</span>.chunks.as_ptr() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>as_slice(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>[Chunk<<span class="lifetime">'bytes</span>>] { + <span class="self">self</span>.chunks.as_slice() + } + + <span class="kw">pub fn </span>clear(<span class="kw-2">&mut </span><span class="self">self</span>) { + <span class="self">self</span>.chunks.clear(); + } + + <span class="doccomment">/// # Panics + /// + /// Panics if [`start_bound`](RangeBounds::start_bound) exceeds [`end_bound`](RangeBounds::end_bound), or if [`end_bound`](RangeBounds::end_bound) exceeds [`len`](Self::len). + </span><span class="kw">pub fn </span>drain<R>(<span class="kw-2">&mut </span><span class="self">self</span>, range: R) -> <span class="kw">impl </span>Iterator<Item = Chunk<<span class="lifetime">'bytes</span>>> + <span class="lifetime">'_ + </span><span class="kw">where + </span>R: RangeBounds<usize>, + { + <span class="self">self</span>.chunks.drain(range) + } + + <span class="doccomment">/// # Panics + /// + /// Panics if `index` exceeds [`len`](Self::len), or [`is_full`](Self::is_full). + </span><span class="kw">pub fn </span>insert(<span class="kw-2">&mut </span><span class="self">self</span>, index: usize, element: Chunk<<span class="lifetime">'bytes</span>>) { + <span class="self">self</span>.try_insert(index, element).unwrap(); + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>is_empty(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.chunks.is_empty() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>is_full(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.len() >= <span class="number">4 + </span>} + + <span class="kw">pub fn </span>iter(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw">impl </span>Iterator<Item = <span class="kw-2">&</span>Chunk<<span class="lifetime">'bytes</span>>> { + <span class="self">self</span>.chunks.iter() + } + + <span class="kw">pub fn </span>iter_mut(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="kw">impl </span>Iterator<Item = <span class="kw-2">&mut </span>Chunk<<span class="lifetime">'bytes</span>>> { + <span class="self">self</span>.chunks.iter_mut() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>len(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="self">self</span>.chunks.len() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + + <span class="kw">pub fn </span>pop(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="prelude-ty">Option</span><Chunk<<span class="lifetime">'bytes</span>>> { + <span class="self">self</span>.chunks.pop() + } + + <span class="doccomment">/// # Panics + /// + /// Panics if [`is_full`](Self::is_full). + </span><span class="kw">pub fn </span>push(<span class="kw-2">&mut </span><span class="self">self</span>, element: Chunk<<span class="lifetime">'bytes</span>>) { + <span class="self">self</span>.try_push(element).unwrap(); + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>remaining_capacity(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="number">4usize</span>.saturating_sub(<span class="self">self</span>.len()) + } + + <span class="doccomment">/// # Panics + /// + /// Panics if `index` exceeds [`len`](Self::len). + </span><span class="kw">pub fn </span>remove(<span class="kw-2">&mut </span><span class="self">self</span>, index: usize) -> Chunk<<span class="lifetime">'bytes</span>> { + <span class="self">self</span>.chunks.remove(index) + } + + <span class="kw">pub fn </span>retain_mut<F>(<span class="kw-2">&mut </span><span class="self">self</span>, f: F) + <span class="kw">where + </span>F: FnMut(<span class="kw-2">&mut </span>Chunk<<span class="lifetime">'bytes</span>>) -> bool, + { + <span class="self">self</span>.chunks.retain_mut(f); + } + + <span class="doccomment">/// # Panics + /// + /// Panics if `index` exceeds [`len`](Self::len), or [`is_empty`](Self::is_empty). + </span><span class="kw">pub fn </span>swap_remove(<span class="kw-2">&mut </span><span class="self">self</span>, index: usize) -> Chunk<<span class="lifetime">'bytes</span>> { + <span class="self">self</span>.try_swap_remove(index).unwrap() + } + + <span class="kw">pub fn </span>truncate(<span class="kw-2">&mut </span><span class="self">self</span>, len: usize) { + <span class="self">self</span>.chunks.truncate(len); + } + + <span class="doccomment">/// # Panics + /// + /// Panics if `index` exceeds [`len`](Self::len). + </span><span class="kw">pub fn </span>try_insert( + <span class="kw-2">&mut </span><span class="self">self</span>, + index: usize, + element: Chunk<<span class="lifetime">'bytes</span>>, + ) -> result::Result<(), CapacityError<<span class="lifetime">'bytes</span>>> { + <span class="kw">if </span><span class="self">self</span>.is_full() { + <span class="prelude-val">Err</span>(CapacityError(element)) + } <span class="kw">else </span>{ + <span class="self">self</span>.do_reserve(); + <span class="self">self</span>.chunks.insert(index, element); + <span class="prelude-val">Ok</span>(()) + } + } + + <span class="kw">pub fn </span>try_push( + <span class="kw-2">&mut </span><span class="self">self</span>, + element: Chunk<<span class="lifetime">'bytes</span>>, + ) -> result::Result<(), CapacityError<<span class="lifetime">'bytes</span>>> { + <span class="kw">if </span><span class="self">self</span>.is_full() { + <span class="prelude-val">Err</span>(CapacityError(element)) + } <span class="kw">else </span>{ + <span class="self">self</span>.do_reserve(); + <span class="self">self</span>.chunks.push(element); + <span class="prelude-val">Ok</span>(()) + } + } + + <span class="doccomment">/// # Panics + /// + /// Panics if `index` exceeds [`len`](Self::len). + </span><span class="kw">pub fn </span>try_swap_remove(<span class="kw-2">&mut </span><span class="self">self</span>, index: usize) -> <span class="prelude-ty">Option</span><Chunk<<span class="lifetime">'bytes</span>>> { + <span class="kw">if </span>index < <span class="self">self</span>.len() { + <span class="prelude-val">Some</span>(<span class="self">self</span>.chunks.swap_remove(index)) + } <span class="kw">else </span>{ + <span class="prelude-val">None + </span>} + } + + <span class="kw">pub fn </span>write<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out, options: <span class="kw-2">&</span>WriteOptions) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">match </span><span class="kw-2">&</span><span class="self">self</span>.header { + Header::GNRL => <span class="self">self</span>.write_gnrl(stream, <span class="kw-2">*</span>options), + Header::DX10(x) => <span class="self">self</span>.write_dx10(stream, <span class="kw-2">*</span>options, <span class="kw-2">*</span>x), + Header::GNMF(<span class="kw">_</span>) => <span class="prelude-val">Err</span>(Error::NotImplemented), <span class="comment">//self.write_gnmf(stream, *options, x)?, + </span>} + } + + <span class="kw">fn </span>do_reserve(<span class="kw-2">&mut </span><span class="self">self</span>) { + <span class="kw">match </span><span class="self">self</span>.len() { + <span class="number">0 </span>| <span class="number">3 </span>=> <span class="self">self</span>.chunks.reserve_exact(<span class="number">1</span>), + <span class="number">1 </span>=> <span class="self">self</span>.chunks.reserve_exact(<span class="number">3</span>), + <span class="number">2 </span>=> <span class="self">self</span>.chunks.reserve_exact(<span class="number">2</span>), + <span class="kw">_ </span>=> (), + } + } + + <span class="kw">fn </span>do_read<In>(stream: <span class="kw-2">&mut </span>In, options: <span class="kw-2">&</span>ReadOptions) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span><span class="kw-2">mut </span>this = <span class="kw">match </span>options.format { + Format::GNRL => <span class="self">Self</span>::read_gnrl(stream), + Format::DX10 => <span class="self">Self</span>::read_dx10(stream, options), + Format::GNMF => <span class="prelude-val">Err</span>(Error::NotImplemented), <span class="comment">// Self::read_gnmf(stream, options), + </span>}<span class="question-mark">?</span>; + + <span class="kw">if </span>options.compression_result == CompressionResult::Compressed { + <span class="kw">for </span>chunk <span class="kw">in </span><span class="kw-2">&mut </span>this { + <span class="kw-2">*</span>chunk = chunk.compress(<span class="kw-2">&</span>options.compression_options)<span class="question-mark">?</span>; + } + } + + <span class="prelude-val">Ok</span>(this) + } + + <span class="kw">fn </span>make_chunks(scratch: <span class="kw-2">&</span>ScratchImage, options: <span class="kw-2">&</span>ReadOptions) -> <span class="prelude-ty">Result</span><Vec<Chunk<<span class="lifetime">'bytes</span>>>> { + <span class="kw">let </span>metadata = scratch.metadata(); + <span class="kw">let </span>images = scratch.images(); + + <span class="kw">let </span>chunk_from_mips = |range: Range<usize>| -> <span class="prelude-ty">Result</span><Chunk> { + <span class="kw">let </span>try_clamp = |num: usize| -> <span class="prelude-ty">Result</span><u16> { + <span class="kw">let </span>result = usize::min(metadata.mip_levels.saturating_sub(<span class="number">1</span>), num).try_into()<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(result) + }; + <span class="kw">let </span>mips = try_clamp(range.start)<span class="question-mark">?</span>..=try_clamp(range.end - <span class="number">1</span>)<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>bytes = Vec::new(); + <span class="kw">for </span>image <span class="kw">in </span><span class="kw-2">&</span>images[range] { + <span class="kw">let </span>ptr = NonNull::new(image.pixels).unwrap_or(NonNull::dangling()); + <span class="kw">let </span>pixels = <span class="kw">unsafe </span>{ slice::from_raw_parts(ptr.as_ptr(), image.slice_pitch) }; + bytes.extend_from_slice(pixels); + } + <span class="prelude-val">Ok</span>(Chunk { + <span class="comment">// dxtex always allocates internally, so we have to copy bytes and use from_owned here + </span>bytes: CompressableBytes::from_owned(bytes.into(), <span class="prelude-val">None</span>), + mips: <span class="prelude-val">Some</span>(mips), + }) + }; + + <span class="kw">let </span>chunks = <span class="kw">if let </span><span class="prelude-val">Some</span>(images_len) = NonZeroUsize::new(images.len()) { + <span class="kw">if </span>metadata.is_cubemap() { + <span class="comment">// don't chunk cubemaps + </span><span class="kw">let </span>chunk = chunk_from_mips(<span class="number">0</span>..images_len.get())<span class="question-mark">?</span>; + [chunk].into_iter().collect() + } <span class="kw">else </span>{ + <span class="kw">let </span>pitch = metadata.format.compute_pitch( + options.mip_chunk_width, + options.mip_chunk_height, + CP_FLAGS::CP_FLAGS_NONE, + )<span class="question-mark">?</span>; + + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::with_capacity(<span class="number">4</span>); + <span class="kw">let </span><span class="kw-2">mut </span>size = <span class="number">0</span>; + <span class="kw">let </span><span class="kw-2">mut </span>start = <span class="number">0</span>; + <span class="kw">let </span><span class="kw-2">mut </span>stop = <span class="number">0</span>; + <span class="kw">loop </span>{ + <span class="kw">let </span>image = <span class="kw-2">&</span>images[stop]; + <span class="kw">if </span>size == <span class="number">0 </span>|| size + image.slice_pitch < pitch.slice { + size += image.slice_pitch; + } <span class="kw">else </span>{ + <span class="kw">let </span>chunk = chunk_from_mips(start..stop)<span class="question-mark">?</span>; + v.push(chunk); + start = stop; + size = image.slice_pitch; + } + + <span class="kw">if </span>v.len() == <span class="number">3 </span>{ + <span class="kw">break</span>; + } + + stop += <span class="number">1</span>; + <span class="kw">if </span>stop == images_len.get() { + <span class="kw">break</span>; + } + } + + <span class="kw">if </span>stop < images_len.get() { + <span class="kw">let </span>chunk = chunk_from_mips(stop..images_len.get())<span class="question-mark">?</span>; + v.push(chunk); + } <span class="kw">else </span>{ + <span class="kw">let </span>chunk = chunk_from_mips(start..stop)<span class="question-mark">?</span>; + v.push(chunk); + } + + <span class="macro">debug_assert!</span>(v.len() <= <span class="number">4</span>); + v + } + } <span class="kw">else </span>{ + Vec::new() + }; + + <span class="prelude-val">Ok</span>(chunks) + } + + <span class="kw">fn </span>read_dx10<In>(stream: <span class="kw-2">&</span>In, options: <span class="kw-2">&</span>ReadOptions) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>scratch = + ScratchImage::load_dds(stream.as_bytes(), DDS_FLAGS::DDS_FLAGS_NONE, <span class="prelude-val">None</span>, <span class="prelude-val">None</span>)<span class="question-mark">?</span>; + <span class="kw">let </span>meta = scratch.metadata(); + <span class="kw">let </span>header: Header = DX10 { + height: meta.height.try_into()<span class="question-mark">?</span>, + width: meta.width.try_into()<span class="question-mark">?</span>, + mip_count: meta.mip_levels.try_into()<span class="question-mark">?</span>, + format: meta.format.bits().try_into()<span class="question-mark">?</span>, + flags: meta.is_cubemap().into(), + tile_mode: <span class="number">8</span>, + } + .into(); + + <span class="kw">let </span>chunks = <span class="self">Self</span>::make_chunks(<span class="kw-2">&</span>scratch, options)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(<span class="self">Self </span>{ chunks, header }) + } + + <span class="attr">#[allow(unused)] + </span><span class="kw">fn </span>read_gnmf<In>(stream: <span class="kw-2">&mut </span>In, options: <span class="kw-2">&</span>ReadOptions) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>scratch = + ScratchImage::load_dds(stream.as_bytes(), DDS_FLAGS::DDS_FLAGS_NONE, <span class="prelude-val">None</span>, <span class="prelude-val">None</span>)<span class="question-mark">?</span>; + <span class="kw">let </span>metadata = scratch.metadata(); + <span class="kw">let </span>gnmf = { + <span class="kw">let </span><span class="kw-2">mut </span>gnmf: GNMF = metadata.try_into()<span class="question-mark">?</span>; + <span class="kw">let </span>len: usize = scratch.images().iter().map(|x| x.slice_pitch).sum(); + gnmf.metadata[<span class="number">7</span>] = len.try_into()<span class="question-mark">?</span>; + gnmf + }; + + <span class="kw">let </span><span class="kw-2">mut </span>chunks = <span class="self">Self</span>::make_chunks(<span class="kw-2">&</span>scratch, options)<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>scratch_buffer = Vec::new(); + <span class="kw">let </span><span class="kw-2">mut </span>width = metadata.width; + <span class="kw">let </span><span class="kw-2">mut </span>height = metadata.height; + <span class="kw">let </span>block_size = gnmf.block_size()<span class="question-mark">?</span>; + <span class="kw">for </span>chunk <span class="kw">in </span><span class="kw-2">&mut </span>chunks { + <span class="kw">let </span>mips = chunk.mips.as_ref().expect(<span class="string">"GNMF chunks should have mips"</span>); + <span class="kw">let </span><span class="kw-2">mut </span>unswizzled_bytes = Vec::new(); + <span class="kw">let </span><span class="kw-2">mut </span>offset = <span class="number">0</span>; + <span class="kw">for _ in </span>mips.clone() { + <span class="kw">let </span>pitch = + metadata + .format + .compute_pitch(width, height, CP_FLAGS::CP_FLAGS_NONE)<span class="question-mark">?</span>; + swizzle::ps4::swizzle( + <span class="kw-2">&</span>chunk.as_bytes()[offset..offset + pitch.slice], + <span class="kw-2">&mut </span>scratch_buffer, + width, + height, + block_size, + ); + unswizzled_bytes.extend_from_slice(<span class="kw-2">&</span>scratch_buffer); + offset += pitch.slice; + width = usize::max(<span class="number">1</span>, width / <span class="number">2</span>); + height = usize::max(<span class="number">1</span>, height / <span class="number">2</span>); + } + chunk.bytes = CompressableBytes::from_owned(unswizzled_bytes.into_boxed_slice(), <span class="prelude-val">None</span>); + } + + <span class="prelude-val">Ok</span>(<span class="self">Self </span>{ + chunks, + header: gnmf.into(), + }) + } + + <span class="attr">#[allow(clippy::unnecessary_wraps)] + </span><span class="kw">fn </span>read_gnrl<In>(stream: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>bytes = stream.read_bytes_to_end().into_compressable(<span class="prelude-val">None</span>); + <span class="kw">let </span>chunk = Chunk { bytes, mips: <span class="prelude-val">None </span>}; + <span class="prelude-val">Ok</span>([chunk].into_iter().collect()) + } + + <span class="kw">fn </span>write_dx10<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out, options: WriteOptions, dx10: DX10) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span>meta = TexMetadata { + width: dx10.width.into(), + height: dx10.height.into(), + depth: <span class="number">1</span>, + array_size: <span class="number">1</span>, + mip_levels: dx10.mip_count.into(), + misc_flags: <span class="kw">if </span>(dx10.flags & <span class="number">1</span>) == <span class="number">0 </span>{ + <span class="number">0 + </span>} <span class="kw">else </span>{ + TEX_MISC_TEXTURECUBE + }, + misc_flags2: <span class="number">0</span>, + format: u32::from(dx10.format).into(), + dimension: TEX_DIMENSION::TEX_DIMENSION_TEXTURE2D, + }; + + <span class="kw">let </span>header = meta.encode_dds_header(DDS_FLAGS::DDS_FLAGS_NONE)<span class="question-mark">?</span>; + stream.write_all(<span class="kw-2">&</span>header)<span class="question-mark">?</span>; + <span class="self">self</span>.write_gnrl(stream, options) + } + + <span class="attr">#[allow(unused)] + </span><span class="kw">fn </span>write_gnmf<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out, options: WriteOptions, gnmf: <span class="kw-2">&</span>GNMF) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span>metadata: TexMetadata = gnmf.try_into()<span class="question-mark">?</span>; + <span class="kw">let </span>header = metadata.encode_dds_header(DDS_FLAGS::DDS_FLAGS_NONE)<span class="question-mark">?</span>; + stream.write_all(<span class="kw-2">&</span>header)<span class="question-mark">?</span>; + + <span class="kw">let </span><span class="kw-2">mut </span>bytes_buffer = Vec::new(); + <span class="kw">let </span>options: ChunkCompressionOptions = options.into(); + <span class="kw">let </span><span class="kw-2">mut </span>unswizzled_bytes = Vec::new(); + <span class="kw">let </span><span class="kw-2">mut </span>width = metadata.width; + <span class="kw">let </span><span class="kw-2">mut </span>height = metadata.height; + <span class="kw">let </span>block_size = gnmf.block_size()<span class="question-mark">?</span>; + <span class="kw">for </span>chunk <span class="kw">in </span><span class="self">self </span>{ + <span class="kw">let </span><span class="kw-2">mut </span>offset = <span class="number">0</span>; + <span class="kw">let </span><span class="prelude-val">Some</span>(mips) = chunk.mips.as_ref() <span class="kw">else </span>{ + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::FormatMismatch); + }; + <span class="kw">let </span>swizzled_bytes = <span class="kw">if </span>chunk.is_compressed() { + bytes_buffer.clear(); + chunk.decompress_into(<span class="kw-2">&mut </span>bytes_buffer, <span class="kw-2">&</span>options)<span class="question-mark">?</span>; + <span class="kw-2">&</span>bytes_buffer + } <span class="kw">else </span>{ + chunk.as_bytes() + }; + <span class="kw">for _ in </span>mips.clone() { + <span class="kw">let </span>pitch = + metadata + .format + .compute_pitch(width, height, CP_FLAGS::CP_FLAGS_NONE)<span class="question-mark">?</span>; + swizzle::ps4::unswizzle( + <span class="kw-2">&</span>swizzled_bytes[offset..offset + pitch.slice], + <span class="kw-2">&mut </span>unswizzled_bytes, + width, + height, + block_size, + ); + stream.write_all(<span class="kw-2">&</span>unswizzled_bytes)<span class="question-mark">?</span>; + offset += pitch.slice; + width = usize::max(<span class="number">1</span>, width / <span class="number">2</span>); + height = usize::max(<span class="number">1</span>, height / <span class="number">2</span>); + } + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_gnrl<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out, options: WriteOptions) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>bytes_buffer = Vec::new(); + <span class="kw">let </span>options: ChunkCompressionOptions = options.into(); + + <span class="kw">for </span>chunk <span class="kw">in </span><span class="self">self </span>{ + <span class="kw">let </span>bytes = <span class="kw">if </span>chunk.is_compressed() { + bytes_buffer.clear(); + chunk.decompress_into(<span class="kw-2">&mut </span>bytes_buffer, <span class="kw-2">&</span>options)<span class="question-mark">?</span>; + <span class="kw-2">&</span>bytes_buffer + } <span class="kw">else </span>{ + chunk.as_bytes() + }; + stream.write_all(bytes)<span class="question-mark">?</span>; + } + + <span class="prelude-val">Ok</span>(()) + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Index<usize> <span class="kw">for </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Output = Chunk<<span class="lifetime">'bytes</span>>; + + <span class="kw">fn </span>index(<span class="kw-2">&</span><span class="self">self</span>, index: usize) -> <span class="kw-2">&</span><span class="self">Self</span>::Output { + <span class="kw-2">&</span><span class="self">self</span>.chunks[index] + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> IndexMut<usize> <span class="kw">for </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>index_mut(<span class="kw-2">&mut </span><span class="self">self</span>, index: usize) -> <span class="kw-2">&mut </span><span class="self">Self</span>::Output { + <span class="kw-2">&mut </span><span class="self">self</span>.chunks[index] + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> FromIterator<Chunk<<span class="lifetime">'bytes</span>>> <span class="kw">for </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>from_iter<T>(iter: T) -> <span class="self">Self + </span><span class="kw">where + </span>T: IntoIterator<Item = Chunk<<span class="lifetime">'bytes</span>>>, + { + <span class="kw">let </span>chunks: Vec<<span class="kw">_</span>> = iter.into_iter().collect(); + <span class="macro">assert!</span>(chunks.len() <= <span class="number">4</span>); + <span class="self">Self </span>{ + chunks, + header: Header::default(), + } + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> IntoIterator <span class="kw">for </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Item = <Container<<span class="lifetime">'bytes</span>> <span class="kw">as </span>IntoIterator>::Item; + <span class="kw">type </span>IntoIter = <Container<<span class="lifetime">'bytes</span>> <span class="kw">as </span>IntoIterator>::IntoIter; + + <span class="kw">fn </span>into_iter(<span class="self">self</span>) -> <span class="self">Self</span>::IntoIter { + <span class="self">self</span>.chunks.into_iter() + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>, <span class="lifetime">'this</span>> IntoIterator <span class="kw">for </span><span class="kw-2">&</span><span class="lifetime">'this </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Item = <<span class="kw-2">&</span><span class="lifetime">'this </span>Container<<span class="lifetime">'bytes</span>> <span class="kw">as </span>IntoIterator>::Item; + <span class="kw">type </span>IntoIter = <<span class="kw-2">&</span><span class="lifetime">'this </span>Container<<span class="lifetime">'bytes</span>> <span class="kw">as </span>IntoIterator>::IntoIter; + + <span class="kw">fn </span>into_iter(<span class="self">self</span>) -> <span class="self">Self</span>::IntoIter { + <span class="self">self</span>.chunks.iter() + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>, <span class="lifetime">'this</span>> IntoIterator <span class="kw">for </span><span class="kw-2">&</span><span class="lifetime">'this </span><span class="kw-2">mut </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Item = <<span class="kw-2">&</span><span class="lifetime">'this </span><span class="kw-2">mut </span>Container<<span class="lifetime">'bytes</span>> <span class="kw">as </span>IntoIterator>::Item; + <span class="kw">type </span>IntoIter = <<span class="kw-2">&</span><span class="lifetime">'this </span><span class="kw-2">mut </span>Container<<span class="lifetime">'bytes</span>> <span class="kw">as </span>IntoIterator>::IntoIter; + + <span class="kw">fn </span>into_iter(<span class="self">self</span>) -> <span class="self">Self</span>::IntoIter { + <span class="self">self</span>.chunks.iter_mut() + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">crate</span>::fo4::File; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() { + <span class="kw">let </span>f = File::default(); + <span class="macro">assert!</span>(f.is_empty()); + <span class="macro">assert!</span>(f.as_slice().is_empty()); + <span class="macro">assert!</span>(!f.is_full()); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/fo4/hashing.rs.html b/src/ba2/fo4/hashing.rs.html new file mode 100644 index 0000000..f286bf9 --- /dev/null +++ b/src/ba2/fo4/hashing.rs.html @@ -0,0 +1,793 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/fo4/hashing.rs`."><title>hashing.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +<a href="#285" id="285">285</a> +<a href="#286" id="286">286</a> +<a href="#287" id="287">287</a> +<a href="#288" id="288">288</a> +<a href="#289" id="289">289</a> +<a href="#290" id="290">290</a> +<a href="#291" id="291">291</a> +<a href="#292" id="292">292</a> +<a href="#293" id="293">293</a> +<a href="#294" id="294">294</a> +<a href="#295" id="295">295</a> +<a href="#296" id="296">296</a> +<a href="#297" id="297">297</a> +<a href="#298" id="298">298</a> +<a href="#299" id="299">299</a> +<a href="#300" id="300">300</a> +<a href="#301" id="301">301</a> +<a href="#302" id="302">302</a> +<a href="#303" id="303">303</a> +<a href="#304" id="304">304</a> +<a href="#305" id="305">305</a> +<a href="#306" id="306">306</a> +<a href="#307" id="307">307</a> +<a href="#308" id="308">308</a> +<a href="#309" id="309">309</a> +<a href="#310" id="310">310</a> +<a href="#311" id="311">311</a> +<a href="#312" id="312">312</a> +<a href="#313" id="313">313</a> +<a href="#314" id="314">314</a> +<a href="#315" id="315">315</a> +<a href="#316" id="316">316</a> +<a href="#317" id="317">317</a> +<a href="#318" id="318">318</a> +<a href="#319" id="319">319</a> +<a href="#320" id="320">320</a> +<a href="#321" id="321">321</a> +<a href="#322" id="322">322</a> +<a href="#323" id="323">323</a> +<a href="#324" id="324">324</a> +<a href="#325" id="325">325</a> +<a href="#326" id="326">326</a> +<a href="#327" id="327">327</a> +<a href="#328" id="328">328</a> +<a href="#329" id="329">329</a> +<a href="#330" id="330">330</a> +<a href="#331" id="331">331</a> +<a href="#332" id="332">332</a> +<a href="#333" id="333">333</a> +<a href="#334" id="334">334</a> +<a href="#335" id="335">335</a> +<a href="#336" id="336">336</a> +<a href="#337" id="337">337</a> +<a href="#338" id="338">338</a> +<a href="#339" id="339">339</a> +<a href="#340" id="340">340</a> +<a href="#341" id="341">341</a> +<a href="#342" id="342">342</a> +<a href="#343" id="343">343</a> +<a href="#344" id="344">344</a> +<a href="#345" id="345">345</a> +<a href="#346" id="346">346</a> +<a href="#347" id="347">347</a> +<a href="#348" id="348">348</a> +<a href="#349" id="349">349</a> +<a href="#350" id="350">350</a> +<a href="#351" id="351">351</a> +<a href="#352" id="352">352</a> +<a href="#353" id="353">353</a> +<a href="#354" id="354">354</a> +<a href="#355" id="355">355</a> +<a href="#356" id="356">356</a> +<a href="#357" id="357">357</a> +<a href="#358" id="358">358</a> +<a href="#359" id="359">359</a> +<a href="#360" id="360">360</a> +<a href="#361" id="361">361</a> +<a href="#362" id="362">362</a> +<a href="#363" id="363">363</a> +<a href="#364" id="364">364</a> +<a href="#365" id="365">365</a> +<a href="#366" id="366">366</a> +<a href="#367" id="367">367</a> +<a href="#368" id="368">368</a> +<a href="#369" id="369">369</a> +<a href="#370" id="370">370</a> +<a href="#371" id="371">371</a> +<a href="#372" id="372">372</a> +<a href="#373" id="373">373</a> +<a href="#374" id="374">374</a> +<a href="#375" id="375">375</a> +<a href="#376" id="376">376</a> +<a href="#377" id="377">377</a> +<a href="#378" id="378">378</a> +<a href="#379" id="379">379</a> +<a href="#380" id="380">380</a> +<a href="#381" id="381">381</a> +<a href="#382" id="382">382</a> +<a href="#383" id="383">383</a> +<a href="#384" id="384">384</a> +<a href="#385" id="385">385</a> +<a href="#386" id="386">386</a> +<a href="#387" id="387">387</a> +<a href="#388" id="388">388</a> +<a href="#389" id="389">389</a> +<a href="#390" id="390">390</a> +<a href="#391" id="391">391</a> +<a href="#392" id="392">392</a> +<a href="#393" id="393">393</a> +<a href="#394" id="394">394</a> +<a href="#395" id="395">395</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{derive, hashing}; +<span class="kw">use </span>bstr::{BStr, BString, ByteSlice <span class="kw">as _</span>}; + +<span class="comment">// archives aren't sorted in any particular order, so we can just default these +</span><span class="doccomment">/// The underlying hash object used to uniquely identify objects within the archive. +</span><span class="attr">#[derive(Clone, Copy, Debug, Default, Eq, Ord, PartialEq, PartialOrd)] +#[repr(C)] +</span><span class="kw">pub struct </span>Hash { + <span class="doccomment">/// The file's stem crc. + </span><span class="kw">pub </span>file: u32, + <span class="doccomment">/// The first 4 bytes of the file's extension. + </span><span class="kw">pub </span>extension: u32, + <span class="doccomment">/// The file's parent path crc. + </span><span class="kw">pub </span>directory: u32, +} + +<span class="macro">derive::hash!</span>(FileHash); + +<span class="kw">impl </span>Hash { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } +} + +<span class="attr">#[allow(clippy::unreadable_literal)] +#[must_use] +</span><span class="kw">fn </span>crc32(bytes: <span class="kw-2">&</span>[u8]) -> u32 { + <span class="kw">const </span>LUT: [u32; <span class="number">256</span>] = [ + <span class="number">0x00000000</span>, <span class="number">0x77073096</span>, <span class="number">0xEE0E612C</span>, <span class="number">0x990951BA</span>, <span class="number">0x076DC419</span>, <span class="number">0x706AF48F</span>, <span class="number">0xE963A535</span>, + <span class="number">0x9E6495A3</span>, <span class="number">0x0EDB8832</span>, <span class="number">0x79DCB8A4</span>, <span class="number">0xE0D5E91E</span>, <span class="number">0x97D2D988</span>, <span class="number">0x09B64C2B</span>, <span class="number">0x7EB17CBD</span>, + <span class="number">0xE7B82D07</span>, <span class="number">0x90BF1D91</span>, <span class="number">0x1DB71064</span>, <span class="number">0x6AB020F2</span>, <span class="number">0xF3B97148</span>, <span class="number">0x84BE41DE</span>, <span class="number">0x1ADAD47D</span>, + <span class="number">0x6DDDE4EB</span>, <span class="number">0xF4D4B551</span>, <span class="number">0x83D385C7</span>, <span class="number">0x136C9856</span>, <span class="number">0x646BA8C0</span>, <span class="number">0xFD62F97A</span>, <span class="number">0x8A65C9EC</span>, + <span class="number">0x14015C4F</span>, <span class="number">0x63066CD9</span>, <span class="number">0xFA0F3D63</span>, <span class="number">0x8D080DF5</span>, <span class="number">0x3B6E20C8</span>, <span class="number">0x4C69105E</span>, <span class="number">0xD56041E4</span>, + <span class="number">0xA2677172</span>, <span class="number">0x3C03E4D1</span>, <span class="number">0x4B04D447</span>, <span class="number">0xD20D85FD</span>, <span class="number">0xA50AB56B</span>, <span class="number">0x35B5A8FA</span>, <span class="number">0x42B2986C</span>, + <span class="number">0xDBBBC9D6</span>, <span class="number">0xACBCF940</span>, <span class="number">0x32D86CE3</span>, <span class="number">0x45DF5C75</span>, <span class="number">0xDCD60DCF</span>, <span class="number">0xABD13D59</span>, <span class="number">0x26D930AC</span>, + <span class="number">0x51DE003A</span>, <span class="number">0xC8D75180</span>, <span class="number">0xBFD06116</span>, <span class="number">0x21B4F4B5</span>, <span class="number">0x56B3C423</span>, <span class="number">0xCFBA9599</span>, <span class="number">0xB8BDA50F</span>, + <span class="number">0x2802B89E</span>, <span class="number">0x5F058808</span>, <span class="number">0xC60CD9B2</span>, <span class="number">0xB10BE924</span>, <span class="number">0x2F6F7C87</span>, <span class="number">0x58684C11</span>, <span class="number">0xC1611DAB</span>, + <span class="number">0xB6662D3D</span>, <span class="number">0x76DC4190</span>, <span class="number">0x01DB7106</span>, <span class="number">0x98D220BC</span>, <span class="number">0xEFD5102A</span>, <span class="number">0x71B18589</span>, <span class="number">0x06B6B51F</span>, + <span class="number">0x9FBFE4A5</span>, <span class="number">0xE8B8D433</span>, <span class="number">0x7807C9A2</span>, <span class="number">0x0F00F934</span>, <span class="number">0x9609A88E</span>, <span class="number">0xE10E9818</span>, <span class="number">0x7F6A0DBB</span>, + <span class="number">0x086D3D2D</span>, <span class="number">0x91646C97</span>, <span class="number">0xE6635C01</span>, <span class="number">0x6B6B51F4</span>, <span class="number">0x1C6C6162</span>, <span class="number">0x856530D8</span>, <span class="number">0xF262004E</span>, + <span class="number">0x6C0695ED</span>, <span class="number">0x1B01A57B</span>, <span class="number">0x8208F4C1</span>, <span class="number">0xF50FC457</span>, <span class="number">0x65B0D9C6</span>, <span class="number">0x12B7E950</span>, <span class="number">0x8BBEB8EA</span>, + <span class="number">0xFCB9887C</span>, <span class="number">0x62DD1DDF</span>, <span class="number">0x15DA2D49</span>, <span class="number">0x8CD37CF3</span>, <span class="number">0xFBD44C65</span>, <span class="number">0x4DB26158</span>, <span class="number">0x3AB551CE</span>, + <span class="number">0xA3BC0074</span>, <span class="number">0xD4BB30E2</span>, <span class="number">0x4ADFA541</span>, <span class="number">0x3DD895D7</span>, <span class="number">0xA4D1C46D</span>, <span class="number">0xD3D6F4FB</span>, <span class="number">0x4369E96A</span>, + <span class="number">0x346ED9FC</span>, <span class="number">0xAD678846</span>, <span class="number">0xDA60B8D0</span>, <span class="number">0x44042D73</span>, <span class="number">0x33031DE5</span>, <span class="number">0xAA0A4C5F</span>, <span class="number">0xDD0D7CC9</span>, + <span class="number">0x5005713C</span>, <span class="number">0x270241AA</span>, <span class="number">0xBE0B1010</span>, <span class="number">0xC90C2086</span>, <span class="number">0x5768B525</span>, <span class="number">0x206F85B3</span>, <span class="number">0xB966D409</span>, + <span class="number">0xCE61E49F</span>, <span class="number">0x5EDEF90E</span>, <span class="number">0x29D9C998</span>, <span class="number">0xB0D09822</span>, <span class="number">0xC7D7A8B4</span>, <span class="number">0x59B33D17</span>, <span class="number">0x2EB40D81</span>, + <span class="number">0xB7BD5C3B</span>, <span class="number">0xC0BA6CAD</span>, <span class="number">0xEDB88320</span>, <span class="number">0x9ABFB3B6</span>, <span class="number">0x03B6E20C</span>, <span class="number">0x74B1D29A</span>, <span class="number">0xEAD54739</span>, + <span class="number">0x9DD277AF</span>, <span class="number">0x04DB2615</span>, <span class="number">0x73DC1683</span>, <span class="number">0xE3630B12</span>, <span class="number">0x94643B84</span>, <span class="number">0x0D6D6A3E</span>, <span class="number">0x7A6A5AA8</span>, + <span class="number">0xE40ECF0B</span>, <span class="number">0x9309FF9D</span>, <span class="number">0x0A00AE27</span>, <span class="number">0x7D079EB1</span>, <span class="number">0xF00F9344</span>, <span class="number">0x8708A3D2</span>, <span class="number">0x1E01F268</span>, + <span class="number">0x6906C2FE</span>, <span class="number">0xF762575D</span>, <span class="number">0x806567CB</span>, <span class="number">0x196C3671</span>, <span class="number">0x6E6B06E7</span>, <span class="number">0xFED41B76</span>, <span class="number">0x89D32BE0</span>, + <span class="number">0x10DA7A5A</span>, <span class="number">0x67DD4ACC</span>, <span class="number">0xF9B9DF6F</span>, <span class="number">0x8EBEEFF9</span>, <span class="number">0x17B7BE43</span>, <span class="number">0x60B08ED5</span>, <span class="number">0xD6D6A3E8</span>, + <span class="number">0xA1D1937E</span>, <span class="number">0x38D8C2C4</span>, <span class="number">0x4FDFF252</span>, <span class="number">0xD1BB67F1</span>, <span class="number">0xA6BC5767</span>, <span class="number">0x3FB506DD</span>, <span class="number">0x48B2364B</span>, + <span class="number">0xD80D2BDA</span>, <span class="number">0xAF0A1B4C</span>, <span class="number">0x36034AF6</span>, <span class="number">0x41047A60</span>, <span class="number">0xDF60EFC3</span>, <span class="number">0xA867DF55</span>, <span class="number">0x316E8EEF</span>, + <span class="number">0x4669BE79</span>, <span class="number">0xCB61B38C</span>, <span class="number">0xBC66831A</span>, <span class="number">0x256FD2A0</span>, <span class="number">0x5268E236</span>, <span class="number">0xCC0C7795</span>, <span class="number">0xBB0B4703</span>, + <span class="number">0x220216B9</span>, <span class="number">0x5505262F</span>, <span class="number">0xC5BA3BBE</span>, <span class="number">0xB2BD0B28</span>, <span class="number">0x2BB45A92</span>, <span class="number">0x5CB36A04</span>, <span class="number">0xC2D7FFA7</span>, + <span class="number">0xB5D0CF31</span>, <span class="number">0x2CD99E8B</span>, <span class="number">0x5BDEAE1D</span>, <span class="number">0x9B64C2B0</span>, <span class="number">0xEC63F226</span>, <span class="number">0x756AA39C</span>, <span class="number">0x026D930A</span>, + <span class="number">0x9C0906A9</span>, <span class="number">0xEB0E363F</span>, <span class="number">0x72076785</span>, <span class="number">0x05005713</span>, <span class="number">0x95BF4A82</span>, <span class="number">0xE2B87A14</span>, <span class="number">0x7BB12BAE</span>, + <span class="number">0x0CB61B38</span>, <span class="number">0x92D28E9B</span>, <span class="number">0xE5D5BE0D</span>, <span class="number">0x7CDCEFB7</span>, <span class="number">0x0BDBDF21</span>, <span class="number">0x86D3D2D4</span>, <span class="number">0xF1D4E242</span>, + <span class="number">0x68DDB3F8</span>, <span class="number">0x1FDA836E</span>, <span class="number">0x81BE16CD</span>, <span class="number">0xF6B9265B</span>, <span class="number">0x6FB077E1</span>, <span class="number">0x18B74777</span>, <span class="number">0x88085AE6</span>, + <span class="number">0xFF0F6A70</span>, <span class="number">0x66063BCA</span>, <span class="number">0x11010B5C</span>, <span class="number">0x8F659EFF</span>, <span class="number">0xF862AE69</span>, <span class="number">0x616BFFD3</span>, <span class="number">0x166CCF45</span>, + <span class="number">0xA00AE278</span>, <span class="number">0xD70DD2EE</span>, <span class="number">0x4E048354</span>, <span class="number">0x3903B3C2</span>, <span class="number">0xA7672661</span>, <span class="number">0xD06016F7</span>, <span class="number">0x4969474D</span>, + <span class="number">0x3E6E77DB</span>, <span class="number">0xAED16A4A</span>, <span class="number">0xD9D65ADC</span>, <span class="number">0x40DF0B66</span>, <span class="number">0x37D83BF0</span>, <span class="number">0xA9BCAE53</span>, <span class="number">0xDEBB9EC5</span>, + <span class="number">0x47B2CF7F</span>, <span class="number">0x30B5FFE9</span>, <span class="number">0xBDBDF21C</span>, <span class="number">0xCABAC28A</span>, <span class="number">0x53B39330</span>, <span class="number">0x24B4A3A6</span>, <span class="number">0xBAD03605</span>, + <span class="number">0xCDD70693</span>, <span class="number">0x54DE5729</span>, <span class="number">0x23D967BF</span>, <span class="number">0xB3667A2E</span>, <span class="number">0xC4614AB8</span>, <span class="number">0x5D681B02</span>, <span class="number">0x2A6F2B94</span>, + <span class="number">0xB40BBE37</span>, <span class="number">0xC30C8EA1</span>, <span class="number">0x5A05DF1B</span>, <span class="number">0x2D02EF8D</span>, + ]; + + <span class="kw">let </span><span class="kw-2">mut </span>crc: u32 = <span class="number">0</span>; + <span class="kw">for </span><span class="kw-2">&</span>b <span class="kw">in </span>bytes { + crc = crc.wrapping_shr(<span class="number">8</span>) ^ LUT[((crc ^ u32::from(b)) & <span class="number">0xFF</span>) <span class="kw">as </span>usize]; + } + crc +} + +<span class="kw">struct </span>Split<<span class="lifetime">'string</span>> { + parent: <span class="kw-2">&</span><span class="lifetime">'string </span>BStr, + stem: <span class="kw-2">&</span><span class="lifetime">'string </span>BStr, + extension: <span class="kw-2">&</span><span class="lifetime">'string </span>BStr, +} + +<span class="attr">#[must_use] +</span><span class="kw">fn </span>split_path(path: <span class="kw-2">&</span>BStr) -> Split<<span class="lifetime">'_</span>> { + <span class="kw">let </span>stem_pos = path.iter().rposition(|<span class="kw-2">&</span>x| x == <span class="string">b'\\'</span>); + <span class="kw">let </span>parent = stem_pos.map(|pos| <span class="kw-2">&</span>path[<span class="number">0</span>..pos]).unwrap_or_default(); + + <span class="kw">let </span>extension_pos = path.iter().rposition(|<span class="kw-2">&</span>x| x == <span class="string">b'.'</span>); + <span class="kw">let </span>extension = extension_pos + .and_then(|pos| path.get(pos + <span class="number">1</span>..)) <span class="comment">// don't include '.' + </span>.unwrap_or_default() + .as_bstr(); + + <span class="kw">let </span>first = stem_pos.map_or(<span class="number">0</span>, |x| x + <span class="number">1</span>); + <span class="kw">let </span>last = extension_pos.unwrap_or(path.len()); + <span class="kw">let </span>stem = path.get(first..last).unwrap_or_default().as_bstr(); + + Split { + parent, + stem, + extension, + } +} + +<span class="doccomment">/// Produces a hash using the given path. +</span><span class="attr">#[must_use] +</span><span class="kw">pub fn </span>hash_file(path: <span class="kw-2">&</span>BStr) -> (FileHash, BString) { + <span class="kw">let </span><span class="kw-2">mut </span>path = path.to_owned(); + (hash_file_in_place(<span class="kw-2">&mut </span>path), path) +} + +<span class="doccomment">/// Produces a hash using the given path. +/// +/// The path is normalized in place. After the function returns, the path contains the string that would be stored on disk. +</span><span class="attr">#[must_use] +</span><span class="kw">pub fn </span>hash_file_in_place(path: <span class="kw-2">&mut </span>BString) -> FileHash { + hashing::normalize_path(path); + <span class="kw">let </span>pieces = split_path(path.as_ref()); + + <span class="kw">let </span><span class="kw-2">mut </span>h = Hash { + file: crc32(pieces.stem), + extension: <span class="number">0</span>, + directory: crc32(pieces.parent), + }; + + <span class="comment">// truncation is impossible here + </span><span class="attr">#[allow(clippy::cast_possible_truncation)] + </span><span class="kw">let </span>len = { usize::min(pieces.extension.len(), <span class="number">4</span>) <span class="kw">as </span>u32 }; + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..len { + h.extension |= u32::from(pieces.extension[i <span class="kw">as </span>usize]) << (i * <span class="number">8</span>); + } + + h.into() +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">crate</span>::fo4::{<span class="self">self</span>, Hash}; + <span class="kw">use </span>bstr::ByteSlice <span class="kw">as _</span>; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() { + <span class="kw">let </span>h = Hash::default(); + <span class="macro">assert_eq!</span>(h.file, <span class="number">0</span>); + <span class="macro">assert_eq!</span>(h.extension, <span class="number">0</span>); + <span class="macro">assert_eq!</span>(h.directory, <span class="number">0</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>validate_hashes() { + <span class="kw">let </span>l = |path: <span class="kw-2">&</span>[u8]| fo4::hash_file(path.as_bstr()).<span class="number">0</span>; + <span class="kw">let </span>r = |file: u32, extension: u32, directory: u32| Hash { + file, + extension, + directory, + }; + + <span class="macro">assert_eq!</span>( + l(<span class="string">b"Sound\\Voice\\Fallout4.esm\\RobotMrHandy\\Mar\xEDa_M.fuz"</span>), + r(<span class="number">0xC9FB26F9</span>, <span class="number">0x007A7566</span>, <span class="number">0x8A9C014E</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Strings\ccBGSFO4001-PipBoy(Black)_en.DLSTRINGS"</span>), + r(<span class="number">0x1985075C</span>, <span class="number">0x74736C64</span>, <span class="number">0x29F6B58B</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\CreationClub\BGSFO4001\AnimObjects\PipBoy\PipBoy02(Black)_d.DDS"</span>), + r(<span class="number">0x69E1E82C</span>, <span class="number">0x00736464</span>, <span class="number">0x23157A84</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Materials\CreationClub\BGSFO4003\AnimObjects\PipBoy\PipBoyLabels01(Camo01).BGSM"</span>), + r(<span class="number">0x0785843B</span>, <span class="number">0x6D736762</span>, <span class="number">0x818374CC</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\CreationClub\BGSFO4003\AnimObjects\PipBoy\PipBoy02(Camo01)_d.DDS"</span>), + r(<span class="number">0xF2D2F9A7</span>, <span class="number">0x00736464</span>, <span class="number">0xE9DB0C08</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Strings\ccBGSFO4004-PipBoy(Camo02)_esmx.DLSTRINGS"</span>), + r(<span class="number">0xC26B77C1</span>, <span class="number">0x74736C64</span>, <span class="number">0x29F6B58B</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\CreationClub\BGSFO4004\AnimObjects\PipBoy\PipBoyLabels01(Camo02)_d.DDS"</span>), + r(<span class="number">0xB32EE4B0</span>, <span class="number">0x00736464</span>, <span class="number">0x089FAA9B</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Strings\ccBGSFO4006-PipBoy(Chrome)_es.STRINGS"</span>), + r(<span class="number">0xA94A4503</span>, <span class="number">0x69727473</span>, <span class="number">0x29F6B58B</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\CreationClub\BGSFO4006\AnimObjects\PipBoy\PipBoy01(Chrome)_s.DDS"</span>), + r(<span class="number">0xE2D67EE2</span>, <span class="number">0x00736464</span>, <span class="number">0xC251DC17</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\CreationClub\BGSFO4016\Clothes\Prey\MorganSpaceSuit_M_First.nif"</span>), + r(<span class="number">0x212E5DAD</span>, <span class="number">0x0066696E</span>, <span class="number">0x741DAAC0</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\CreationClub\BGSFO4016\Clothes\Prey\Morgan_Male_Body_s.DDS"</span>), + r(<span class="number">0x9C672F34</span>, <span class="number">0x00736464</span>, <span class="number">0x1D5F0EDF</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Strings\ccBGSFO4018-GaussRiflePrototype_ru.STRINGS"</span>), + r(<span class="number">0x5198717F</span>, <span class="number">0x69727473</span>, <span class="number">0x29F6B58B</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\CreationClub\BGSFO4018\Weapons\GaussRiflePrototype\Barrel02_s.DDS"</span>), + r(<span class="number">0x2C98BAA2</span>, <span class="number">0x00736464</span>, <span class="number">0x8D59E9EA</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Strings\ccBGSFO4019-ChineseStealthArmor_esmx.DLSTRINGS"</span>), + r(<span class="number">0xDDF2A35F</span>, <span class="number">0x74736C64</span>, <span class="number">0x29F6B58B</span>) + ); + <span class="macro">assert_eq!</span>(l(<span class="string">br"Textures\CreationClub\BGSFO4019\Armor\ChineseStealthArmor\ChineseStealthArmor01_d.DDS"</span>), r(<span class="number">0x03C2AA10</span>, <span class="number">0x00736464</span>, <span class="number">0x71ED2818</span>)); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Materials\CreationClub\BGSFO4020\Actors\PowerArmor\T45helmet01(Black).BGSM"</span>), + r(<span class="number">0xF56D31C0</span>, <span class="number">0x6D736762</span>, <span class="number">0x28A143A5</span>) + ); + <span class="macro">assert_eq!</span>(l(<span class="string">br"Textures\CreationClub\BGSFO4020\Actors\PowerArmor\T51\Black\T51Helmet01(Black)_d.DDS"</span>), r(<span class="number">0x3192919D</span>, <span class="number">0x00736464</span>, <span class="number">0xA56D1E61</span>)); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Materials\CreationClub\BGSFO4038\Actors\PowerArmor\HorsePAHelmet.BGSM"</span>), + r(<span class="number">0xE90B72CC</span>, <span class="number">0x6D736762</span>, <span class="number">0x44676566</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\CreationClub\BGSFO4038\Actors\PowerArmor\HorsePATorso_teal_d.DDS"</span>), + r(<span class="number">0x0A6251B3</span>, <span class="number">0x00736464</span>, <span class="number">0xC1AC59B4</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Strings\ccBGSFO4044-HellfirePowerArmor_en.DLSTRINGS"</span>), + r(<span class="number">0x3E5C1E5E</span>, <span class="number">0x74736C64</span>, <span class="number">0x29F6B58B</span>) + ); + <span class="macro">assert_eq!</span>(l(<span class="string">br"Textures\CreationClub\BGSFO4044\Actors\PowerArmor\HellfirePAHelmet_Institute_d.DDS"</span>), r(<span class="number">0x0F221EAF</span>, <span class="number">0x00736464</span>, <span class="number">0xC021EF40</span>)); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\Weapons\HandmadeShotgun\HandmadeShotgun_GlowSights.nif"</span>), + r(<span class="number">0x4E080CE2</span>, <span class="number">0x0066696E</span>, <span class="number">0xCCD47ECF</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Weapons\HandmadeShotgun\HandmadeShotgun_Barrels_GhoulSlayer_d.DDS"</span>), + r(<span class="number">0xBBFC484C</span>, <span class="number">0x00736464</span>, <span class="number">0xCEAE4154</span>) + ); + <span class="macro">assert_eq!</span>(l(<span class="string">br"Materials\CreationClub\FSVFO4001\Clothes\MilitaryBackpack\BackpackPatch_NCR02.bgsm"</span>), r(<span class="number">0x90EB78B9</span>, <span class="number">0x6D736762</span>, <span class="number">0xDA685DF4</span>)); + <span class="macro">assert_eq!</span>(l(<span class="string">br"Textures\CreationClub\FSVFO4001\Clothes\MilitaryBackpack\Button_SunsetSars_d.DDS"</span>), r(<span class="number">0xC25F8604</span>, <span class="number">0x00736464</span>, <span class="number">0xD1CE178D</span>)); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Materials\CreationClub\FSVFO4002\Furniture\MidCenturyModern01\BedSpread01.bgsm"</span>), + r(<span class="number">0xA5AAE799</span>, <span class="number">0x6D736762</span>, <span class="number">0xBECD0DEF</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\CreationClub\FSVFO4002\Furniture\MidCenturyModern01\Bed01_n.DDS"</span>), + r(<span class="number">0x6A09686A</span>, <span class="number">0x00736464</span>, <span class="number">0xBA782808</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Sound\FX\DLC03\NPC\Gulper\NPC_Gulper_Foot_Walk_02.xwm"</span>), + r(<span class="number">0xFE001981</span>, <span class="number">0x006D7778</span>, <span class="number">0xE7FBD6C4</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Terrain\DLC03FarHarbor\DLC03FarHarbor.4.-69.41.DDS"</span>), + r(<span class="number">0x36BACD03</span>, <span class="number">0x00736464</span>, <span class="number">0x8184624D</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Sound\Voice\DLCCoast.esm\PlayerVoiceFemale01\00043FFC_1.fuz"</span>), + r(<span class="number">0x339EFB3F</span>, <span class="number">0x007A7566</span>, <span class="number">0x3A5289D4</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\PreCombined\DLCNukaWorld.esm\0000F616_17EAC297_OC.NIF"</span>), + r(<span class="number">0xD4AD97F7</span>, <span class="number">0x0066696E</span>, <span class="number">0x0787B7E9</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Terrain\NukaWorld\NukaWorld.4.-28.28_msn.DDS"</span>), + r(<span class="number">0x86C13103</span>, <span class="number">0x00736464</span>, <span class="number">0x26C08933</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Sound\Voice\DLCNukaWorld.esm\DLC04NPCMJohnCalebBradberton\00044D5E_1.fuz"</span>), + r(<span class="number">0x896E4419</span>, <span class="number">0x007A7566</span>, <span class="number">0xD6575CD6</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\SCOL\DLCRobot.esm\CM00007BD8.NIF"</span>), + r(<span class="number">0x103559EF</span>, <span class="number">0x0066696E</span>, <span class="number">0xF584B7C4</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\DLC01\SetDressing\Rubble\Robottrashpilesnorust_s.DDS"</span>), + r(<span class="number">0xC7AF7106</span>, <span class="number">0x00736464</span>, <span class="number">0x5FD1A1B0</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Sound\Voice\DLCRobot.esm\DLC01RobotCompanionFemaleProcessed\00001460_1.fuz"</span>), + r(<span class="number">0x6D3D7DC7</span>, <span class="number">0x007A7566</span>, <span class="number">0xB2B47CAD</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Materials\DLC02\SetDressing\Workshop\NeonSignage\NeonLetterKit01-Orange-5.BGEM"</span>), + r(<span class="number">0x21D59551</span>, <span class="number">0x6D656762</span>, <span class="number">0x926F0C27</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\DLC02\SetDressing\Workshop\Traps\DLC02_SpringTrap01_s.DDS"</span>), + r(<span class="number">0x02BE99A4</span>, <span class="number">0x00736464</span>, <span class="number">0xF03CA2DF</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Sound\FX\DLC05\PHY\BallTrack\PHY_Metal_BallTrack_SteelBall_Wood_H_03.xwm"</span>), + r(<span class="number">0x33AABE0C</span>, <span class="number">0x006D7778</span>, <span class="number">0x07AA294C</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\DLC05\Effects\PaintBalls\ImpactDecalPaintSplatters01Red_d.DDS"</span>), + r(<span class="number">0x6327DF24</span>, <span class="number">0x00736464</span>, <span class="number">0xFB5FB431</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\SCOL\DLCworkshop03.esm\CM00001091.NIF"</span>), + r(<span class="number">0x2CAF6750</span>, <span class="number">0x0066696E</span>, <span class="number">0xABA83647</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\DLC06\Interiors\Vault\DLC06VltSignWelcome88_01_d.DDS"</span>), + r(<span class="number">0x825BD732</span>, <span class="number">0x00736464</span>, <span class="number">0xAE76DDEF</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Sound\Voice\DLCworkshop03.esm\FemaleEvenToned\00005232_1.fuz"</span>), + r(<span class="number">0x4DB6EE2D</span>, <span class="number">0x007A7566</span>, <span class="number">0xDA9F7ABC</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\AnimTextData\DynamicIdleData\5693375383928345500.txt"</span>), + r(<span class="number">0x997FC17A</span>, <span class="number">0x00747874</span>, <span class="number">0xFD345C50</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Interface\Pipboy_StatsPage.swf"</span>), + r(<span class="number">0x2F26E4D0</span>, <span class="number">0x00667773</span>, <span class="number">0xD2FDF873</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Materials\Landscape\Grass\BeachGrass01.BGSM"</span>), + r(<span class="number">0xB023CE22</span>, <span class="number">0x6D736762</span>, <span class="number">0x941D851F</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\Actors\Character\FaceGenData\FaceGeom\Fallout4.esm\000B3EC7.NIF"</span>), + r(<span class="number">0x90C91640</span>, <span class="number">0x0066696E</span>, <span class="number">0x067FA81E</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\PreCombined\0000E069_7831AAC9_OC.NIF"</span>), + r(<span class="number">0x5F0B19DF</span>, <span class="number">0x0066696E</span>, <span class="number">0xE659D075</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"scripts\MinRadiantOwnedBuildResourceScript.pex"</span>), + r(<span class="number">0xA2DAD4FD</span>, <span class="number">0x00786570</span>, <span class="number">0x40724840</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Meshes\debris\roundrock2_dirt.nif"</span>), + r(<span class="number">0x1E47A158</span>, <span class="number">0x0066696E</span>, <span class="number">0xF55EC6BA</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"ShadersFX\Shaders011.fxp"</span>), + r(<span class="number">0x883415D8</span>, <span class="number">0x00707866</span>, <span class="number">0xDFAE3D0F</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Sound\FX\FX\Bullet\Impact\xxx\FX_Bullet_Impact_Dirt_04.xwm"</span>), + r(<span class="number">0xFFAD9A14</span>, <span class="number">0x006D7778</span>, <span class="number">0xCBA20EB7</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Effects\ColorBlackZeroAlphaUtility.DDS"</span>), + r(<span class="number">0xF912F225</span>, <span class="number">0x00736464</span>, <span class="number">0xEA3C9738</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\interiors\Building\BldWindow01_s.DDS"</span>), + r(<span class="number">0x6ECA4F0C</span>, <span class="number">0x00736464</span>, <span class="number">0x5A3A7C7A</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Terrain\Commonwealth\Commonwealth.4.-8.12_msn.DDS"</span>), + r(<span class="number">0x55E37BD8</span>, <span class="number">0x00736464</span>, <span class="number">0x4409E1A9</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Clothes\Nat\Nats_Outfit_s.DDS"</span>), + r(<span class="number">0x692FFE7D</span>, <span class="number">0x00736464</span>, <span class="number">0x3F5BEDF1</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Interface\Newspaper\Newspaper_s.DDS"</span>), + r(<span class="number">0xFAC17C6C</span>, <span class="number">0x00736464</span>, <span class="number">0x58B9C5A4</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Actors\Character\FaceCustomization\Fallout4.esm\00110043_s.DDS"</span>), + r(<span class="number">0x09A155E6</span>, <span class="number">0x00736464</span>, <span class="number">0x9C7DFA7A</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Terrain\Commonwealth\Commonwealth.4.-48.-60.DDS"</span>), + r(<span class="number">0x182C2446</span>, <span class="number">0x00736464</span>, <span class="number">0x4409E1A9</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Terrain\Commonwealth\Commonwealth.4.-80.8_msn.DDS"</span>), + r(<span class="number">0xDA3234A4</span>, <span class="number">0x00736464</span>, <span class="number">0x4409E1A9</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Terrain\SanctuaryHillsWorld\SanctuaryHillsWorld.4.-36.40.DDS"</span>), + r(<span class="number">0xDD27070A</span>, <span class="number">0x00736464</span>, <span class="number">0x49AAA5E1</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Textures\Terrain\SanctuaryHillsWorld\SanctuaryHillsWorld.4.76.-24.DDS"</span>), + r(<span class="number">0x71560B31</span>, <span class="number">0x00736464</span>, <span class="number">0x49AAA5E1</span>) + ); + <span class="macro">assert_eq!</span>( + l(<span class="string">br"Sound\Voice\Fallout4.esm\NPCMTravisMiles\000A6032_1.fuz"</span>), + r(<span class="number">0x34402DE0</span>, <span class="number">0x007A7566</span>, <span class="number">0xF186D761</span>) + ); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/fo4/mod.rs.html b/src/ba2/fo4/mod.rs.html new file mode 100644 index 0000000..e182637 --- /dev/null +++ b/src/ba2/fo4/mod.rs.html @@ -0,0 +1,401 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/fo4/mod.rs`."><title>mod.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +</pre></div><pre class="rust"><code><span class="attr">#![doc(alias = <span class="string">"fallout 4"</span>)] +#![doc(alias = <span class="string">"starfield"</span>)] + +</span><span class="doccomment">//! Fallout 4 +//! +//! *"Good morning! Vault-Tec calling! ... You can't begin to know how happy I am to finally speak with you. I've been trying for days. It's a matter of utmost urgency, I assure you."* +//! +//! This format is the latest iteration, having debuted with Fallout 4. It primarily uses zlib for compression, but Starfield has introduced lz4 into the mix. Unlike previous formats, texture files are now split into chunks to enable streaming mips at a more granular level. +//! +//! # Reading +//! ```rust +//! use ba2::{ +//! fo4::{Archive, ArchiveKey, FileWriteOptions}, +//! prelude::*, +//! }; +//! use std::{fs, path::Path}; +//! +//! fn example() -> Option<()> { +//! let path = Path::new(r"path/to/fallout4/Data/Fallout4 - Interface.ba2"); +//! let (archive, meta) = Archive::read(path).ok()?; +//! let key: ArchiveKey = b"Interface/HUDMenu.swf".into(); +//! let file = archive.get(&key)?; +//! let mut dst = fs::File::create("HUDMenu.swf").ok()?; +//! let options: FileWriteOptions = meta.into(); +//! file.write(&mut dst, &options).ok()?; +//! Some(()) +//! } +//! ``` +//! +//! # Writing +//! ```rust +//! use ba2::{ +//! fo4::{Archive, ArchiveKey, ArchiveOptions, Chunk, File}, +//! prelude::*, +//! }; +//! use std::fs; +//! +//! fn example() -> Option<()> { +//! let chunk = Chunk::from_decompressed(b"Hello world!\n"); +//! let file: File = [chunk].into_iter().collect(); +//! let key: ArchiveKey = b"hello.txt".into(); +//! let archive: Archive = [(key, file)].into_iter().collect(); +//! let mut dst = fs::File::create("example.ba2").ok()?; +//! let options = ArchiveOptions::default(); +//! archive.write(&mut dst, &options).ok()?; +//! Some(()) +//! } +//! ``` + +</span><span class="kw">mod </span>archive; +<span class="kw">mod </span>chunk; +<span class="kw">mod </span>file; +<span class="kw">mod </span>hashing; + +<span class="kw">pub use </span><span class="self">self</span>::{ + archive::{ + Archive, Key <span class="kw">as </span>ArchiveKey, Options <span class="kw">as </span>ArchiveOptions, + OptionsBuilder <span class="kw">as </span>ArchiveOptionsBuilder, + }, + chunk::{ + Chunk, CompressionOptions <span class="kw">as </span>ChunkCompressionOptions, + CompressionOptionsBuilder <span class="kw">as </span>ChunkCompressionOptionsBuilder, + }, + file::{ + CapacityError <span class="kw">as </span>FileCapacityError, File, Header <span class="kw">as </span>FileHeader, + ReadOptions <span class="kw">as </span>FileReadOptions, ReadOptionsBuilder <span class="kw">as </span>FileReadOptionsBuilder, + WriteOptions <span class="kw">as </span>FileWriteOptions, WriteOptionsBuilder <span class="kw">as </span>FileWriteOptionsBuilder, + DX10 <span class="kw">as </span>DX10Header, GNMF <span class="kw">as </span>GNMFHeader, + }, + hashing::{hash_file, hash_file_in_place, FileHash, Hash}, +}; + +<span class="kw">use </span>core::num::TryFromIntError; +<span class="kw">use </span>directxtex::HResultError; +<span class="kw">use </span>std::io; + +<span class="attr">#[non_exhaustive] +#[derive(thiserror::Error, Debug)] +</span><span class="kw">pub enum </span>Error { + <span class="attr">#[error(<span class="string">"can not compress the given file because it is already compressed"</span>)] + </span>AlreadyCompressed, + + <span class="attr">#[error(<span class="string">"can not decompress the given file because it is already decompressed"</span>)] + </span>AlreadyDecompressed, + + <span class="attr">#[error(<span class="string">"buffer failed to decompress to the expected size... expected {expected} bytes, but got {actual} bytes"</span>)] + </span>DecompressionSizeMismatch { expected: usize, actual: usize }, + + <span class="attr">#[error(<span class="string">"error while working with a dds file"</span>)] + </span>DX10(<span class="attr">#[from] </span>HResultError), + + <span class="attr">#[error(<span class="string">"attempted to write in a format that does not match a file/chunk"</span>)] + </span>FormatMismatch, + + <span class="attr">#[error(<span class="string">"an operation on two integers would have overflowed and corrupted data"</span>)] + </span>IntegralOverflow, + + <span class="attr">#[error(<span class="string">"an operation on an integer would have truncated and corrupted data"</span>)] + </span>IntegralTruncation, + + <span class="attr">#[error(<span class="string">"invalid sentinel read from chunk: {0}"</span>)] + </span>InvalidChunkSentinel(u32), + + <span class="attr">#[error(<span class="string">"invalid chunk size read from file header: {0}"</span>)] + </span>InvalidChunkSize(u16), + + <span class="attr">#[error(<span class="string">"invalid format read from archive header: {0}"</span>)] + </span>InvalidFormat(u32), + + <span class="attr">#[error(<span class="string">"invalid magic read from archive header: {0}"</span>)] + </span>InvalidMagic(u32), + + <span class="attr">#[error(<span class="string">"invalid version read from archive header: {0}"</span>)] + </span>InvalidVersion(u32), + + <span class="attr">#[error(transparent)] + </span>Io(<span class="attr">#[from] </span>io::Error), + + <span class="attr">#[error(transparent)] + </span>LZ4(<span class="attr">#[from] </span>lzzzz::Error), + + <span class="attr">#[error(<span class="string">"support for this feature is not yet implemented"</span>)] + </span>NotImplemented, +} + +<span class="kw">impl </span>From<TryFromIntError> <span class="kw">for </span>Error { + <span class="kw">fn </span>from(<span class="kw">_</span>: TryFromIntError) -> <span class="self">Self </span>{ + <span class="self">Self</span>::IntegralTruncation + } +} + +<span class="kw">pub type </span><span class="prelude-ty">Result</span><T> = core::result::Result<T, Error>; + +<span class="doccomment">/// A list of all compression methods supported by the ba2 format. +</span><span class="attr">#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +</span><span class="kw">pub enum </span>CompressionFormat { + <span class="doccomment">/// The default compression format, compatible with all games that utilize the ba2 format. + </span><span class="attr">#[default] + </span>Zip, + + <span class="doccomment">/// A more specialized format leveraging lz4's fast decompression to improve streaming time. + /// + /// Only compatible with Starfield or later. + </span>LZ4, +} + +<span class="doccomment">/// Specifies the compression level to use when compressing data. +/// +/// Only compatible with [`CompressionFormat::Zip`]. +</span><span class="attr">#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +</span><span class="kw">pub enum </span>CompressionLevel { + <span class="doccomment">/// Fallout 4. + </span><span class="attr">#[default] + </span>FO4, + + <span class="doccomment">/// Fallout 4 on the xbox. + /// + /// Uses a smaller windows size, but higher a compression level to yield a higher compression ratio. + </span>FO4Xbox, + + <span class="doccomment">/// Starfield. + /// + /// Uses a custom DEFLATE algorithm with zlib wrapper to obtain a good compression ratio. + </span>SF, +} + +<span class="kw">impl </span>CompressionLevel { + <span class="doccomment">/// Fallout 76. + </span><span class="kw">pub const </span>FO76: <span class="self">Self </span>= <span class="self">Self</span>::FO4; +} + +<span class="doccomment">/// Represents the file format for an archive. +</span><span class="attr">#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +</span><span class="kw">pub enum </span>Format { + <span class="doccomment">/// A GNRL archive can contain any kind of file. + </span><span class="attr">#[default] + </span>GNRL, + + <span class="doccomment">/// A DX10 archive can only contain .dds files (Microsoft DirectX). + </span>DX10, + + <span class="doccomment">/// A GNMF archive can only contain .gnf files (Sony GNM). + </span>GNMF, +} + +<span class="doccomment">/// Indicates the version of an archive. +</span><span class="attr">#[allow(non_camel_case_types)] +#[derive(Clone, Copy, Debug, Default, Eq, Ord, PartialEq, PartialOrd)] +</span><span class="kw">pub enum </span>Version { + <span class="doccomment">/// Initial format introduced in Fallout 4. + </span><span class="attr">#[default] + </span>v1 = <span class="number">1</span>, + + <span class="doccomment">/// Intoduced in Starfield. + </span>v2 = <span class="number">2</span>, + + <span class="doccomment">/// Intoduced in Starfield. + </span>v3 = <span class="number">3</span>, +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/guess.rs.html b/src/ba2/guess.rs.html new file mode 100644 index 0000000..60117b2 --- /dev/null +++ b/src/ba2/guess.rs.html @@ -0,0 +1,121 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/guess.rs`."><title>guess.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +</pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::cc; +<span class="kw">use </span>core::mem; +<span class="kw">use </span>std::io::Read; + +<span class="doccomment">/// The file format for a given archive. +</span><span class="attr">#[derive(Clone, Copy, Debug, Eq, PartialEq)] +</span><span class="kw">pub enum </span>FileFormat { + TES3, + TES4, + FO4, +} + +<span class="kw">const </span>BSA: u32 = cc::make_four(<span class="string">b"BSA"</span>); +<span class="kw">const </span>BTDX: u32 = cc::make_four(<span class="string">b"BTDX"</span>); + +<span class="doccomment">/// Guesses the archive format for a given source. +/// +/// This function does not guarantee that the given source constitutes a well-formed archive of the deduced format. It merely remarks that if the file were a well-formed archive, it would be of the deduced format. +</span><span class="attr">#[allow(clippy::module_name_repetitions)] +</span><span class="kw">pub fn </span>guess_format<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Option</span><FileFormat> +<span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Read, +{ + <span class="kw">let </span><span class="kw-2">mut </span>buf = [<span class="number">0u8</span>; mem::size_of::<u32>()]; + source.read_exact(<span class="kw-2">&mut </span>buf).ok()<span class="question-mark">?</span>; + <span class="kw">let </span>magic = u32::from_le_bytes(buf); + <span class="kw">match </span>magic { + <span class="number">0x100 </span>=> <span class="prelude-val">Some</span>(FileFormat::TES3), + BSA => <span class="prelude-val">Some</span>(FileFormat::TES4), + BTDX => <span class="prelude-val">Some</span>(FileFormat::FO4), + <span class="kw">_ </span>=> <span class="prelude-val">None</span>, + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">crate</span>::FileFormat; + <span class="kw">use </span>anyhow::Context <span class="kw">as _</span>; + <span class="kw">use </span>std::{fs::File, path::Path}; + + <span class="attr">#[test] + </span><span class="kw">fn </span>guess() -> anyhow::Result<()> { + <span class="kw">let </span>root = Path::new(<span class="string">"data/common_guess_test"</span>); + <span class="kw">let </span>tests = [ + (FileFormat::TES3, <span class="string">"tes3.bsa"</span>), + (FileFormat::TES4, <span class="string">"tes4.bsa"</span>), + (FileFormat::FO4, <span class="string">"fo4.ba2"</span>), + ]; + + <span class="kw">for </span>(format, file_name) <span class="kw">in </span>tests { + <span class="kw">let </span><span class="kw-2">mut </span>file = File::open(root.join(file_name)) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>guess = <span class="kw">crate</span>::guess_format(<span class="kw-2">&mut </span>file); + <span class="macro">assert_eq!</span>(guess, <span class="prelude-val">Some</span>(format)); + } + + <span class="prelude-val">Ok</span>(()) + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/hashing.rs.html b/src/ba2/hashing.rs.html new file mode 100644 index 0000000..c3b1b55 --- /dev/null +++ b/src/ba2/hashing.rs.html @@ -0,0 +1,155 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/hashing.rs`."><title>hashing.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +</pre></div><pre class="rust"><code><span class="kw">use </span>bstr::BString; + +<span class="attr">#[must_use] +</span><span class="kw">const fn </span>build_lookup_table() -> [u8; <span class="number">256</span>] { + <span class="kw">let </span><span class="kw-2">mut </span>table = [<span class="number">0u8</span>; u8::MAX <span class="kw">as </span>usize + <span class="number">1</span>]; + <span class="kw">let </span><span class="kw-2">mut </span>i: u8 = <span class="number">0</span>; + <span class="kw">loop </span>{ + table[i <span class="kw">as </span>usize] = i; + <span class="kw">match </span>i { + u8::MAX => <span class="kw">break</span>, + <span class="kw">_ </span>=> i += <span class="number">1</span>, + }; + } + + table[<span class="string">'/' </span><span class="kw">as </span>usize] = <span class="string">b'\\'</span>; + + <span class="kw">let </span>offset = <span class="string">b'a' </span>- <span class="string">b'A'</span>; + <span class="kw">let </span><span class="kw-2">mut </span>i = <span class="string">b'A'</span>; + <span class="kw">loop </span>{ + table[i <span class="kw">as </span>usize] = i + offset; + <span class="kw">match </span>i { + <span class="string">b'Z' </span>=> <span class="kw">break</span>, + <span class="kw">_ </span>=> i += <span class="number">1</span>, + }; + } + + table +} + +<span class="attr">#[must_use] +</span><span class="kw">fn </span>map_byte(b: u8) -> u8 { + <span class="kw">const </span>LUT: [u8; <span class="number">256</span>] = build_lookup_table(); + LUT[b <span class="kw">as </span>usize] +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>normalize_path(path: <span class="kw-2">&mut </span>BString) { + <span class="kw">for </span>b <span class="kw">in </span>path.iter_mut() { + <span class="kw-2">*</span>b = map_byte(<span class="kw-2">*</span>b); + } + + <span class="kw">while </span>path.last().is_some_and(|<span class="kw-2">&</span>x| x == <span class="string">b'\\'</span>) { + path.pop(); + } + + <span class="kw">while </span>path.first().is_some_and(|<span class="kw-2">&</span>x| x == <span class="string">b'\\'</span>) { + path.remove(<span class="number">0</span>); + } + + <span class="kw">if </span>path.is_empty() || path.len() >= <span class="number">260 </span>{ + path.clear(); + path.push(<span class="string">b'.'</span>); + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">super</span>::map_byte; + + <span class="attr">#[test] + </span><span class="kw">fn </span>test_mapping() { + <span class="macro">macro_rules! </span>test { + (<span class="macro-nonterminal">$l</span>:literal, <span class="macro-nonterminal">$r</span>:literal) => { + <span class="macro">assert_eq!</span>(map_byte(<span class="macro-nonterminal">$l </span><span class="kw">as </span>u8), <span class="macro-nonterminal">$r </span><span class="kw">as </span>u8); + }; + } + + <span class="macro">test!</span>(<span class="string">'A'</span>, <span class="string">'a'</span>); + <span class="macro">test!</span>(<span class="string">'a'</span>, <span class="string">'a'</span>); + <span class="macro">test!</span>(<span class="string">'Z'</span>, <span class="string">'z'</span>); + <span class="macro">test!</span>(<span class="string">'z'</span>, <span class="string">'z'</span>); + <span class="macro">test!</span>(<span class="string">'/'</span>, <span class="string">'\\'</span>); + <span class="macro">test!</span>(<span class="string">'\\'</span>, <span class="string">'\\'</span>); + <span class="macro">test!</span>(<span class="string">'.'</span>, <span class="string">'.'</span>); + <span class="macro">test!</span>(<span class="number">255</span>, <span class="number">255</span>); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/io.rs.html b/src/ba2/io.rs.html new file mode 100644 index 0000000..7ef1b99 --- /dev/null +++ b/src/ba2/io.rs.html @@ -0,0 +1,1083 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/io.rs`."><title>io.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +<a href="#285" id="285">285</a> +<a href="#286" id="286">286</a> +<a href="#287" id="287">287</a> +<a href="#288" id="288">288</a> +<a href="#289" id="289">289</a> +<a href="#290" id="290">290</a> +<a href="#291" id="291">291</a> +<a href="#292" id="292">292</a> +<a href="#293" id="293">293</a> +<a href="#294" id="294">294</a> +<a href="#295" id="295">295</a> +<a href="#296" id="296">296</a> +<a href="#297" id="297">297</a> +<a href="#298" id="298">298</a> +<a href="#299" id="299">299</a> +<a href="#300" id="300">300</a> +<a href="#301" id="301">301</a> +<a href="#302" id="302">302</a> +<a href="#303" id="303">303</a> +<a href="#304" id="304">304</a> +<a href="#305" id="305">305</a> +<a href="#306" id="306">306</a> +<a href="#307" id="307">307</a> +<a href="#308" id="308">308</a> +<a href="#309" id="309">309</a> +<a href="#310" id="310">310</a> +<a href="#311" id="311">311</a> +<a href="#312" id="312">312</a> +<a href="#313" id="313">313</a> +<a href="#314" id="314">314</a> +<a href="#315" id="315">315</a> +<a href="#316" id="316">316</a> +<a href="#317" id="317">317</a> +<a href="#318" id="318">318</a> +<a href="#319" id="319">319</a> +<a href="#320" id="320">320</a> +<a href="#321" id="321">321</a> +<a href="#322" id="322">322</a> +<a href="#323" id="323">323</a> +<a href="#324" id="324">324</a> +<a href="#325" id="325">325</a> +<a href="#326" id="326">326</a> +<a href="#327" id="327">327</a> +<a href="#328" id="328">328</a> +<a href="#329" id="329">329</a> +<a href="#330" id="330">330</a> +<a href="#331" id="331">331</a> +<a href="#332" id="332">332</a> +<a href="#333" id="333">333</a> +<a href="#334" id="334">334</a> +<a href="#335" id="335">335</a> +<a href="#336" id="336">336</a> +<a href="#337" id="337">337</a> +<a href="#338" id="338">338</a> +<a href="#339" id="339">339</a> +<a href="#340" id="340">340</a> +<a href="#341" id="341">341</a> +<a href="#342" id="342">342</a> +<a href="#343" id="343">343</a> +<a href="#344" id="344">344</a> +<a href="#345" id="345">345</a> +<a href="#346" id="346">346</a> +<a href="#347" id="347">347</a> +<a href="#348" id="348">348</a> +<a href="#349" id="349">349</a> +<a href="#350" id="350">350</a> +<a href="#351" id="351">351</a> +<a href="#352" id="352">352</a> +<a href="#353" id="353">353</a> +<a href="#354" id="354">354</a> +<a href="#355" id="355">355</a> +<a href="#356" id="356">356</a> +<a href="#357" id="357">357</a> +<a href="#358" id="358">358</a> +<a href="#359" id="359">359</a> +<a href="#360" id="360">360</a> +<a href="#361" id="361">361</a> +<a href="#362" id="362">362</a> +<a href="#363" id="363">363</a> +<a href="#364" id="364">364</a> +<a href="#365" id="365">365</a> +<a href="#366" id="366">366</a> +<a href="#367" id="367">367</a> +<a href="#368" id="368">368</a> +<a href="#369" id="369">369</a> +<a href="#370" id="370">370</a> +<a href="#371" id="371">371</a> +<a href="#372" id="372">372</a> +<a href="#373" id="373">373</a> +<a href="#374" id="374">374</a> +<a href="#375" id="375">375</a> +<a href="#376" id="376">376</a> +<a href="#377" id="377">377</a> +<a href="#378" id="378">378</a> +<a href="#379" id="379">379</a> +<a href="#380" id="380">380</a> +<a href="#381" id="381">381</a> +<a href="#382" id="382">382</a> +<a href="#383" id="383">383</a> +<a href="#384" id="384">384</a> +<a href="#385" id="385">385</a> +<a href="#386" id="386">386</a> +<a href="#387" id="387">387</a> +<a href="#388" id="388">388</a> +<a href="#389" id="389">389</a> +<a href="#390" id="390">390</a> +<a href="#391" id="391">391</a> +<a href="#392" id="392">392</a> +<a href="#393" id="393">393</a> +<a href="#394" id="394">394</a> +<a href="#395" id="395">395</a> +<a href="#396" id="396">396</a> +<a href="#397" id="397">397</a> +<a href="#398" id="398">398</a> +<a href="#399" id="399">399</a> +<a href="#400" id="400">400</a> +<a href="#401" id="401">401</a> +<a href="#402" id="402">402</a> +<a href="#403" id="403">403</a> +<a href="#404" id="404">404</a> +<a href="#405" id="405">405</a> +<a href="#406" id="406">406</a> +<a href="#407" id="407">407</a> +<a href="#408" id="408">408</a> +<a href="#409" id="409">409</a> +<a href="#410" id="410">410</a> +<a href="#411" id="411">411</a> +<a href="#412" id="412">412</a> +<a href="#413" id="413">413</a> +<a href="#414" id="414">414</a> +<a href="#415" id="415">415</a> +<a href="#416" id="416">416</a> +<a href="#417" id="417">417</a> +<a href="#418" id="418">418</a> +<a href="#419" id="419">419</a> +<a href="#420" id="420">420</a> +<a href="#421" id="421">421</a> +<a href="#422" id="422">422</a> +<a href="#423" id="423">423</a> +<a href="#424" id="424">424</a> +<a href="#425" id="425">425</a> +<a href="#426" id="426">426</a> +<a href="#427" id="427">427</a> +<a href="#428" id="428">428</a> +<a href="#429" id="429">429</a> +<a href="#430" id="430">430</a> +<a href="#431" id="431">431</a> +<a href="#432" id="432">432</a> +<a href="#433" id="433">433</a> +<a href="#434" id="434">434</a> +<a href="#435" id="435">435</a> +<a href="#436" id="436">436</a> +<a href="#437" id="437">437</a> +<a href="#438" id="438">438</a> +<a href="#439" id="439">439</a> +<a href="#440" id="440">440</a> +<a href="#441" id="441">441</a> +<a href="#442" id="442">442</a> +<a href="#443" id="443">443</a> +<a href="#444" id="444">444</a> +<a href="#445" id="445">445</a> +<a href="#446" id="446">446</a> +<a href="#447" id="447">447</a> +<a href="#448" id="448">448</a> +<a href="#449" id="449">449</a> +<a href="#450" id="450">450</a> +<a href="#451" id="451">451</a> +<a href="#452" id="452">452</a> +<a href="#453" id="453">453</a> +<a href="#454" id="454">454</a> +<a href="#455" id="455">455</a> +<a href="#456" id="456">456</a> +<a href="#457" id="457">457</a> +<a href="#458" id="458">458</a> +<a href="#459" id="459">459</a> +<a href="#460" id="460">460</a> +<a href="#461" id="461">461</a> +<a href="#462" id="462">462</a> +<a href="#463" id="463">463</a> +<a href="#464" id="464">464</a> +<a href="#465" id="465">465</a> +<a href="#466" id="466">466</a> +<a href="#467" id="467">467</a> +<a href="#468" id="468">468</a> +<a href="#469" id="469">469</a> +<a href="#470" id="470">470</a> +<a href="#471" id="471">471</a> +<a href="#472" id="472">472</a> +<a href="#473" id="473">473</a> +<a href="#474" id="474">474</a> +<a href="#475" id="475">475</a> +<a href="#476" id="476">476</a> +<a href="#477" id="477">477</a> +<a href="#478" id="478">478</a> +<a href="#479" id="479">479</a> +<a href="#480" id="480">480</a> +<a href="#481" id="481">481</a> +<a href="#482" id="482">482</a> +<a href="#483" id="483">483</a> +<a href="#484" id="484">484</a> +<a href="#485" id="485">485</a> +<a href="#486" id="486">486</a> +<a href="#487" id="487">487</a> +<a href="#488" id="488">488</a> +<a href="#489" id="489">489</a> +<a href="#490" id="490">490</a> +<a href="#491" id="491">491</a> +<a href="#492" id="492">492</a> +<a href="#493" id="493">493</a> +<a href="#494" id="494">494</a> +<a href="#495" id="495">495</a> +<a href="#496" id="496">496</a> +<a href="#497" id="497">497</a> +<a href="#498" id="498">498</a> +<a href="#499" id="499">499</a> +<a href="#500" id="500">500</a> +<a href="#501" id="501">501</a> +<a href="#502" id="502">502</a> +<a href="#503" id="503">503</a> +<a href="#504" id="504">504</a> +<a href="#505" id="505">505</a> +<a href="#506" id="506">506</a> +<a href="#507" id="507">507</a> +<a href="#508" id="508">508</a> +<a href="#509" id="509">509</a> +<a href="#510" id="510">510</a> +<a href="#511" id="511">511</a> +<a href="#512" id="512">512</a> +<a href="#513" id="513">513</a> +<a href="#514" id="514">514</a> +<a href="#515" id="515">515</a> +<a href="#516" id="516">516</a> +<a href="#517" id="517">517</a> +<a href="#518" id="518">518</a> +<a href="#519" id="519">519</a> +<a href="#520" id="520">520</a> +<a href="#521" id="521">521</a> +<a href="#522" id="522">522</a> +<a href="#523" id="523">523</a> +<a href="#524" id="524">524</a> +<a href="#525" id="525">525</a> +<a href="#526" id="526">526</a> +<a href="#527" id="527">527</a> +<a href="#528" id="528">528</a> +<a href="#529" id="529">529</a> +<a href="#530" id="530">530</a> +<a href="#531" id="531">531</a> +<a href="#532" id="532">532</a> +<a href="#533" id="533">533</a> +<a href="#534" id="534">534</a> +<a href="#535" id="535">535</a> +<a href="#536" id="536">536</a> +<a href="#537" id="537">537</a> +<a href="#538" id="538">538</a> +<a href="#539" id="539">539</a> +<a href="#540" id="540">540</a> +</pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::containers::Bytes; +<span class="kw">use </span>core::{mem, ops::Range}; +<span class="kw">use </span>memmap2::{Mmap, MmapOptions}; +<span class="kw">use </span>std::{ + fs::File, + io::{<span class="self">self</span>, Write}, + sync::Arc, +}; + +<span class="attr">#[derive(Clone, Copy)] +</span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">enum </span>Endian { + Little, + Big, + Native, +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">trait </span>Source<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>as_bytes(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>[u8]; + + <span class="kw">fn </span>read_bytes(<span class="kw-2">&mut </span><span class="self">self</span>, len: usize) -> io::Result<Bytes<<span class="lifetime">'bytes</span>>>; + + <span class="attr">#[must_use] + </span><span class="kw">fn </span>read_bytes_to_end(<span class="kw-2">&mut </span><span class="self">self</span>) -> Bytes<<span class="lifetime">'bytes</span>>; + + <span class="kw">fn </span>read_into(<span class="kw-2">&mut </span><span class="self">self</span>, buf: <span class="kw-2">&mut </span>[u8]) -> io::Result<()>; + + <span class="kw">fn </span>seek_absolute(<span class="kw-2">&mut </span><span class="self">self</span>, pos: usize) -> io::Result<()>; + + <span class="attr">#[must_use] + </span><span class="kw">fn </span>stream_position(<span class="kw-2">&</span><span class="self">self</span>) -> usize; + + <span class="kw">fn </span>read<T>(<span class="kw-2">&mut </span><span class="self">self</span>, endian: Endian) -> io::Result<T> + <span class="kw">where + </span>T: BinaryReadable<<span class="lifetime">'bytes</span>, Item = T>, + { + T::from_stream(<span class="self">self</span>, endian) + } + + <span class="kw">fn </span>read_protocol<T>(<span class="kw-2">&mut </span><span class="self">self</span>, endian: Endian) -> io::Result<T::Item> + <span class="kw">where + </span>T: BinaryReadable<<span class="lifetime">'bytes</span>>, + { + T::from_stream(<span class="self">self</span>, endian) + } + + <span class="kw">fn </span>save_restore_position<F, T>(<span class="kw-2">&mut </span><span class="self">self</span>, f: F) -> io::Result<T> + <span class="kw">where + </span>F: FnOnce(<span class="kw-2">&mut </span><span class="self">Self</span>) -> T, + { + <span class="kw">let </span>position = <span class="self">self</span>.stream_position(); + <span class="kw">let </span>result = f(<span class="self">self</span>); + <span class="self">self</span>.seek_absolute(position)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(result) + } + + <span class="kw">fn </span>seek_relative(<span class="kw-2">&mut </span><span class="self">self</span>, offset: isize) -> io::Result<()> { + <span class="kw">if let </span><span class="prelude-val">Some</span>(pos) = <span class="self">self</span>.stream_position().checked_add_signed(offset) { + <span class="self">self</span>.seek_absolute(pos) + } <span class="kw">else </span>{ + <span class="prelude-val">Err</span>(io::ErrorKind::UnexpectedEof.into()) + } + } +} + +<span class="macro">macro_rules! </span>make_sourceable { + (<span class="macro-nonterminal">$this</span>:ty, <span class="macro-nonterminal">$bytes_lifetime</span>:lifetime $(,<span class="macro-nonterminal">$this_lifetime</span>:lifetime)<span class="question-mark">?</span>) => { + <span class="kw">impl </span>$(<<span class="macro-nonterminal">$this_lifetime</span>>)<span class="question-mark">? </span>Source<<span class="macro-nonterminal">$bytes_lifetime</span>> <span class="kw">for </span><span class="macro-nonterminal">$this </span>{ + <span class="kw">fn </span>as_bytes(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>[u8] { + <span class="kw-2">&</span><span class="self">self</span>.source[..] + } + + <span class="kw">fn </span>read_into(<span class="kw-2">&mut </span><span class="self">self</span>, buf: <span class="kw-2">&mut </span>[u8]) -> io::Result<()> { + <span class="kw">let </span>len = buf.len(); + <span class="kw">let </span>start = <span class="self">self</span>.pos; + <span class="kw">let </span>stop = start + len; + <span class="kw">if </span>stop > <span class="self">self</span>.source.len() { + <span class="prelude-val">Err</span>(io::ErrorKind::UnexpectedEof.into()) + } <span class="kw">else </span>{ + <span class="self">self</span>.pos += len; + buf.copy_from_slice(<span class="kw-2">&</span><span class="self">self</span>.source[start..stop]); + <span class="prelude-val">Ok</span>(()) + } + } + + <span class="kw">fn </span>read_bytes(<span class="kw-2">&mut </span><span class="self">self</span>, len: usize) -> io::Result<Bytes<<span class="macro-nonterminal">$bytes_lifetime</span>>> { + <span class="kw">let </span>start = <span class="self">self</span>.pos; + <span class="kw">let </span>stop = start + len; + <span class="kw">if </span>stop > <span class="self">self</span>.source.len() { + <span class="prelude-val">Err</span>(io::ErrorKind::UnexpectedEof.into()) + } <span class="kw">else </span>{ + <span class="self">self</span>.pos += len; + <span class="prelude-val">Ok</span>(<span class="self">self</span>.make_bytes(start..stop)) + } + } + + <span class="kw">fn </span>read_bytes_to_end(<span class="kw-2">&mut </span><span class="self">self</span>) -> Bytes<<span class="macro-nonterminal">$bytes_lifetime</span>> { + <span class="kw">let </span>len = <span class="self">self</span>.source.len(); + <span class="kw">let </span>start = <span class="self">self</span>.pos; + <span class="kw">let </span>stop = len - start; + <span class="self">self</span>.make_bytes(start..stop) + } + + <span class="kw">fn </span>seek_absolute(<span class="kw-2">&mut </span><span class="self">self</span>, pos: usize) -> io::Result<()> { + <span class="kw">if </span>pos > <span class="self">self</span>.source.len() { + <span class="prelude-val">Err</span>(io::ErrorKind::UnexpectedEof.into()) + } <span class="kw">else </span>{ + <span class="self">self</span>.pos = pos; + <span class="prelude-val">Ok</span>(()) + } + } + + <span class="kw">fn </span>stream_position(<span class="kw-2">&</span><span class="self">self</span>) -> usize { + <span class="self">self</span>.pos + } + } + }; +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>BorrowedSource<<span class="lifetime">'bytes</span>> { + source: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8], + pos: usize, +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> BorrowedSource<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>make_bytes(<span class="kw-2">&</span><span class="self">self</span>, range: Range<usize>) -> Bytes<<span class="lifetime">'bytes</span>> { + Bytes::from_borrowed(<span class="kw-2">&</span><span class="self">self</span>.source[range]) + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> From<<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]> <span class="kw">for </span>BorrowedSource<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>from(source: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ source, pos: <span class="number">0 </span>} + } +} + +<span class="macro">make_sourceable!</span>(BorrowedSource<<span class="lifetime">'bytes</span>>, <span class="lifetime">'bytes</span>, <span class="lifetime">'bytes</span>); + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>CopiedSource<<span class="lifetime">'bytes</span>> { + source: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8], + pos: usize, +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> CopiedSource<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>make_bytes(<span class="kw-2">&</span><span class="self">self</span>, range: Range<usize>) -> Bytes<<span class="lifetime">'static</span>> { + Bytes::from_owned(<span class="self">self</span>.source[range].into()) + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> From<<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]> <span class="kw">for </span>CopiedSource<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>from(source: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ source, pos: <span class="number">0 </span>} + } +} + +<span class="macro">make_sourceable!</span>(CopiedSource<<span class="lifetime">'bytes</span>>, <span class="lifetime">'static</span>, <span class="lifetime">'bytes</span>); + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>MappedSource { + source: Arc<Mmap>, + pos: usize, +} + +<span class="kw">impl </span>MappedSource { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>make_bytes(<span class="kw-2">&</span><span class="self">self</span>, range: Range<usize>) -> Bytes<<span class="lifetime">'static</span>> { + Bytes::from_mapped(range.start, range.len(), <span class="self">self</span>.source.clone()) + } +} + +<span class="kw">impl </span>TryFrom<<span class="kw-2">&</span>File> <span class="kw">for </span>MappedSource { + <span class="kw">type </span>Error = io::Error; + + <span class="kw">fn </span>try_from(value: <span class="kw-2">&</span>File) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>, <span class="self">Self</span>::Error> { + <span class="kw">let </span>options = MmapOptions::new(); + <span class="kw">let </span>mapping = <span class="kw">unsafe </span>{ options.map(value) }<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(<span class="self">Self </span>{ + source: Arc::new(mapping), + pos: <span class="number">0</span>, + }) + } +} + +<span class="macro">make_sourceable!</span>(MappedSource, <span class="lifetime">'static</span>); + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">trait </span>BinaryReadable<<span class="lifetime">'bytes</span>> { + <span class="kw">type </span>Item; + + <span class="kw">fn </span>from_ne_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="self">Self</span>::from_stream(stream, Endian::Native) + } + + <span class="kw">fn </span>from_be_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="self">Self</span>::from_stream(stream, Endian::Big) + } + + <span class="kw">fn </span>from_le_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="self">Self</span>::from_stream(stream, Endian::Little) + } + + <span class="kw">fn </span>from_stream<In>(stream: <span class="kw-2">&mut </span>In, endian: Endian) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">match </span>endian { + Endian::Big => <span class="self">Self</span>::from_be_stream(stream), + Endian::Little => <span class="self">Self</span>::from_le_stream(stream), + Endian::Native => <span class="self">Self</span>::from_ne_stream(stream), + } + } +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">trait </span>BinaryWriteable { + <span class="kw">type </span>Item: <span class="question-mark">?</span>Sized; + + <span class="kw">fn </span>to_ne_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="self">Self</span>::to_stream(stream, item, Endian::Native) + } + + <span class="kw">fn </span>to_be_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="self">Self</span>::to_stream(stream, item, Endian::Big) + } + + <span class="kw">fn </span>to_le_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="self">Self</span>::to_stream(stream, item, Endian::Little) + } + + <span class="kw">fn </span>to_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item, endian: Endian) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">match </span>endian { + Endian::Big => <span class="self">Self</span>::to_be_stream(stream, item), + Endian::Little => <span class="self">Self</span>::to_le_stream(stream, item), + Endian::Native => <span class="self">Self</span>::to_ne_stream(stream, item), + } + } +} + +<span class="macro">macro_rules! </span>make_binary_streamable { + (<span class="macro-nonterminal">$t</span>:ty) => { + <span class="kw">impl</span><<span class="lifetime">'bytes</span>> BinaryReadable<<span class="lifetime">'bytes</span>> <span class="kw">for </span><span class="macro-nonterminal">$t </span>{ + <span class="kw">type </span>Item = <span class="macro-nonterminal">$t</span>; + + <span class="kw">fn </span>from_be_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = [<span class="number">0u8</span>; mem::size_of::<<span class="self">Self</span>::Item>()]; + stream.read_into(<span class="kw-2">&mut </span>bytes)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(<span class="self">Self</span>::from_be_bytes(bytes)) + } + + <span class="kw">fn </span>from_le_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = [<span class="number">0u8</span>; mem::size_of::<<span class="self">Self</span>::Item>()]; + stream.read_into(<span class="kw-2">&mut </span>bytes)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(<span class="self">Self</span>::from_le_bytes(bytes)) + } + + <span class="kw">fn </span>from_ne_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = [<span class="number">0u8</span>; mem::size_of::<<span class="self">Self</span>::Item>()]; + stream.read_into(<span class="kw-2">&mut </span>bytes)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(<span class="self">Self</span>::from_ne_bytes(bytes)) + } + } + + <span class="kw">impl </span>BinaryWriteable <span class="kw">for </span><span class="macro-nonterminal">$t </span>{ + <span class="kw">type </span>Item = <span class="macro-nonterminal">$t</span>; + + <span class="kw">fn </span>to_be_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = item.to_be_bytes(); + stream.write_bytes(<span class="kw-2">&mut </span>bytes) + } + + <span class="kw">fn </span>to_le_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = item.to_le_bytes(); + stream.write_bytes(<span class="kw-2">&mut </span>bytes) + } + + <span class="kw">fn </span>to_ne_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>bytes = item.to_ne_bytes(); + stream.write_bytes(<span class="kw-2">&mut </span>bytes) + } + } + }; +} + +<span class="macro">make_binary_streamable!</span>(u8); +<span class="macro">make_binary_streamable!</span>(u16); +<span class="macro">make_binary_streamable!</span>(u32); +<span class="macro">make_binary_streamable!</span>(u64); + +<span class="macro">make_binary_streamable!</span>(i8); +<span class="macro">make_binary_streamable!</span>(i16); +<span class="macro">make_binary_streamable!</span>(i32); +<span class="macro">make_binary_streamable!</span>(i64); + +<span class="macro">macro_rules! </span>make_binary_streamable_array { + (<span class="macro-nonterminal">$n</span>:literal, $(<span class="macro-nonterminal">$idx</span>:tt <span class="macro-nonterminal">$t</span>:ident),+) => { + <span class="kw">impl</span><<span class="lifetime">'bytes</span>, T> BinaryReadable<<span class="lifetime">'bytes</span>> <span class="kw">for </span>[T; <span class="macro-nonterminal">$n</span>] + <span class="kw">where + </span>T: BinaryReadable<<span class="lifetime">'bytes</span>> + { + <span class="kw">type </span>Item = [T::Item; <span class="macro-nonterminal">$n</span>]; + + <span class="kw">fn </span>from_be_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="prelude-val">Ok</span>([$( + <span class="macro-nonterminal">$t::from_be_stream</span>(stream)<span class="question-mark">?</span>, + )+]) + } + + <span class="kw">fn </span>from_le_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="prelude-val">Ok</span>([$( + <span class="macro-nonterminal">$t::from_le_stream</span>(stream)<span class="question-mark">?</span>, + )+]) + } + + <span class="kw">fn </span>from_ne_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="prelude-val">Ok</span>([$( + <span class="macro-nonterminal">$t::from_ne_stream</span>(stream)<span class="question-mark">?</span>, + )+]) + } + } + + <span class="kw">impl</span><<span class="lifetime">'bytes</span>, T> BinaryWriteable <span class="kw">for </span>[T; <span class="macro-nonterminal">$n</span>] + <span class="kw">where + </span>T: BinaryWriteable, + <T <span class="kw">as </span>BinaryWriteable>::Item: Sized, + { + <span class="kw">type </span>Item = [T::Item; <span class="macro-nonterminal">$n</span>]; + + <span class="kw">fn </span>to_be_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + $( + <span class="macro-nonterminal">$t::to_be_stream</span>(stream, <span class="kw-2">&</span>item[<span class="macro-nonterminal">$idx</span>])<span class="question-mark">?</span>; + )+ + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>to_le_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + $( + <span class="macro-nonterminal">$t::to_le_stream</span>(stream, <span class="kw-2">&</span>item[<span class="macro-nonterminal">$idx</span>])<span class="question-mark">?</span>; + )+ + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>to_ne_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + $( + <span class="macro-nonterminal">$t::to_ne_stream</span>(stream, <span class="kw-2">&</span>item[<span class="macro-nonterminal">$idx</span>])<span class="question-mark">?</span>; + )+ + <span class="prelude-val">Ok</span>(()) + } + } + }; +} + +<span class="macro">make_binary_streamable_array!</span>( <span class="number">1</span>, <span class="number">0 </span>T); +<span class="macro">make_binary_streamable_array!</span>( <span class="number">2</span>, <span class="number">0 </span>T, <span class="number">1 </span>T); +<span class="macro">make_binary_streamable_array!</span>( <span class="number">3</span>, <span class="number">0 </span>T, <span class="number">1 </span>T, <span class="number">2 </span>T); +<span class="macro">make_binary_streamable_array!</span>( <span class="number">4</span>, <span class="number">0 </span>T, <span class="number">1 </span>T, <span class="number">2 </span>T, <span class="number">3 </span>T); +<span class="macro">make_binary_streamable_array!</span>( <span class="number">5</span>, <span class="number">0 </span>T, <span class="number">1 </span>T, <span class="number">2 </span>T, <span class="number">3 </span>T, <span class="number">4 </span>T); +<span class="macro">make_binary_streamable_array!</span>( <span class="number">6</span>, <span class="number">0 </span>T, <span class="number">1 </span>T, <span class="number">2 </span>T, <span class="number">3 </span>T, <span class="number">4 </span>T, <span class="number">5 </span>T); +<span class="macro">make_binary_streamable_array!</span>( <span class="number">7</span>, <span class="number">0 </span>T, <span class="number">1 </span>T, <span class="number">2 </span>T, <span class="number">3 </span>T, <span class="number">4 </span>T, <span class="number">5 </span>T, <span class="number">6 </span>T); +<span class="macro">make_binary_streamable_array!</span>( <span class="number">8</span>, <span class="number">0 </span>T, <span class="number">1 </span>T, <span class="number">2 </span>T, <span class="number">3 </span>T, <span class="number">4 </span>T, <span class="number">5 </span>T, <span class="number">6 </span>T, <span class="number">7 </span>T); +<span class="macro">make_binary_streamable_array!</span>( <span class="number">9</span>, <span class="number">0 </span>T, <span class="number">1 </span>T, <span class="number">2 </span>T, <span class="number">3 </span>T, <span class="number">4 </span>T, <span class="number">5 </span>T, <span class="number">6 </span>T, <span class="number">7 </span>T, <span class="number">8 </span>T); +<span class="macro">make_binary_streamable_array!</span>(<span class="number">10</span>, <span class="number">0 </span>T, <span class="number">1 </span>T, <span class="number">2 </span>T, <span class="number">3 </span>T, <span class="number">4 </span>T, <span class="number">5 </span>T, <span class="number">6 </span>T, <span class="number">7 </span>T, <span class="number">8 </span>T, <span class="number">9 </span>T); + +<span class="macro">macro_rules! </span>make_binary_streamable_tuple { + ($(<span class="macro-nonterminal">$idx</span>:tt <span class="macro-nonterminal">$t</span>:ident),+) => { + <span class="kw">impl</span><<span class="lifetime">'bytes</span>, $(<span class="macro-nonterminal">$t</span>,)+> BinaryReadable<<span class="lifetime">'bytes</span>> <span class="kw">for </span>($(<span class="macro-nonterminal">$t</span>,)+) + <span class="kw">where + </span>$(<span class="macro-nonterminal">$t</span>: BinaryReadable<<span class="lifetime">'bytes</span>>,)+ + { + <span class="kw">type </span>Item = ($(<span class="macro-nonterminal">$t::Item</span>,)+); + + <span class="kw">fn </span>from_be_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="prelude-val">Ok</span>(($( + <span class="macro-nonterminal">$t::from_be_stream</span>(stream)<span class="question-mark">?</span>, + )+)) + } + + <span class="kw">fn </span>from_le_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="prelude-val">Ok</span>(($( + <span class="macro-nonterminal">$t::from_le_stream</span>(stream)<span class="question-mark">?</span>, + )+)) + } + + <span class="kw">fn </span>from_ne_stream<In>(stream: <span class="kw-2">&mut </span>In) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="prelude-val">Ok</span>(($( + <span class="macro-nonterminal">$t::from_ne_stream</span>(stream)<span class="question-mark">?</span>, + )+)) + } + } + + <span class="kw">impl</span><$(<span class="macro-nonterminal">$t</span>,)+> BinaryWriteable <span class="kw">for </span>($(<span class="macro-nonterminal">$t</span>,)+) + <span class="kw">where + </span>$( + <span class="macro-nonterminal">$t</span>: BinaryWriteable, + <<span class="macro-nonterminal">$t </span><span class="kw">as </span>BinaryWriteable>::Item: Sized, + )+ + { + <span class="kw">type </span>Item = ($(<span class="macro-nonterminal">$t::Item</span>,)+); + + <span class="kw">fn </span>to_be_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + $( + <span class="macro-nonterminal">$t::to_be_stream</span>(stream, <span class="kw-2">&</span>item.<span class="macro-nonterminal">$idx</span>)<span class="question-mark">?</span>; + )+ + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>to_le_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + $( + <span class="macro-nonterminal">$t::to_le_stream</span>(stream, <span class="kw-2">&</span>item.<span class="macro-nonterminal">$idx</span>)<span class="question-mark">?</span>; + )+ + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>to_ne_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + $( + <span class="macro-nonterminal">$t::to_ne_stream</span>(stream, <span class="kw-2">&</span>item.<span class="macro-nonterminal">$idx</span>)<span class="question-mark">?</span>; + )+ + <span class="prelude-val">Ok</span>(()) + } + } + }; +} + +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1, <span class="number">2 </span>T2); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1, <span class="number">2 </span>T2, <span class="number">3 </span>T3); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1, <span class="number">2 </span>T2, <span class="number">3 </span>T3, <span class="number">4 </span>T4); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1, <span class="number">2 </span>T2, <span class="number">3 </span>T3, <span class="number">4 </span>T4, <span class="number">5 </span>T5); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1, <span class="number">2 </span>T2, <span class="number">3 </span>T3, <span class="number">4 </span>T4, <span class="number">5 </span>T5, <span class="number">6 </span>T6); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1, <span class="number">2 </span>T2, <span class="number">3 </span>T3, <span class="number">4 </span>T4, <span class="number">5 </span>T5, <span class="number">6 </span>T6, <span class="number">7 </span>T7); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1, <span class="number">2 </span>T2, <span class="number">3 </span>T3, <span class="number">4 </span>T4, <span class="number">5 </span>T5, <span class="number">6 </span>T6, <span class="number">7 </span>T7, <span class="number">8 </span>T8); +<span class="macro">make_binary_streamable_tuple!</span>(<span class="number">0 </span>T0, <span class="number">1 </span>T1, <span class="number">2 </span>T2, <span class="number">3 </span>T3, <span class="number">4 </span>T4, <span class="number">5 </span>T5, <span class="number">6 </span>T6, <span class="number">7 </span>T7, <span class="number">8 </span>T8, <span class="number">9 </span>T9); + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>Sink<<span class="lifetime">'stream</span>, Out> +<span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, +{ + stream: <span class="kw-2">&</span><span class="lifetime">'stream </span><span class="kw-2">mut </span>Out, +} + +<span class="kw">impl</span><<span class="lifetime">'stream</span>, Out> Sink<<span class="lifetime">'stream</span>, Out> +<span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, +{ + <span class="attr">#[must_use] + </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>new(stream: <span class="kw-2">&</span><span class="lifetime">'stream </span><span class="kw-2">mut </span>Out) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ stream } + } + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>write<T>(<span class="kw-2">&mut </span><span class="self">self</span>, item: <span class="kw-2">&</span>T, endian: Endian) -> io::Result<()> + <span class="kw">where + </span>T: BinaryWriteable<Item = T>, + { + T::to_stream(<span class="self">self</span>, item, endian) + } + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>write_protocol<T>(<span class="kw-2">&mut </span><span class="self">self</span>, item: <span class="kw-2">&</span>T::Item, endian: Endian) -> io::Result<()> + <span class="kw">where + </span>T: BinaryWriteable, + { + T::to_stream(<span class="self">self</span>, item, endian) + } + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>write_bytes(<span class="kw-2">&mut </span><span class="self">self</span>, bytes: <span class="kw-2">&</span>[u8]) -> io::Result<()> { + <span class="self">self</span>.stream.write_all(bytes) + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/lib.rs.html b/src/ba2/lib.rs.html new file mode 100644 index 0000000..aac79b9 --- /dev/null +++ b/src/ba2/lib.rs.html @@ -0,0 +1,191 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/lib.rs`."><title>lib.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +</pre></div><pre class="rust"><code><span class="doccomment">//! Archives come in various flavors, and the specific variant you'll need to use depends on which game you're working with. Learn more by choosing one of [`tes3`], [`tes4`], or [`fo4`]. +//! +//! If you are uncertain of the origins of your archive, then you may use [`guess_format`] to find a starting point. +//! +//! # A note on strings +//! The Creation Engine absolutely does not handle unicode correctly, and even has some nasty, extant bugs which exist related to characters that utilize the extended ascii range. As such, all strings are marked as binary strings, without encoding (see also [`BStr`] or [`BString`]). If you must re-encode strings, then, generally speaking, they are encoded using the system code page of whatever computer happened to write the archive. That means English copies of the game are encoded using Windows-1252, Russian copies using Windows-1251, etc. However, this is not a guarantee and is the source of much consternation when writing internationalized applications for the Creation Engine games. + +</span><span class="attr">#![warn( + clippy::pedantic, + clippy::single_char_lifetime_names, + clippy::std_instead_of_core +)] +#![allow( + unknown_lints, + clippy::enum_glob_use, + clippy::missing_errors_doc, + clippy::struct_field_names +)] + +</span><span class="kw">mod </span>cc; +<span class="kw">mod </span>containers; +<span class="kw">mod </span>derive; +<span class="kw">pub mod </span>fo4; +<span class="kw">mod </span>guess; +<span class="kw">mod </span>hashing; +<span class="kw">mod </span>io; +<span class="kw">mod </span>protocols; +<span class="kw">pub mod </span>tes3; +<span class="kw">pub mod </span>tes4; + +<span class="kw">pub use </span>guess::{guess_format, FileFormat}; + +<span class="doccomment">/// Makes a shallow copy of the input. +/// +/// The lifetime of the result is tied to the input buffer. +</span><span class="kw">pub struct </span>Borrowed<<span class="lifetime">'borrow</span>>(<span class="kw">pub </span><span class="kw-2">&</span><span class="lifetime">'borrow </span>[u8]); + +<span class="doccomment">/// Makes a deep copy of the input. +/// +/// The lifetime of the result is independent of the input buffer. +</span><span class="kw">pub struct </span>Copied<<span class="lifetime">'copy</span>>(<span class="kw">pub </span><span class="kw-2">&</span><span class="lifetime">'copy </span>[u8]); + +<span class="kw">mod </span>private { + <span class="kw">pub trait </span>Sealed {} +} + +<span class="kw">use </span>private::Sealed; + +<span class="doccomment">/// A trait that enables reading from various sources. +</span><span class="kw">pub trait </span>Reader<T>: Sealed { + <span class="kw">type </span>Error; + <span class="kw">type </span>Item; + + <span class="doccomment">/// Reads an instance of `Self::Item` from the given source. + </span><span class="kw">fn </span>read(source: T) -> core::result::Result<<span class="self">Self</span>::Item, <span class="self">Self</span>::Error>; +} + +<span class="doccomment">/// A trait that creates an optionally compressed container using the given value. +</span><span class="kw">pub trait </span>CompressableFrom<T>: Sealed { + <span class="doccomment">/// Makes a compressed instance of `Self` using the given data. + </span><span class="attr">#[must_use] + </span><span class="kw">fn </span>from_compressed(value: T, decompressed_len: usize) -> <span class="self">Self</span>; + + <span class="doccomment">/// Makes a decompressed instance of `Self` using the given data. + </span><span class="attr">#[must_use] + </span><span class="kw">fn </span>from_decompressed(value: T) -> <span class="self">Self</span>; +} + +<span class="doccomment">/// Indicates whether the operation should finish by compressing the data or not. +</span><span class="attr">#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +</span><span class="kw">pub enum </span>CompressionResult { + <span class="doccomment">/// The data will finish in a compressed state. + </span>Compressed, + <span class="doccomment">/// The data will finish in a decompressed state. + </span><span class="attr">#[default] + </span>Decompressed, +} + +<span class="doccomment">/// A trait that enables reading from various sources, with configuration options. +</span><span class="kw">pub trait </span>ReaderWithOptions<T>: Sealed { + <span class="kw">type </span>Error; + <span class="kw">type </span>Item; + <span class="kw">type </span>Options; + + <span class="doccomment">/// Reads an instance of `Self::Item` from the given source, using the given options. + </span><span class="kw">fn </span>read(source: T, options: <span class="kw-2">&</span><span class="self">Self</span>::Options) -> core::result::Result<<span class="self">Self</span>::Item, <span class="self">Self</span>::Error>; +} + +<span class="kw">pub use </span>bstr::{BStr, BString, ByteSlice, ByteVec}; + +<span class="doccomment">/// Convenience using statements for traits that are needed to work with the library. +</span><span class="kw">pub mod </span>prelude { + <span class="kw">pub use crate</span>::{CompressableFrom <span class="kw">as _</span>, Reader <span class="kw">as _</span>, ReaderWithOptions <span class="kw">as _</span>}; +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/protocols.rs.html b/src/ba2/protocols.rs.html new file mode 100644 index 0000000..207ad3b --- /dev/null +++ b/src/ba2/protocols.rs.html @@ -0,0 +1,341 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/protocols.rs`."><title>protocols.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../src-files.js"></script><script defer src="../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + containers::Bytes, + io::{BinaryReadable, BinaryWriteable, Endian, Sink, Source}, +}; +<span class="kw">use </span>bstr::BStr <span class="kw">as </span>ByteStr; +<span class="kw">use </span>core::num::NonZeroU8; +<span class="kw">use </span>std::io::{<span class="self">self</span>, Write}; + +<span class="attr">#[derive(Debug, thiserror::Error)] +</span><span class="kw">enum </span>Error { + <span class="attr">#[error(<span class="string">"postfix null terminator was missing from a string"</span>)] + </span>MissingNullTerminator, + + <span class="attr">#[error(<span class="string">"a string is too large to be written without data loss"</span>)] + </span>StringTooLarge, +} + +<span class="kw">impl </span>From<Error> <span class="kw">for </span>io::Error { + <span class="kw">fn </span>from(value: Error) -> <span class="self">Self </span>{ + <span class="self">Self</span>::new(io::ErrorKind::InvalidData, value) + } +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>BString; + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> BinaryReadable<<span class="lifetime">'bytes</span>> <span class="kw">for </span>BString { + <span class="kw">type </span>Item = Bytes<<span class="lifetime">'bytes</span>>; + + <span class="kw">fn </span>from_stream<In>(stream: <span class="kw-2">&mut </span>In, endian: Endian) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>len: u8 = stream.read(endian)<span class="question-mark">?</span>; + stream.read_bytes(len.into()) + } +} + +<span class="kw">impl </span>BinaryWriteable <span class="kw">for </span>BString { + <span class="kw">type </span>Item = ByteStr; + + <span class="kw">fn </span>to_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item, endian: Endian) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span>len: <span class="prelude-ty">Result</span><u8, <span class="kw">_</span>> = item.len().try_into(); + <span class="kw">match </span>len { + <span class="prelude-val">Ok</span>(len) => { + stream.write(<span class="kw-2">&</span>len, endian)<span class="question-mark">?</span>; + stream.write_bytes(item)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + <span class="prelude-val">Err</span>(<span class="kw">_</span>) => <span class="prelude-val">Err</span>(Error::StringTooLarge.into()), + } + } +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>ZString; + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> BinaryReadable<<span class="lifetime">'bytes</span>> <span class="kw">for </span>ZString { + <span class="kw">type </span>Item = Bytes<<span class="lifetime">'bytes</span>>; + + <span class="kw">fn </span>from_stream<In>(stream: <span class="kw-2">&mut </span>In, endian: Endian) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>start = stream.stream_position(); + <span class="kw">let </span><span class="kw-2">mut </span>len = <span class="number">0</span>; + <span class="kw">loop </span>{ + <span class="kw">let </span>byte: u8 = stream.read(endian)<span class="question-mark">?</span>; + <span class="kw">match </span>byte { + <span class="number">0 </span>=> <span class="kw">break</span>, + <span class="kw">_ </span>=> len += <span class="number">1</span>, + }; + } + + stream.seek_absolute(start)<span class="question-mark">?</span>; + <span class="kw">let </span>result = stream.read_bytes(len)<span class="question-mark">?</span>; + stream.seek_relative(<span class="number">1</span>)<span class="question-mark">?</span>; <span class="comment">// skip null terminator + </span><span class="prelude-val">Ok</span>(result) + } +} + +<span class="kw">impl </span>BinaryWriteable <span class="kw">for </span>ZString { + <span class="kw">type </span>Item = ByteStr; + + <span class="kw">fn </span>to_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item, <span class="kw">_</span>: Endian) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + stream.write_bytes(item)<span class="question-mark">?</span>; + stream.write_bytes(<span class="string">b"\0"</span>)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>BZString; + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> BinaryReadable<<span class="lifetime">'bytes</span>> <span class="kw">for </span>BZString { + <span class="kw">type </span>Item = Bytes<<span class="lifetime">'bytes</span>>; + + <span class="kw">fn </span>from_stream<In>(stream: <span class="kw-2">&mut </span>In, endian: Endian) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>len: u8 = stream.read(endian)<span class="question-mark">?</span>; + <span class="kw">let </span><span class="prelude-val">Some</span>(len) = NonZeroU8::new(len) <span class="kw">else </span>{ + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::MissingNullTerminator.into()); + }; + + <span class="kw">let </span>result = stream.read_bytes((len.get() - <span class="number">1</span>).into())<span class="question-mark">?</span>; + <span class="kw">match </span>stream.read(endian)<span class="question-mark">? </span>{ + <span class="string">b'\0' </span>=> <span class="prelude-val">Ok</span>(result), + <span class="kw">_ </span>=> <span class="prelude-val">Err</span>(Error::MissingNullTerminator.into()), + } + } +} + +<span class="kw">impl </span>BinaryWriteable <span class="kw">for </span>BZString { + <span class="kw">type </span>Item = ByteStr; + + <span class="kw">fn </span>to_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item, endian: Endian) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span>len: <span class="prelude-ty">Result</span><u8, <span class="kw">_</span>> = (item.len() + <span class="number">1</span>).try_into(); + <span class="kw">match </span>len { + <span class="prelude-val">Ok</span>(len) => { + stream.write(<span class="kw-2">&</span>len, endian)<span class="question-mark">?</span>; + stream.write_bytes(item)<span class="question-mark">?</span>; + stream.write_bytes(<span class="string">b"\0"</span>)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + <span class="prelude-val">Err</span>(<span class="kw">_</span>) => <span class="prelude-val">Err</span>(Error::StringTooLarge.into()), + } + } +} + +<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>WString; + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> BinaryReadable<<span class="lifetime">'bytes</span>> <span class="kw">for </span>WString { + <span class="kw">type </span>Item = Bytes<<span class="lifetime">'bytes</span>>; + + <span class="kw">fn </span>from_stream<In>(stream: <span class="kw-2">&mut </span>In, endian: Endian) -> io::Result<<span class="self">Self</span>::Item> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>len: u16 = stream.read(endian)<span class="question-mark">?</span>; + stream.read_bytes(len.into()) + } +} + +<span class="kw">impl </span>BinaryWriteable <span class="kw">for </span>WString { + <span class="kw">type </span>Item = ByteStr; + + <span class="kw">fn </span>to_stream<Out>(stream: <span class="kw-2">&mut </span>Sink<Out>, item: <span class="kw-2">&</span><span class="self">Self</span>::Item, endian: Endian) -> io::Result<()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span>len: <span class="prelude-ty">Result</span><u16, <span class="kw">_</span>> = item.len().try_into(); + <span class="kw">match </span>len { + <span class="prelude-val">Ok</span>(len) => { + stream.write(<span class="kw-2">&</span>len, endian)<span class="question-mark">?</span>; + stream.write_bytes(item)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + <span class="prelude-val">Err</span>(<span class="kw">_</span>) => <span class="prelude-val">Err</span>(Error::StringTooLarge.into()), + } + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes3/archive.rs.html b/src/ba2/tes3/archive.rs.html new file mode 100644 index 0000000..ae4ca9c --- /dev/null +++ b/src/ba2/tes3/archive.rs.html @@ -0,0 +1,847 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes3/archive.rs`."><title>archive.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +<a href="#285" id="285">285</a> +<a href="#286" id="286">286</a> +<a href="#287" id="287">287</a> +<a href="#288" id="288">288</a> +<a href="#289" id="289">289</a> +<a href="#290" id="290">290</a> +<a href="#291" id="291">291</a> +<a href="#292" id="292">292</a> +<a href="#293" id="293">293</a> +<a href="#294" id="294">294</a> +<a href="#295" id="295">295</a> +<a href="#296" id="296">296</a> +<a href="#297" id="297">297</a> +<a href="#298" id="298">298</a> +<a href="#299" id="299">299</a> +<a href="#300" id="300">300</a> +<a href="#301" id="301">301</a> +<a href="#302" id="302">302</a> +<a href="#303" id="303">303</a> +<a href="#304" id="304">304</a> +<a href="#305" id="305">305</a> +<a href="#306" id="306">306</a> +<a href="#307" id="307">307</a> +<a href="#308" id="308">308</a> +<a href="#309" id="309">309</a> +<a href="#310" id="310">310</a> +<a href="#311" id="311">311</a> +<a href="#312" id="312">312</a> +<a href="#313" id="313">313</a> +<a href="#314" id="314">314</a> +<a href="#315" id="315">315</a> +<a href="#316" id="316">316</a> +<a href="#317" id="317">317</a> +<a href="#318" id="318">318</a> +<a href="#319" id="319">319</a> +<a href="#320" id="320">320</a> +<a href="#321" id="321">321</a> +<a href="#322" id="322">322</a> +<a href="#323" id="323">323</a> +<a href="#324" id="324">324</a> +<a href="#325" id="325">325</a> +<a href="#326" id="326">326</a> +<a href="#327" id="327">327</a> +<a href="#328" id="328">328</a> +<a href="#329" id="329">329</a> +<a href="#330" id="330">330</a> +<a href="#331" id="331">331</a> +<a href="#332" id="332">332</a> +<a href="#333" id="333">333</a> +<a href="#334" id="334">334</a> +<a href="#335" id="335">335</a> +<a href="#336" id="336">336</a> +<a href="#337" id="337">337</a> +<a href="#338" id="338">338</a> +<a href="#339" id="339">339</a> +<a href="#340" id="340">340</a> +<a href="#341" id="341">341</a> +<a href="#342" id="342">342</a> +<a href="#343" id="343">343</a> +<a href="#344" id="344">344</a> +<a href="#345" id="345">345</a> +<a href="#346" id="346">346</a> +<a href="#347" id="347">347</a> +<a href="#348" id="348">348</a> +<a href="#349" id="349">349</a> +<a href="#350" id="350">350</a> +<a href="#351" id="351">351</a> +<a href="#352" id="352">352</a> +<a href="#353" id="353">353</a> +<a href="#354" id="354">354</a> +<a href="#355" id="355">355</a> +<a href="#356" id="356">356</a> +<a href="#357" id="357">357</a> +<a href="#358" id="358">358</a> +<a href="#359" id="359">359</a> +<a href="#360" id="360">360</a> +<a href="#361" id="361">361</a> +<a href="#362" id="362">362</a> +<a href="#363" id="363">363</a> +<a href="#364" id="364">364</a> +<a href="#365" id="365">365</a> +<a href="#366" id="366">366</a> +<a href="#367" id="367">367</a> +<a href="#368" id="368">368</a> +<a href="#369" id="369">369</a> +<a href="#370" id="370">370</a> +<a href="#371" id="371">371</a> +<a href="#372" id="372">372</a> +<a href="#373" id="373">373</a> +<a href="#374" id="374">374</a> +<a href="#375" id="375">375</a> +<a href="#376" id="376">376</a> +<a href="#377" id="377">377</a> +<a href="#378" id="378">378</a> +<a href="#379" id="379">379</a> +<a href="#380" id="380">380</a> +<a href="#381" id="381">381</a> +<a href="#382" id="382">382</a> +<a href="#383" id="383">383</a> +<a href="#384" id="384">384</a> +<a href="#385" id="385">385</a> +<a href="#386" id="386">386</a> +<a href="#387" id="387">387</a> +<a href="#388" id="388">388</a> +<a href="#389" id="389">389</a> +<a href="#390" id="390">390</a> +<a href="#391" id="391">391</a> +<a href="#392" id="392">392</a> +<a href="#393" id="393">393</a> +<a href="#394" id="394">394</a> +<a href="#395" id="395">395</a> +<a href="#396" id="396">396</a> +<a href="#397" id="397">397</a> +<a href="#398" id="398">398</a> +<a href="#399" id="399">399</a> +<a href="#400" id="400">400</a> +<a href="#401" id="401">401</a> +<a href="#402" id="402">402</a> +<a href="#403" id="403">403</a> +<a href="#404" id="404">404</a> +<a href="#405" id="405">405</a> +<a href="#406" id="406">406</a> +<a href="#407" id="407">407</a> +<a href="#408" id="408">408</a> +<a href="#409" id="409">409</a> +<a href="#410" id="410">410</a> +<a href="#411" id="411">411</a> +<a href="#412" id="412">412</a> +<a href="#413" id="413">413</a> +<a href="#414" id="414">414</a> +<a href="#415" id="415">415</a> +<a href="#416" id="416">416</a> +<a href="#417" id="417">417</a> +<a href="#418" id="418">418</a> +<a href="#419" id="419">419</a> +<a href="#420" id="420">420</a> +<a href="#421" id="421">421</a> +<a href="#422" id="422">422</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + containers::Bytes, + derive, + io::{Endian, Sink, Source}, + protocols::ZString, + tes3::{<span class="self">self</span>, Error, File, FileHash, Hash, <span class="prelude-ty">Result</span>}, +}; +<span class="kw">use </span>bstr::BString; +<span class="kw">use </span>std::io::Write; + +<span class="kw">mod </span>constants { + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>FILE_ENTRY_SIZE: usize = <span class="number">0x8</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>HASH_SIZE: usize = <span class="number">0x8</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>HEADER_MAGIC: u32 = <span class="number">0x100</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>HEADER_SIZE: usize = <span class="number">0xC</span>; +} + +<span class="kw">struct </span>Offsets { + name_offsets: usize, + names: usize, + hashes: usize, + file_data: usize, +} + +<span class="kw">struct </span>Header { + hash_offset: u32, + file_count: u32, +} + +<span class="kw">impl </span>Header { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>compute_offsets(<span class="kw-2">&</span><span class="self">self</span>) -> Offsets { + <span class="kw">let </span>file_count = <span class="self">self</span>.file_count <span class="kw">as </span>usize; + <span class="kw">let </span>name_offsets = constants::HEADER_SIZE + constants::FILE_ENTRY_SIZE * file_count; + <span class="kw">let </span>names = name_offsets + <span class="number">0x4 </span>* file_count; + <span class="kw">let </span>hashes = constants::HEADER_SIZE + <span class="self">self</span>.hash_offset <span class="kw">as </span>usize; + <span class="kw">let </span>file_data = hashes + constants::HASH_SIZE * file_count; + Offsets { + name_offsets, + names, + hashes, + file_data, + } + } +} + +<span class="macro">derive::key!</span>(Key: FileHash); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Key<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>hash_in_place(name: <span class="kw-2">&mut </span>BString) -> FileHash { + tes3::hash_file_in_place(name) + } +} + +<span class="kw">type </span>ReadResult<T> = T; +<span class="macro">derive::archive! </span>{ + <span class="doccomment">/// Represents the TES3 revision of the bsa format. + </span>Archive => ReadResult + Map: (Key: FileHash) => File +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Archive<<span class="lifetime">'bytes</span>> { + <span class="kw">pub fn </span>write<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>sink = Sink::new(stream); + <span class="kw">let </span>header = <span class="self">self</span>.make_header()<span class="question-mark">?</span>; + <span class="self">Self</span>::write_header(<span class="kw-2">&mut </span>sink, <span class="kw-2">&</span>header)<span class="question-mark">?</span>; + <span class="self">self</span>.write_files(<span class="kw-2">&mut </span>sink)<span class="question-mark">?</span>; + <span class="self">self</span>.write_name_offsets(<span class="kw-2">&mut </span>sink)<span class="question-mark">?</span>; + <span class="self">self</span>.write_names(<span class="kw-2">&mut </span>sink)<span class="question-mark">?</span>; + <span class="self">self</span>.write_hashes(<span class="kw-2">&mut </span>sink)<span class="question-mark">?</span>; + <span class="self">self</span>.write_file_data(<span class="kw-2">&mut </span>sink)<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>make_header(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="prelude-ty">Result</span><Header> { + <span class="prelude-val">Ok</span>(Header { + file_count: <span class="self">self</span>.map.len().try_into()<span class="question-mark">?</span>, + hash_offset: { + <span class="kw">let </span>names_offset = <span class="number">0xC </span>* <span class="self">self</span>.map.len(); + <span class="kw">let </span>names_len: usize = <span class="self">self</span>.map.keys().map(|x| x.name().len() + <span class="number">1</span>).sum(); + (names_offset + names_len).try_into()<span class="question-mark">? + </span>}, + }) + } + + <span class="kw">fn </span>write_files<Out>(<span class="kw-2">&</span><span class="self">self</span>, sink: <span class="kw-2">&mut </span>Sink<Out>) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>offset: u32 = <span class="number">0</span>; + <span class="kw">for </span>file <span class="kw">in </span><span class="self">self</span>.map.values() { + <span class="kw">let </span>size: u32 = file.bytes.len().try_into()<span class="question-mark">?</span>; + sink.write(<span class="kw-2">&</span>(size, offset), Endian::Little)<span class="question-mark">?</span>; + offset += size; + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_file_data<Out>(<span class="kw-2">&</span><span class="self">self</span>, sink: <span class="kw-2">&mut </span>Sink<Out>) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">for </span>file <span class="kw">in </span><span class="self">self</span>.map.values() { + sink.write_bytes(file.as_bytes())<span class="question-mark">?</span>; + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_hashes<Out>(<span class="kw-2">&</span><span class="self">self</span>, sink: <span class="kw-2">&mut </span>Sink<Out>) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">for </span>key <span class="kw">in </span><span class="self">self</span>.map.keys() { + <span class="kw">let </span>hash = <span class="kw-2">&</span>key.hash(); + sink.write(<span class="kw-2">&</span>(hash.lo, hash.hi), Endian::Little)<span class="question-mark">?</span>; + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_header<Out>(sink: <span class="kw-2">&mut </span>Sink<Out>, header: <span class="kw-2">&</span>Header) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + sink.write( + <span class="kw-2">&</span>( + constants::HEADER_MAGIC, + header.hash_offset, + header.file_count, + ), + Endian::Little, + )<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_name_offsets<Out>(<span class="kw-2">&</span><span class="self">self</span>, sink: <span class="kw-2">&mut </span>Sink<Out>) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>offset: u32 = <span class="number">0</span>; + <span class="kw">for </span>key <span class="kw">in </span><span class="self">self</span>.map.keys() { + sink.write(<span class="kw-2">&</span>offset, Endian::Little)<span class="question-mark">?</span>; + offset += u32::try_from(key.name().len() + <span class="number">1</span>)<span class="question-mark">?</span>; + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_names<Out>(<span class="kw-2">&</span><span class="self">self</span>, sink: <span class="kw-2">&mut </span>Sink<Out>) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">for </span>key <span class="kw">in </span><span class="self">self</span>.map.keys() { + sink.write_protocol::<ZString>(key.name(), Endian::Little)<span class="question-mark">?</span>; + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>do_read<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><ReadResult<<span class="self">Self</span>>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>header = <span class="self">Self</span>::read_header(source)<span class="question-mark">?</span>; + <span class="kw">let </span>offsets = header.compute_offsets(); + <span class="kw">let </span><span class="kw-2">mut </span>map = Map::default(); + + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..header.file_count <span class="kw">as </span>usize { + <span class="kw">let </span>(key, value) = <span class="self">Self</span>::read_file(source, i, <span class="kw-2">&</span>offsets)<span class="question-mark">?</span>; + map.insert(key, value); + } + + <span class="prelude-val">Ok</span>(<span class="self">Self </span>{ map }) + } + + <span class="kw">fn </span>read_file<In>( + source: <span class="kw-2">&mut </span>In, + idx: usize, + offsets: <span class="kw-2">&</span>Offsets, + ) -> <span class="prelude-ty">Result</span><(Key<<span class="lifetime">'bytes</span>>, File<<span class="lifetime">'bytes</span>>)> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>hash = source.save_restore_position(|source| -> <span class="prelude-ty">Result</span><Hash> { + source.seek_absolute(offsets.hashes + constants::HASH_SIZE * idx)<span class="question-mark">?</span>; + <span class="self">Self</span>::read_hash(source) + })<span class="question-mark">??</span>; + + <span class="kw">let </span>name = source.save_restore_position(|source| -> <span class="prelude-ty">Result</span><Bytes<<span class="lifetime">'bytes</span>>> { + source.seek_absolute(offsets.name_offsets + <span class="number">0x4 </span>* idx)<span class="question-mark">?</span>; + <span class="kw">let </span>offset: u32 = source.read(Endian::Little)<span class="question-mark">?</span>; + source.seek_absolute(offsets.names + offset <span class="kw">as </span>usize)<span class="question-mark">?</span>; + <span class="kw">let </span>name = source.read_protocol::<ZString>(Endian::Little)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(name) + })<span class="question-mark">??</span>; + + <span class="kw">let </span>(size, offset): (u32, u32) = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="kw">let </span>container = source.save_restore_position(|source| -> <span class="prelude-ty">Result</span><Bytes<<span class="lifetime">'bytes</span>>> { + source.seek_absolute(offsets.file_data + offset <span class="kw">as </span>usize)<span class="question-mark">?</span>; + <span class="kw">let </span>result = source.read_bytes(size <span class="kw">as </span>usize)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(result) + })<span class="question-mark">??</span>; + + <span class="prelude-val">Ok</span>(( + Key { + hash: hash.into(), + name, + }, + File { bytes: container }, + )) + } + + <span class="kw">fn </span>read_hash<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><Hash> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>(lo, hi) = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(Hash { lo, hi }) + } + + <span class="kw">fn </span>read_header<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><Header> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>(magic, hash_offset, file_count) = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="kw">match </span>magic { + constants::HEADER_MAGIC => <span class="prelude-val">Ok</span>(Header { + hash_offset, + file_count, + }), + <span class="kw">_ </span>=> <span class="prelude-val">Err</span>(Error::InvalidMagic(magic)), + } + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use crate</span>::{ + prelude::<span class="kw-2">*</span>, + tes3::{Archive, ArchiveKey, Error, File, FileHash, Hash}, + Borrowed, + }; + <span class="kw">use </span>anyhow::Context <span class="kw">as _</span>; + <span class="kw">use </span>bstr::BString; + <span class="kw">use </span>memmap2::Mmap; + <span class="kw">use </span>std::{ + ffi::OsStr, + fs, + io::{<span class="self">self</span>, Read <span class="kw">as _</span>}, + path::Path, + }; + <span class="kw">use </span>walkdir::WalkDir; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() -> anyhow::Result<()> { + <span class="kw">let </span>bsa = Archive::new(); + <span class="macro">assert!</span>(bsa.is_empty()); + <span class="macro">assert!</span>(bsa.len() == <span class="number">0</span>); + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_magic() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/tes3_invalid_test/invalid_magic.bsa"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidMagic(<span class="number">0x200</span>)) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(err.into()), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_out_of_bounds() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/tes3_invalid_test/invalid_exhausted.bsa"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::Io(io)) => { + <span class="macro">assert_eq!</span>(io.kind(), io::ErrorKind::UnexpectedEof); + <span class="prelude-val">Ok</span>(()) + } + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(err.into()), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>reading() -> anyhow::Result<()> { + <span class="kw">let </span>root_path = Path::new(<span class="string">"data/tes3_read_test/"</span>); + <span class="kw">let </span>archive = { + <span class="kw">let </span>archive_path = root_path.join(<span class="string">"test.bsa"</span>); + Archive::read(archive_path.as_path()) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to read from archive: {archive_path:?}"</span>))<span class="question-mark">? + </span>}; + + <span class="kw">for </span>file_path <span class="kw">in </span>WalkDir::new(root_path) { + <span class="kw">if let </span><span class="prelude-val">Ok</span>(file_path) = file_path { + <span class="kw">let </span>metadata = file_path + .metadata() + .context(<span class="string">"failed to get file path metadata"</span>)<span class="question-mark">?</span>; + <span class="kw">if </span>metadata.is_file() && file_path.path().extension() != <span class="prelude-val">Some</span>(OsStr::new(<span class="string">"bsa"</span>)) { + <span class="kw">let </span>key = file_path + .path() + .strip_prefix(root_path) + .with_context(|| { + <span class="macro">format!</span>( + <span class="string">"failed to strip prefix ({root_path:?}) from path ({file_path:?})" + </span>) + })<span class="question-mark">? + </span>.as_os_str(); + <span class="kw">let </span>file = archive + .get(<span class="kw-2">&</span>ArchiveKey::from(key.as_encoded_bytes())) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get file with key: {key:?}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(file.len() <span class="kw">as </span>u64, metadata.len()); + + <span class="kw">let </span><span class="kw-2">mut </span>original_data = Vec::new(); + fs::File::open(file_path.path()) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {file_path:?}"</span>))<span class="question-mark">? + </span>.read_to_end(<span class="kw-2">&mut </span>original_data) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to read from file: {file_path:?}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(file.as_bytes(), <span class="kw-2">&</span>original_data[..]); + } + } + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>writing() -> anyhow::Result<()> { + <span class="kw">struct </span>Info { + key: ArchiveKey<<span class="lifetime">'static</span>>, + path: <span class="kw-2">&</span><span class="lifetime">'static </span>Path, + } + + <span class="kw">impl </span>Info { + <span class="kw">fn </span>new(lo: u32, hi: u32, path: <span class="kw-2">&</span><span class="lifetime">'static </span>str) -> <span class="self">Self </span>{ + <span class="kw">let </span>hash = Hash { lo, hi }; + <span class="kw">let </span>key = ArchiveKey::from(path); + <span class="macro">assert_eq!</span>(<span class="kw-2">&</span>hash, key.hash()); + <span class="self">Self </span>{ + key, + path: Path::new(path), + } + } + } + + <span class="kw">let </span>infos = [ + Info::new(<span class="number">0x0C18356B</span>, <span class="number">0xA578DB74</span>, <span class="string">"Tiles/tile_0001.png"</span>), + Info::new(<span class="number">0x1B0D3416</span>, <span class="number">0xF5D5F30E</span>, <span class="string">"Share/License.txt"</span>), + Info::new(<span class="number">0x1B3B140A</span>, <span class="number">0x07B36E53</span>, <span class="string">"Background/background_middle.png"</span>), + Info::new(<span class="number">0x29505413</span>, <span class="number">0x1EB4CED7</span>, <span class="string">"Construct 3/Pixel Platformer.c3p"</span>), + Info::new(<span class="number">0x4B7D031B</span>, <span class="number">0xD4701AD4</span>, <span class="string">"Tilemap/characters_packed.png"</span>), + Info::new(<span class="number">0x74491918</span>, <span class="number">0x2BEBCD0A</span>, <span class="string">"Characters/character_0001.png"</span>), + ]; + + <span class="kw">let </span>mmapped = { + <span class="kw">let </span><span class="kw-2">mut </span>result = Vec::<Mmap>::new(); + <span class="kw">for </span>info <span class="kw">in </span><span class="kw-2">&</span>infos { + <span class="kw">let </span>file_path = Path::new(<span class="string">"data/tes3_write_test/data"</span>).join(info.path); + <span class="kw">let </span>fd = fs::File::open(file_path.clone()) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {file_path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>file = <span class="kw">unsafe </span>{ + Mmap::map(<span class="kw-2">&</span>fd) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to memory map file: {file_path:?}"</span>))<span class="question-mark">? + </span>}; + result.push(file); + } + result + }; + + <span class="kw">let </span>stream = { + <span class="kw">let </span><span class="kw-2">mut </span>archive = Archive::new(); + <span class="kw">for </span>(data, info) <span class="kw">in </span>mmapped.iter().zip(<span class="kw-2">&</span>infos) { + <span class="kw">let </span>file: File = data[..].into(); + <span class="macro">assert!</span>(archive.insert(info.key.clone(), file).is_none()); + } + <span class="kw">let </span><span class="kw-2">mut </span>result = Vec::<u8>::new(); + archive + .write(<span class="kw-2">&mut </span>result) + .context(<span class="string">"failed to write test archive to memory"</span>)<span class="question-mark">?</span>; + result + }; + + <span class="kw">let </span>archive = + Archive::read(Borrowed(<span class="kw-2">&</span>stream)).context(<span class="string">"failed to read from archive in memory"</span>)<span class="question-mark">?</span>; + <span class="kw">for </span>(data, info) <span class="kw">in </span>mmapped.iter().zip(<span class="kw-2">&</span>infos) { + <span class="kw">let </span>file = archive.get(info.key.hash()).with_context(|| { + <span class="macro">format!</span>(<span class="string">"failed to get value from archive with key: {:?}"</span>, info.path) + })<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(file.as_bytes(), <span class="kw-2">&</span>data[..]); + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>assert_generic_interfaces_compile() -> anyhow::Result<()> { + <span class="kw">let </span><span class="kw-2">mut </span>bsa = Archive::default(); + <span class="kw">let </span>key = ArchiveKey::default(); + <span class="kw">let </span>hash = FileHash::default(); + + <span class="kw">_ </span>= bsa.get(<span class="kw-2">&</span>key); + <span class="kw">_ </span>= bsa.get(<span class="kw-2">&</span>hash); + + <span class="kw">_ </span>= bsa.remove(<span class="kw-2">&</span>key); + <span class="kw">_ </span>= bsa.remove(<span class="kw-2">&</span>hash); + + <span class="kw">_ </span>= bsa.remove_entry(<span class="kw-2">&</span>key); + <span class="kw">_ </span>= bsa.remove_entry(<span class="kw-2">&</span>hash); + + <span class="kw">_ </span>= bsa.insert(key, Default::default()); + <span class="kw">_ </span>= bsa.insert(BString::default(), Default::default()); + + <span class="prelude-val">Ok</span>(()) + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes3/file.rs.html b/src/ba2/tes3/file.rs.html new file mode 100644 index 0000000..4a81df4 --- /dev/null +++ b/src/ba2/tes3/file.rs.html @@ -0,0 +1,147 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes3/file.rs`."><title>file.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + containers::Bytes, + derive, + io::Source, + tes3::{Error, <span class="prelude-ty">Result</span>}, +}; +<span class="kw">use </span>std::io::Write; + +<span class="doccomment">/// Represents a file within the TES3 virtual filesystem. +</span><span class="attr">#[derive(Clone, Debug, Default)] +</span><span class="kw">pub struct </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">pub</span>(<span class="kw">crate</span>) bytes: Bytes<<span class="lifetime">'bytes</span>>, +} + +<span class="kw">type </span>ReadResult<T> = T; +<span class="macro">derive::bytes!</span>(File); +<span class="macro">derive::reader!</span>(File => ReadResult); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> File<<span class="lifetime">'bytes</span>> { + <span class="kw">pub fn </span>write<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + stream.write_all(<span class="self">self</span>.as_bytes())<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[allow(clippy::unnecessary_wraps)] + </span><span class="kw">fn </span>do_read<In>(stream: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><ReadResult<<span class="self">Self</span>>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="prelude-val">Ok</span>(<span class="self">Self </span>{ + bytes: stream.read_bytes_to_end(), + }) + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>, <span class="kw">const </span>N: usize> From<<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8; N]> <span class="kw">for </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8; N]) -> <span class="self">Self </span>{ + <span class="self">Self</span>::from(value.as_slice()) + } +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> From<<span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]> <span class="kw">for </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span><span class="lifetime">'bytes </span>[u8]) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + bytes: Bytes::from_borrowed(value), + } + } +} + +<span class="kw">impl </span>From<Box<[u8]>> <span class="kw">for </span>File<<span class="lifetime">'static</span>> { + <span class="kw">fn </span>from(value: Box<[u8]>) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + bytes: Bytes::from_owned(value), + } + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">crate</span>::tes3::File; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() { + <span class="kw">let </span>f = File::new(); + <span class="macro">assert!</span>(f.is_empty()); + <span class="macro">assert!</span>(f.len() == <span class="number">0</span>); + <span class="macro">assert!</span>(f.as_bytes().is_empty()); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes3/hashing.rs.html b/src/ba2/tes3/hashing.rs.html new file mode 100644 index 0000000..55a2a3f --- /dev/null +++ b/src/ba2/tes3/hashing.rs.html @@ -0,0 +1,275 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes3/hashing.rs`."><title>hashing.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{derive, hashing}; +<span class="kw">use </span>bstr::{BStr, BString}; +<span class="kw">use </span>core::cmp::Ordering; + +<span class="doccomment">/// The underlying hash object used to uniquely identify objects within the archive. +</span><span class="attr">#[derive(Clone, Copy, Debug, Default)] +#[repr(C)] +</span><span class="kw">pub struct </span>Hash { + <span class="kw">pub </span>lo: u32, + <span class="kw">pub </span>hi: u32, +} + +<span class="macro">derive::hash!</span>(FileHash); + +<span class="kw">impl </span>Hash { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + + <span class="attr">#[allow(clippy::identity_op, clippy::erasing_op)] + #[must_use] + </span><span class="kw">pub fn </span>numeric(<span class="kw-2">&</span><span class="self">self</span>) -> u64 { + (u64::from(<span class="self">self</span>.hi) << (<span class="number">0 </span>* <span class="number">8</span>)) | (u64::from(<span class="self">self</span>.lo) << (<span class="number">4 </span>* <span class="number">8</span>)) + } +} + +<span class="kw">impl </span>PartialEq <span class="kw">for </span>Hash { + <span class="kw">fn </span>eq(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> bool { + <span class="self">self</span>.numeric() == other.numeric() + } +} + +<span class="kw">impl </span>Eq <span class="kw">for </span>Hash {} + +<span class="kw">impl </span>PartialOrd <span class="kw">for </span>Hash { + <span class="kw">fn </span>partial_cmp(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> <span class="prelude-ty">Option</span><Ordering> { + <span class="prelude-val">Some</span>(<span class="self">self</span>.cmp(other)) + } +} + +<span class="kw">impl </span>Ord <span class="kw">for </span>Hash { + <span class="kw">fn </span>cmp(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> Ordering { + <span class="self">self</span>.numeric().cmp(<span class="kw-2">&</span>other.numeric()) + } +} + +<span class="doccomment">/// Produces a hash using the given path. +</span><span class="attr">#[must_use] +</span><span class="kw">pub fn </span>hash_file(path: <span class="kw-2">&</span>BStr) -> (FileHash, BString) { + <span class="kw">let </span><span class="kw-2">mut </span>path = path.to_owned(); + (hash_file_in_place(<span class="kw-2">&mut </span>path), path) +} + +<span class="doccomment">/// Produces a hash using the given path. +/// +/// The path is normalized in place. After the function returns, the path contains the string that would be stored on disk. +</span><span class="attr">#[must_use] +</span><span class="kw">pub fn </span>hash_file_in_place(path: <span class="kw-2">&mut </span>BString) -> FileHash { + hashing::normalize_path(path); + <span class="kw">let </span>midpoint = path.len() / <span class="number">2</span>; + <span class="kw">let </span><span class="kw-2">mut </span>h = Hash::new(); + <span class="kw">let </span><span class="kw-2">mut </span>i: usize = <span class="number">0</span>; + + <span class="comment">// rotate between first 4 bytes + </span><span class="kw">while </span>i < midpoint { + h.lo ^= u32::from(path[i]) << ((i % <span class="number">4</span>) * <span class="number">8</span>); + i += <span class="number">1</span>; + } + + <span class="comment">// rotate between last 4 bytes + </span><span class="kw">while </span>i < path.len() { + <span class="kw">let </span>rot = u32::from(path[i]) << (((i - midpoint) % <span class="number">4</span>) * <span class="number">8</span>); + h.hi = u32::rotate_right(h.hi ^ rot, rot); + i += <span class="number">1</span>; + } + + h.into() +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">crate</span>::tes3::{<span class="self">self</span>, Hash}; + <span class="kw">use </span>bstr::ByteSlice <span class="kw">as _</span>; + + <span class="attr">#[test] + </span><span class="kw">fn </span>hashes_start_empty() { + <span class="kw">let </span>h: Hash = Default::default(); + <span class="macro">assert_eq!</span>(h.lo, <span class="number">0</span>); + <span class="macro">assert_eq!</span>(h.hi, <span class="number">0</span>); + <span class="macro">assert_eq!</span>(h.numeric(), <span class="number">0</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>validate_hashing() { + <span class="kw">let </span>hash = |x: <span class="kw-2">&</span>[u8]| tes3::hash_file(x.as_bstr()).<span class="number">0</span>.numeric(); + <span class="macro">assert_eq!</span>( + hash(<span class="string">b"meshes/c/artifact_bloodring_01.nif"</span>), + <span class="number">0x1C3C1149920D5F0C + </span>); + <span class="macro">assert_eq!</span>( + hash(<span class="string">b"meshes/x/ex_stronghold_pylon00.nif"</span>), + <span class="number">0x20250749ACCCD202 + </span>); + <span class="macro">assert_eq!</span>(hash(<span class="string">b"meshes/r/xsteam_centurions.kf"</span>), <span class="number">0x6E5C0F3125072EA6</span>); + <span class="macro">assert_eq!</span>(hash(<span class="string">b"textures/tx_rock_cave_mu_01.dds"</span>), <span class="number">0x58060C2FA3D8F759</span>); + <span class="macro">assert_eq!</span>(hash(<span class="string">b"meshes/f/furn_ashl_chime_02.nif"</span>), <span class="number">0x7C3B2F3ABFFC8611</span>); + <span class="macro">assert_eq!</span>(hash(<span class="string">b"textures/tx_rope_woven.dds"</span>), <span class="number">0x5865632F0C052C64</span>); + <span class="macro">assert_eq!</span>(hash(<span class="string">b"icons/a/tx_templar_skirt.dds"</span>), <span class="number">0x46512A0B60EDA673</span>); + <span class="macro">assert_eq!</span>(hash(<span class="string">b"icons/m/misc_prongs00.dds"</span>), <span class="number">0x51715677BBA837D3</span>); + <span class="macro">assert_eq!</span>( + hash(<span class="string">b"meshes/i/in_c_stair_plain_tall_02.nif"</span>), + <span class="number">0x2A324956BF89B1C9 + </span>); + <span class="macro">assert_eq!</span>(hash(<span class="string">b"meshes/r/xkwama worker.nif"</span>), <span class="number">0x6D446E352C3F5A1E</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>forward_slashes_are_same_as_back_slashes() { + <span class="kw">let </span>hash = |x: <span class="kw-2">&</span>[u8]| tes3::hash_file(x.as_bstr()).<span class="number">0</span>; + <span class="macro">assert_eq!</span>(hash(<span class="string">b"foo/bar/baz"</span>), hash(<span class="string">b"foo\\bar\\baz"</span>)); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>hashes_are_case_insensitive() { + <span class="kw">let </span>hash = |x: <span class="kw-2">&</span>[u8]| tes3::hash_file(x.as_bstr()).<span class="number">0</span>; + <span class="macro">assert_eq!</span>(hash(<span class="string">b"FOO/BAR/BAZ"</span>), hash(<span class="string">b"foo/bar/baz"</span>)); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>sort_order() { + <span class="kw">let </span>lhs = Hash { lo: <span class="number">0</span>, hi: <span class="number">1 </span>}; + <span class="kw">let </span>rhs = Hash { lo: <span class="number">1</span>, hi: <span class="number">0 </span>}; + <span class="macro">assert!</span>(lhs < rhs); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes3/mod.rs.html b/src/ba2/tes3/mod.rs.html new file mode 100644 index 0000000..47bff41 --- /dev/null +++ b/src/ba2/tes3/mod.rs.html @@ -0,0 +1,159 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes3/mod.rs`."><title>mod.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +</pre></div><pre class="rust"><code><span class="attr">#![doc(alias = <span class="string">"morrowind"</span>)] + +</span><span class="doccomment">//! TES III: Morrowind +//! +//! *"Ahh yes, we've been expecting you. You'll have to be recorded before you're officially released. There are a few ways we can do this, and the choice is yours."* +//! +//! This format debuted and sunset with Morrowind. It is the simplest of all the formats, using no compression or special tricks to organize the data. +//! +//! # Reading +//! ```rust +//! use ba2::{ +//! prelude::*, +//! tes3::{Archive, ArchiveKey}, +//! }; +//! use std::{fs, path::Path}; +//! +//! fn example() -> Option<()> { +//! let path = Path::new("path/to/morrowind/Data Files/Morrowind.bsa"); +//! let archive = Archive::read(path).ok()?; +//! let key: ArchiveKey = b"icons/gold.dds".into(); +//! let file = archive.get(&key)?; +//! let mut dst = fs::File::create("gold.dds").ok()?; +//! file.write(&mut dst).ok()?; +//! Some(()) +//! } +//! ``` +//! +//! # Writing +//! ```rust +//! use ba2::{ +//! prelude::*, +//! tes3::{Archive, ArchiveKey, File}, +//! }; +//! use std::fs; +//! +//! fn example() -> Option<()> { +//! let file: File = b"Hello world!\n".into(); +//! let key: ArchiveKey = b"hello.txt".into(); +//! let archive: Archive = [(key, file)].into_iter().collect(); +//! let mut dst = fs::File::create("example.bsa").ok()?; +//! archive.write(&mut dst).ok()?; +//! Some(()) +//! } +//! ``` + +</span><span class="kw">mod </span>archive; +<span class="kw">mod </span>file; +<span class="kw">mod </span>hashing; + +<span class="kw">pub use </span><span class="self">self</span>::{ + archive::{Archive, Key <span class="kw">as </span>ArchiveKey}, + file::File, + hashing::{hash_file, hash_file_in_place, FileHash, Hash}, +}; + +<span class="kw">use </span>core::num::TryFromIntError; +<span class="kw">use </span>std::io; + +<span class="attr">#[non_exhaustive] +#[derive(thiserror::Error, Debug)] +</span><span class="kw">pub enum </span>Error { + <span class="attr">#[error(<span class="string">"an operation on an integer would have truncated and corrupted data"</span>)] + </span>IntegralTruncation, + + <span class="attr">#[error(<span class="string">"invalid magic read from archive header: {0}"</span>)] + </span>InvalidMagic(u32), + + <span class="attr">#[error(transparent)] + </span>Io(<span class="attr">#[from] </span>io::Error), +} + +<span class="kw">impl </span>From<TryFromIntError> <span class="kw">for </span>Error { + <span class="kw">fn </span>from(<span class="kw">_</span>: TryFromIntError) -> <span class="self">Self </span>{ + <span class="self">Self</span>::IntegralTruncation + } +} + +<span class="kw">pub type </span><span class="prelude-ty">Result</span><T> = core::result::Result<T, Error>; +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes4/archive.rs.html b/src/ba2/tes4/archive.rs.html new file mode 100644 index 0000000..10d7575 --- /dev/null +++ b/src/ba2/tes4/archive.rs.html @@ -0,0 +1,2669 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes4/archive.rs`."><title>archive.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +<a href="#285" id="285">285</a> +<a href="#286" id="286">286</a> +<a href="#287" id="287">287</a> +<a href="#288" id="288">288</a> +<a href="#289" id="289">289</a> +<a href="#290" id="290">290</a> +<a href="#291" id="291">291</a> +<a href="#292" id="292">292</a> +<a href="#293" id="293">293</a> +<a href="#294" id="294">294</a> +<a href="#295" id="295">295</a> +<a href="#296" id="296">296</a> +<a href="#297" id="297">297</a> +<a href="#298" id="298">298</a> +<a href="#299" id="299">299</a> +<a href="#300" id="300">300</a> +<a href="#301" id="301">301</a> +<a href="#302" id="302">302</a> +<a href="#303" id="303">303</a> +<a href="#304" id="304">304</a> +<a href="#305" id="305">305</a> +<a href="#306" id="306">306</a> +<a href="#307" id="307">307</a> +<a href="#308" id="308">308</a> +<a href="#309" id="309">309</a> +<a href="#310" id="310">310</a> +<a href="#311" id="311">311</a> +<a href="#312" id="312">312</a> +<a href="#313" id="313">313</a> +<a href="#314" id="314">314</a> +<a href="#315" id="315">315</a> +<a href="#316" id="316">316</a> +<a href="#317" id="317">317</a> +<a href="#318" id="318">318</a> +<a href="#319" id="319">319</a> +<a href="#320" id="320">320</a> +<a href="#321" id="321">321</a> +<a href="#322" id="322">322</a> +<a href="#323" id="323">323</a> +<a href="#324" id="324">324</a> +<a href="#325" id="325">325</a> +<a href="#326" id="326">326</a> +<a href="#327" id="327">327</a> +<a href="#328" id="328">328</a> +<a href="#329" id="329">329</a> +<a href="#330" id="330">330</a> +<a href="#331" id="331">331</a> +<a href="#332" id="332">332</a> +<a href="#333" id="333">333</a> +<a href="#334" id="334">334</a> +<a href="#335" id="335">335</a> +<a href="#336" id="336">336</a> +<a href="#337" id="337">337</a> +<a href="#338" id="338">338</a> +<a href="#339" id="339">339</a> +<a href="#340" id="340">340</a> +<a href="#341" id="341">341</a> +<a href="#342" id="342">342</a> +<a href="#343" id="343">343</a> +<a href="#344" id="344">344</a> +<a href="#345" id="345">345</a> +<a href="#346" id="346">346</a> +<a href="#347" id="347">347</a> +<a href="#348" id="348">348</a> +<a href="#349" id="349">349</a> +<a href="#350" id="350">350</a> +<a href="#351" id="351">351</a> +<a href="#352" id="352">352</a> +<a href="#353" id="353">353</a> +<a href="#354" id="354">354</a> +<a href="#355" id="355">355</a> +<a href="#356" id="356">356</a> +<a href="#357" id="357">357</a> +<a href="#358" id="358">358</a> +<a href="#359" id="359">359</a> +<a href="#360" id="360">360</a> +<a href="#361" id="361">361</a> +<a href="#362" id="362">362</a> +<a href="#363" id="363">363</a> +<a href="#364" id="364">364</a> +<a href="#365" id="365">365</a> +<a href="#366" id="366">366</a> +<a href="#367" id="367">367</a> +<a href="#368" id="368">368</a> +<a href="#369" id="369">369</a> +<a href="#370" id="370">370</a> +<a href="#371" id="371">371</a> +<a href="#372" id="372">372</a> +<a href="#373" id="373">373</a> +<a href="#374" id="374">374</a> +<a href="#375" id="375">375</a> +<a href="#376" id="376">376</a> +<a href="#377" id="377">377</a> +<a href="#378" id="378">378</a> +<a href="#379" id="379">379</a> +<a href="#380" id="380">380</a> +<a href="#381" id="381">381</a> +<a href="#382" id="382">382</a> +<a href="#383" id="383">383</a> +<a href="#384" id="384">384</a> +<a href="#385" id="385">385</a> +<a href="#386" id="386">386</a> +<a href="#387" id="387">387</a> +<a href="#388" id="388">388</a> +<a href="#389" id="389">389</a> +<a href="#390" id="390">390</a> +<a href="#391" id="391">391</a> +<a href="#392" id="392">392</a> +<a href="#393" id="393">393</a> +<a href="#394" id="394">394</a> +<a href="#395" id="395">395</a> +<a href="#396" id="396">396</a> +<a href="#397" id="397">397</a> +<a href="#398" id="398">398</a> +<a href="#399" id="399">399</a> +<a href="#400" id="400">400</a> +<a href="#401" id="401">401</a> +<a href="#402" id="402">402</a> +<a href="#403" id="403">403</a> +<a href="#404" id="404">404</a> +<a href="#405" id="405">405</a> +<a href="#406" id="406">406</a> +<a href="#407" id="407">407</a> +<a href="#408" id="408">408</a> +<a href="#409" id="409">409</a> +<a href="#410" id="410">410</a> +<a href="#411" id="411">411</a> +<a href="#412" id="412">412</a> +<a href="#413" id="413">413</a> +<a href="#414" id="414">414</a> +<a href="#415" id="415">415</a> +<a href="#416" id="416">416</a> +<a href="#417" id="417">417</a> +<a href="#418" id="418">418</a> +<a href="#419" id="419">419</a> +<a href="#420" id="420">420</a> +<a href="#421" id="421">421</a> +<a href="#422" id="422">422</a> +<a href="#423" id="423">423</a> +<a href="#424" id="424">424</a> +<a href="#425" id="425">425</a> +<a href="#426" id="426">426</a> +<a href="#427" id="427">427</a> +<a href="#428" id="428">428</a> +<a href="#429" id="429">429</a> +<a href="#430" id="430">430</a> +<a href="#431" id="431">431</a> +<a href="#432" id="432">432</a> +<a href="#433" id="433">433</a> +<a href="#434" id="434">434</a> +<a href="#435" id="435">435</a> +<a href="#436" id="436">436</a> +<a href="#437" id="437">437</a> +<a href="#438" id="438">438</a> +<a href="#439" id="439">439</a> +<a href="#440" id="440">440</a> +<a href="#441" id="441">441</a> +<a href="#442" id="442">442</a> +<a href="#443" id="443">443</a> +<a href="#444" id="444">444</a> +<a href="#445" id="445">445</a> +<a href="#446" id="446">446</a> +<a href="#447" id="447">447</a> +<a href="#448" id="448">448</a> +<a href="#449" id="449">449</a> +<a href="#450" id="450">450</a> +<a href="#451" id="451">451</a> +<a href="#452" id="452">452</a> +<a href="#453" id="453">453</a> +<a href="#454" id="454">454</a> +<a href="#455" id="455">455</a> +<a href="#456" id="456">456</a> +<a href="#457" id="457">457</a> +<a href="#458" id="458">458</a> +<a href="#459" id="459">459</a> +<a href="#460" id="460">460</a> +<a href="#461" id="461">461</a> +<a href="#462" id="462">462</a> +<a href="#463" id="463">463</a> +<a href="#464" id="464">464</a> +<a href="#465" id="465">465</a> +<a href="#466" id="466">466</a> +<a href="#467" id="467">467</a> +<a href="#468" id="468">468</a> +<a href="#469" id="469">469</a> +<a href="#470" id="470">470</a> +<a href="#471" id="471">471</a> +<a href="#472" id="472">472</a> +<a href="#473" id="473">473</a> +<a href="#474" id="474">474</a> +<a href="#475" id="475">475</a> +<a href="#476" id="476">476</a> +<a href="#477" id="477">477</a> +<a href="#478" id="478">478</a> +<a href="#479" id="479">479</a> +<a href="#480" id="480">480</a> +<a href="#481" id="481">481</a> +<a href="#482" id="482">482</a> +<a href="#483" id="483">483</a> +<a href="#484" id="484">484</a> +<a href="#485" id="485">485</a> +<a href="#486" id="486">486</a> +<a href="#487" id="487">487</a> +<a href="#488" id="488">488</a> +<a href="#489" id="489">489</a> +<a href="#490" id="490">490</a> +<a href="#491" id="491">491</a> +<a href="#492" id="492">492</a> +<a href="#493" id="493">493</a> +<a href="#494" id="494">494</a> +<a href="#495" id="495">495</a> +<a href="#496" id="496">496</a> +<a href="#497" id="497">497</a> +<a href="#498" id="498">498</a> +<a href="#499" id="499">499</a> +<a href="#500" id="500">500</a> +<a href="#501" id="501">501</a> +<a href="#502" id="502">502</a> +<a href="#503" id="503">503</a> +<a href="#504" id="504">504</a> +<a href="#505" id="505">505</a> +<a href="#506" id="506">506</a> +<a href="#507" id="507">507</a> +<a href="#508" id="508">508</a> +<a href="#509" id="509">509</a> +<a href="#510" id="510">510</a> +<a href="#511" id="511">511</a> +<a href="#512" id="512">512</a> +<a href="#513" id="513">513</a> +<a href="#514" id="514">514</a> +<a href="#515" id="515">515</a> +<a href="#516" id="516">516</a> +<a href="#517" id="517">517</a> +<a href="#518" id="518">518</a> +<a href="#519" id="519">519</a> +<a href="#520" id="520">520</a> +<a href="#521" id="521">521</a> +<a href="#522" id="522">522</a> +<a href="#523" id="523">523</a> +<a href="#524" id="524">524</a> +<a href="#525" id="525">525</a> +<a href="#526" id="526">526</a> +<a href="#527" id="527">527</a> +<a href="#528" id="528">528</a> +<a href="#529" id="529">529</a> +<a href="#530" id="530">530</a> +<a href="#531" id="531">531</a> +<a href="#532" id="532">532</a> +<a href="#533" id="533">533</a> +<a href="#534" id="534">534</a> +<a href="#535" id="535">535</a> +<a href="#536" id="536">536</a> +<a href="#537" id="537">537</a> +<a href="#538" id="538">538</a> +<a href="#539" id="539">539</a> +<a href="#540" id="540">540</a> +<a href="#541" id="541">541</a> +<a href="#542" id="542">542</a> +<a href="#543" id="543">543</a> +<a href="#544" id="544">544</a> +<a href="#545" id="545">545</a> +<a href="#546" id="546">546</a> +<a href="#547" id="547">547</a> +<a href="#548" id="548">548</a> +<a href="#549" id="549">549</a> +<a href="#550" id="550">550</a> +<a href="#551" id="551">551</a> +<a href="#552" id="552">552</a> +<a href="#553" id="553">553</a> +<a href="#554" id="554">554</a> +<a href="#555" id="555">555</a> +<a href="#556" id="556">556</a> +<a href="#557" id="557">557</a> +<a href="#558" id="558">558</a> +<a href="#559" id="559">559</a> +<a href="#560" id="560">560</a> +<a href="#561" id="561">561</a> +<a href="#562" id="562">562</a> +<a href="#563" id="563">563</a> +<a href="#564" id="564">564</a> +<a href="#565" id="565">565</a> +<a href="#566" id="566">566</a> +<a href="#567" id="567">567</a> +<a href="#568" id="568">568</a> +<a href="#569" id="569">569</a> +<a href="#570" id="570">570</a> +<a href="#571" id="571">571</a> +<a href="#572" id="572">572</a> +<a href="#573" id="573">573</a> +<a href="#574" id="574">574</a> +<a href="#575" id="575">575</a> +<a href="#576" id="576">576</a> +<a href="#577" id="577">577</a> +<a href="#578" id="578">578</a> +<a href="#579" id="579">579</a> +<a href="#580" id="580">580</a> +<a href="#581" id="581">581</a> +<a href="#582" id="582">582</a> +<a href="#583" id="583">583</a> +<a href="#584" id="584">584</a> +<a href="#585" id="585">585</a> +<a href="#586" id="586">586</a> +<a href="#587" id="587">587</a> +<a href="#588" id="588">588</a> +<a href="#589" id="589">589</a> +<a href="#590" id="590">590</a> +<a href="#591" id="591">591</a> +<a href="#592" id="592">592</a> +<a href="#593" id="593">593</a> +<a href="#594" id="594">594</a> +<a href="#595" id="595">595</a> +<a href="#596" id="596">596</a> +<a href="#597" id="597">597</a> +<a href="#598" id="598">598</a> +<a href="#599" id="599">599</a> +<a href="#600" id="600">600</a> +<a href="#601" id="601">601</a> +<a href="#602" id="602">602</a> +<a href="#603" id="603">603</a> +<a href="#604" id="604">604</a> +<a href="#605" id="605">605</a> +<a href="#606" id="606">606</a> +<a href="#607" id="607">607</a> +<a href="#608" id="608">608</a> +<a href="#609" id="609">609</a> +<a href="#610" id="610">610</a> +<a href="#611" id="611">611</a> +<a href="#612" id="612">612</a> +<a href="#613" id="613">613</a> +<a href="#614" id="614">614</a> +<a href="#615" id="615">615</a> +<a href="#616" id="616">616</a> +<a href="#617" id="617">617</a> +<a href="#618" id="618">618</a> +<a href="#619" id="619">619</a> +<a href="#620" id="620">620</a> +<a href="#621" id="621">621</a> +<a href="#622" id="622">622</a> +<a href="#623" id="623">623</a> +<a href="#624" id="624">624</a> +<a href="#625" id="625">625</a> +<a href="#626" id="626">626</a> +<a href="#627" id="627">627</a> +<a href="#628" id="628">628</a> +<a href="#629" id="629">629</a> +<a href="#630" id="630">630</a> +<a href="#631" id="631">631</a> +<a href="#632" id="632">632</a> +<a href="#633" id="633">633</a> +<a href="#634" id="634">634</a> +<a href="#635" id="635">635</a> +<a href="#636" id="636">636</a> +<a href="#637" id="637">637</a> +<a href="#638" id="638">638</a> +<a href="#639" id="639">639</a> +<a href="#640" id="640">640</a> +<a href="#641" id="641">641</a> +<a href="#642" id="642">642</a> +<a href="#643" id="643">643</a> +<a href="#644" id="644">644</a> +<a href="#645" id="645">645</a> +<a href="#646" id="646">646</a> +<a href="#647" id="647">647</a> +<a href="#648" id="648">648</a> +<a href="#649" id="649">649</a> +<a href="#650" id="650">650</a> +<a href="#651" id="651">651</a> +<a href="#652" id="652">652</a> +<a href="#653" id="653">653</a> +<a href="#654" id="654">654</a> +<a href="#655" id="655">655</a> +<a href="#656" id="656">656</a> +<a href="#657" id="657">657</a> +<a href="#658" id="658">658</a> +<a href="#659" id="659">659</a> +<a href="#660" id="660">660</a> +<a href="#661" id="661">661</a> +<a href="#662" id="662">662</a> +<a href="#663" id="663">663</a> +<a href="#664" id="664">664</a> +<a href="#665" id="665">665</a> +<a href="#666" id="666">666</a> +<a href="#667" id="667">667</a> +<a href="#668" id="668">668</a> +<a href="#669" id="669">669</a> +<a href="#670" id="670">670</a> +<a href="#671" id="671">671</a> +<a href="#672" id="672">672</a> +<a href="#673" id="673">673</a> +<a href="#674" id="674">674</a> +<a href="#675" id="675">675</a> +<a href="#676" id="676">676</a> +<a href="#677" id="677">677</a> +<a href="#678" id="678">678</a> +<a href="#679" id="679">679</a> +<a href="#680" id="680">680</a> +<a href="#681" id="681">681</a> +<a href="#682" id="682">682</a> +<a href="#683" id="683">683</a> +<a href="#684" id="684">684</a> +<a href="#685" id="685">685</a> +<a href="#686" id="686">686</a> +<a href="#687" id="687">687</a> +<a href="#688" id="688">688</a> +<a href="#689" id="689">689</a> +<a href="#690" id="690">690</a> +<a href="#691" id="691">691</a> +<a href="#692" id="692">692</a> +<a href="#693" id="693">693</a> +<a href="#694" id="694">694</a> +<a href="#695" id="695">695</a> +<a href="#696" id="696">696</a> +<a href="#697" id="697">697</a> +<a href="#698" id="698">698</a> +<a href="#699" id="699">699</a> +<a href="#700" id="700">700</a> +<a href="#701" id="701">701</a> +<a href="#702" id="702">702</a> +<a href="#703" id="703">703</a> +<a href="#704" id="704">704</a> +<a href="#705" id="705">705</a> +<a href="#706" id="706">706</a> +<a href="#707" id="707">707</a> +<a href="#708" id="708">708</a> +<a href="#709" id="709">709</a> +<a href="#710" id="710">710</a> +<a href="#711" id="711">711</a> +<a href="#712" id="712">712</a> +<a href="#713" id="713">713</a> +<a href="#714" id="714">714</a> +<a href="#715" id="715">715</a> +<a href="#716" id="716">716</a> +<a href="#717" id="717">717</a> +<a href="#718" id="718">718</a> +<a href="#719" id="719">719</a> +<a href="#720" id="720">720</a> +<a href="#721" id="721">721</a> +<a href="#722" id="722">722</a> +<a href="#723" id="723">723</a> +<a href="#724" id="724">724</a> +<a href="#725" id="725">725</a> +<a href="#726" id="726">726</a> +<a href="#727" id="727">727</a> +<a href="#728" id="728">728</a> +<a href="#729" id="729">729</a> +<a href="#730" id="730">730</a> +<a href="#731" id="731">731</a> +<a href="#732" id="732">732</a> +<a href="#733" id="733">733</a> +<a href="#734" id="734">734</a> +<a href="#735" id="735">735</a> +<a href="#736" id="736">736</a> +<a href="#737" id="737">737</a> +<a href="#738" id="738">738</a> +<a href="#739" id="739">739</a> +<a href="#740" id="740">740</a> +<a href="#741" id="741">741</a> +<a href="#742" id="742">742</a> +<a href="#743" id="743">743</a> +<a href="#744" id="744">744</a> +<a href="#745" id="745">745</a> +<a href="#746" id="746">746</a> +<a href="#747" id="747">747</a> +<a href="#748" id="748">748</a> +<a href="#749" id="749">749</a> +<a href="#750" id="750">750</a> +<a href="#751" id="751">751</a> +<a href="#752" id="752">752</a> +<a href="#753" id="753">753</a> +<a href="#754" id="754">754</a> +<a href="#755" id="755">755</a> +<a href="#756" id="756">756</a> +<a href="#757" id="757">757</a> +<a href="#758" id="758">758</a> +<a href="#759" id="759">759</a> +<a href="#760" id="760">760</a> +<a href="#761" id="761">761</a> +<a href="#762" id="762">762</a> +<a href="#763" id="763">763</a> +<a href="#764" id="764">764</a> +<a href="#765" id="765">765</a> +<a href="#766" id="766">766</a> +<a href="#767" id="767">767</a> +<a href="#768" id="768">768</a> +<a href="#769" id="769">769</a> +<a href="#770" id="770">770</a> +<a href="#771" id="771">771</a> +<a href="#772" id="772">772</a> +<a href="#773" id="773">773</a> +<a href="#774" id="774">774</a> +<a href="#775" id="775">775</a> +<a href="#776" id="776">776</a> +<a href="#777" id="777">777</a> +<a href="#778" id="778">778</a> +<a href="#779" id="779">779</a> +<a href="#780" id="780">780</a> +<a href="#781" id="781">781</a> +<a href="#782" id="782">782</a> +<a href="#783" id="783">783</a> +<a href="#784" id="784">784</a> +<a href="#785" id="785">785</a> +<a href="#786" id="786">786</a> +<a href="#787" id="787">787</a> +<a href="#788" id="788">788</a> +<a href="#789" id="789">789</a> +<a href="#790" id="790">790</a> +<a href="#791" id="791">791</a> +<a href="#792" id="792">792</a> +<a href="#793" id="793">793</a> +<a href="#794" id="794">794</a> +<a href="#795" id="795">795</a> +<a href="#796" id="796">796</a> +<a href="#797" id="797">797</a> +<a href="#798" id="798">798</a> +<a href="#799" id="799">799</a> +<a href="#800" id="800">800</a> +<a href="#801" id="801">801</a> +<a href="#802" id="802">802</a> +<a href="#803" id="803">803</a> +<a href="#804" id="804">804</a> +<a href="#805" id="805">805</a> +<a href="#806" id="806">806</a> +<a href="#807" id="807">807</a> +<a href="#808" id="808">808</a> +<a href="#809" id="809">809</a> +<a href="#810" id="810">810</a> +<a href="#811" id="811">811</a> +<a href="#812" id="812">812</a> +<a href="#813" id="813">813</a> +<a href="#814" id="814">814</a> +<a href="#815" id="815">815</a> +<a href="#816" id="816">816</a> +<a href="#817" id="817">817</a> +<a href="#818" id="818">818</a> +<a href="#819" id="819">819</a> +<a href="#820" id="820">820</a> +<a href="#821" id="821">821</a> +<a href="#822" id="822">822</a> +<a href="#823" id="823">823</a> +<a href="#824" id="824">824</a> +<a href="#825" id="825">825</a> +<a href="#826" id="826">826</a> +<a href="#827" id="827">827</a> +<a href="#828" id="828">828</a> +<a href="#829" id="829">829</a> +<a href="#830" id="830">830</a> +<a href="#831" id="831">831</a> +<a href="#832" id="832">832</a> +<a href="#833" id="833">833</a> +<a href="#834" id="834">834</a> +<a href="#835" id="835">835</a> +<a href="#836" id="836">836</a> +<a href="#837" id="837">837</a> +<a href="#838" id="838">838</a> +<a href="#839" id="839">839</a> +<a href="#840" id="840">840</a> +<a href="#841" id="841">841</a> +<a href="#842" id="842">842</a> +<a href="#843" id="843">843</a> +<a href="#844" id="844">844</a> +<a href="#845" id="845">845</a> +<a href="#846" id="846">846</a> +<a href="#847" id="847">847</a> +<a href="#848" id="848">848</a> +<a href="#849" id="849">849</a> +<a href="#850" id="850">850</a> +<a href="#851" id="851">851</a> +<a href="#852" id="852">852</a> +<a href="#853" id="853">853</a> +<a href="#854" id="854">854</a> +<a href="#855" id="855">855</a> +<a href="#856" id="856">856</a> +<a href="#857" id="857">857</a> +<a href="#858" id="858">858</a> +<a href="#859" id="859">859</a> +<a href="#860" id="860">860</a> +<a href="#861" id="861">861</a> +<a href="#862" id="862">862</a> +<a href="#863" id="863">863</a> +<a href="#864" id="864">864</a> +<a href="#865" id="865">865</a> +<a href="#866" id="866">866</a> +<a href="#867" id="867">867</a> +<a href="#868" id="868">868</a> +<a href="#869" id="869">869</a> +<a href="#870" id="870">870</a> +<a href="#871" id="871">871</a> +<a href="#872" id="872">872</a> +<a href="#873" id="873">873</a> +<a href="#874" id="874">874</a> +<a href="#875" id="875">875</a> +<a href="#876" id="876">876</a> +<a href="#877" id="877">877</a> +<a href="#878" id="878">878</a> +<a href="#879" id="879">879</a> +<a href="#880" id="880">880</a> +<a href="#881" id="881">881</a> +<a href="#882" id="882">882</a> +<a href="#883" id="883">883</a> +<a href="#884" id="884">884</a> +<a href="#885" id="885">885</a> +<a href="#886" id="886">886</a> +<a href="#887" id="887">887</a> +<a href="#888" id="888">888</a> +<a href="#889" id="889">889</a> +<a href="#890" id="890">890</a> +<a href="#891" id="891">891</a> +<a href="#892" id="892">892</a> +<a href="#893" id="893">893</a> +<a href="#894" id="894">894</a> +<a href="#895" id="895">895</a> +<a href="#896" id="896">896</a> +<a href="#897" id="897">897</a> +<a href="#898" id="898">898</a> +<a href="#899" id="899">899</a> +<a href="#900" id="900">900</a> +<a href="#901" id="901">901</a> +<a href="#902" id="902">902</a> +<a href="#903" id="903">903</a> +<a href="#904" id="904">904</a> +<a href="#905" id="905">905</a> +<a href="#906" id="906">906</a> +<a href="#907" id="907">907</a> +<a href="#908" id="908">908</a> +<a href="#909" id="909">909</a> +<a href="#910" id="910">910</a> +<a href="#911" id="911">911</a> +<a href="#912" id="912">912</a> +<a href="#913" id="913">913</a> +<a href="#914" id="914">914</a> +<a href="#915" id="915">915</a> +<a href="#916" id="916">916</a> +<a href="#917" id="917">917</a> +<a href="#918" id="918">918</a> +<a href="#919" id="919">919</a> +<a href="#920" id="920">920</a> +<a href="#921" id="921">921</a> +<a href="#922" id="922">922</a> +<a href="#923" id="923">923</a> +<a href="#924" id="924">924</a> +<a href="#925" id="925">925</a> +<a href="#926" id="926">926</a> +<a href="#927" id="927">927</a> +<a href="#928" id="928">928</a> +<a href="#929" id="929">929</a> +<a href="#930" id="930">930</a> +<a href="#931" id="931">931</a> +<a href="#932" id="932">932</a> +<a href="#933" id="933">933</a> +<a href="#934" id="934">934</a> +<a href="#935" id="935">935</a> +<a href="#936" id="936">936</a> +<a href="#937" id="937">937</a> +<a href="#938" id="938">938</a> +<a href="#939" id="939">939</a> +<a href="#940" id="940">940</a> +<a href="#941" id="941">941</a> +<a href="#942" id="942">942</a> +<a href="#943" id="943">943</a> +<a href="#944" id="944">944</a> +<a href="#945" id="945">945</a> +<a href="#946" id="946">946</a> +<a href="#947" id="947">947</a> +<a href="#948" id="948">948</a> +<a href="#949" id="949">949</a> +<a href="#950" id="950">950</a> +<a href="#951" id="951">951</a> +<a href="#952" id="952">952</a> +<a href="#953" id="953">953</a> +<a href="#954" id="954">954</a> +<a href="#955" id="955">955</a> +<a href="#956" id="956">956</a> +<a href="#957" id="957">957</a> +<a href="#958" id="958">958</a> +<a href="#959" id="959">959</a> +<a href="#960" id="960">960</a> +<a href="#961" id="961">961</a> +<a href="#962" id="962">962</a> +<a href="#963" id="963">963</a> +<a href="#964" id="964">964</a> +<a href="#965" id="965">965</a> +<a href="#966" id="966">966</a> +<a href="#967" id="967">967</a> +<a href="#968" id="968">968</a> +<a href="#969" id="969">969</a> +<a href="#970" id="970">970</a> +<a href="#971" id="971">971</a> +<a href="#972" id="972">972</a> +<a href="#973" id="973">973</a> +<a href="#974" id="974">974</a> +<a href="#975" id="975">975</a> +<a href="#976" id="976">976</a> +<a href="#977" id="977">977</a> +<a href="#978" id="978">978</a> +<a href="#979" id="979">979</a> +<a href="#980" id="980">980</a> +<a href="#981" id="981">981</a> +<a href="#982" id="982">982</a> +<a href="#983" id="983">983</a> +<a href="#984" id="984">984</a> +<a href="#985" id="985">985</a> +<a href="#986" id="986">986</a> +<a href="#987" id="987">987</a> +<a href="#988" id="988">988</a> +<a href="#989" id="989">989</a> +<a href="#990" id="990">990</a> +<a href="#991" id="991">991</a> +<a href="#992" id="992">992</a> +<a href="#993" id="993">993</a> +<a href="#994" id="994">994</a> +<a href="#995" id="995">995</a> +<a href="#996" id="996">996</a> +<a href="#997" id="997">997</a> +<a href="#998" id="998">998</a> +<a href="#999" id="999">999</a> +<a href="#1000" id="1000">1000</a> +<a href="#1001" id="1001">1001</a> +<a href="#1002" id="1002">1002</a> +<a href="#1003" id="1003">1003</a> +<a href="#1004" id="1004">1004</a> +<a href="#1005" id="1005">1005</a> +<a href="#1006" id="1006">1006</a> +<a href="#1007" id="1007">1007</a> +<a href="#1008" id="1008">1008</a> +<a href="#1009" id="1009">1009</a> +<a href="#1010" id="1010">1010</a> +<a href="#1011" id="1011">1011</a> +<a href="#1012" id="1012">1012</a> +<a href="#1013" id="1013">1013</a> +<a href="#1014" id="1014">1014</a> +<a href="#1015" id="1015">1015</a> +<a href="#1016" id="1016">1016</a> +<a href="#1017" id="1017">1017</a> +<a href="#1018" id="1018">1018</a> +<a href="#1019" id="1019">1019</a> +<a href="#1020" id="1020">1020</a> +<a href="#1021" id="1021">1021</a> +<a href="#1022" id="1022">1022</a> +<a href="#1023" id="1023">1023</a> +<a href="#1024" id="1024">1024</a> +<a href="#1025" id="1025">1025</a> +<a href="#1026" id="1026">1026</a> +<a href="#1027" id="1027">1027</a> +<a href="#1028" id="1028">1028</a> +<a href="#1029" id="1029">1029</a> +<a href="#1030" id="1030">1030</a> +<a href="#1031" id="1031">1031</a> +<a href="#1032" id="1032">1032</a> +<a href="#1033" id="1033">1033</a> +<a href="#1034" id="1034">1034</a> +<a href="#1035" id="1035">1035</a> +<a href="#1036" id="1036">1036</a> +<a href="#1037" id="1037">1037</a> +<a href="#1038" id="1038">1038</a> +<a href="#1039" id="1039">1039</a> +<a href="#1040" id="1040">1040</a> +<a href="#1041" id="1041">1041</a> +<a href="#1042" id="1042">1042</a> +<a href="#1043" id="1043">1043</a> +<a href="#1044" id="1044">1044</a> +<a href="#1045" id="1045">1045</a> +<a href="#1046" id="1046">1046</a> +<a href="#1047" id="1047">1047</a> +<a href="#1048" id="1048">1048</a> +<a href="#1049" id="1049">1049</a> +<a href="#1050" id="1050">1050</a> +<a href="#1051" id="1051">1051</a> +<a href="#1052" id="1052">1052</a> +<a href="#1053" id="1053">1053</a> +<a href="#1054" id="1054">1054</a> +<a href="#1055" id="1055">1055</a> +<a href="#1056" id="1056">1056</a> +<a href="#1057" id="1057">1057</a> +<a href="#1058" id="1058">1058</a> +<a href="#1059" id="1059">1059</a> +<a href="#1060" id="1060">1060</a> +<a href="#1061" id="1061">1061</a> +<a href="#1062" id="1062">1062</a> +<a href="#1063" id="1063">1063</a> +<a href="#1064" id="1064">1064</a> +<a href="#1065" id="1065">1065</a> +<a href="#1066" id="1066">1066</a> +<a href="#1067" id="1067">1067</a> +<a href="#1068" id="1068">1068</a> +<a href="#1069" id="1069">1069</a> +<a href="#1070" id="1070">1070</a> +<a href="#1071" id="1071">1071</a> +<a href="#1072" id="1072">1072</a> +<a href="#1073" id="1073">1073</a> +<a href="#1074" id="1074">1074</a> +<a href="#1075" id="1075">1075</a> +<a href="#1076" id="1076">1076</a> +<a href="#1077" id="1077">1077</a> +<a href="#1078" id="1078">1078</a> +<a href="#1079" id="1079">1079</a> +<a href="#1080" id="1080">1080</a> +<a href="#1081" id="1081">1081</a> +<a href="#1082" id="1082">1082</a> +<a href="#1083" id="1083">1083</a> +<a href="#1084" id="1084">1084</a> +<a href="#1085" id="1085">1085</a> +<a href="#1086" id="1086">1086</a> +<a href="#1087" id="1087">1087</a> +<a href="#1088" id="1088">1088</a> +<a href="#1089" id="1089">1089</a> +<a href="#1090" id="1090">1090</a> +<a href="#1091" id="1091">1091</a> +<a href="#1092" id="1092">1092</a> +<a href="#1093" id="1093">1093</a> +<a href="#1094" id="1094">1094</a> +<a href="#1095" id="1095">1095</a> +<a href="#1096" id="1096">1096</a> +<a href="#1097" id="1097">1097</a> +<a href="#1098" id="1098">1098</a> +<a href="#1099" id="1099">1099</a> +<a href="#1100" id="1100">1100</a> +<a href="#1101" id="1101">1101</a> +<a href="#1102" id="1102">1102</a> +<a href="#1103" id="1103">1103</a> +<a href="#1104" id="1104">1104</a> +<a href="#1105" id="1105">1105</a> +<a href="#1106" id="1106">1106</a> +<a href="#1107" id="1107">1107</a> +<a href="#1108" id="1108">1108</a> +<a href="#1109" id="1109">1109</a> +<a href="#1110" id="1110">1110</a> +<a href="#1111" id="1111">1111</a> +<a href="#1112" id="1112">1112</a> +<a href="#1113" id="1113">1113</a> +<a href="#1114" id="1114">1114</a> +<a href="#1115" id="1115">1115</a> +<a href="#1116" id="1116">1116</a> +<a href="#1117" id="1117">1117</a> +<a href="#1118" id="1118">1118</a> +<a href="#1119" id="1119">1119</a> +<a href="#1120" id="1120">1120</a> +<a href="#1121" id="1121">1121</a> +<a href="#1122" id="1122">1122</a> +<a href="#1123" id="1123">1123</a> +<a href="#1124" id="1124">1124</a> +<a href="#1125" id="1125">1125</a> +<a href="#1126" id="1126">1126</a> +<a href="#1127" id="1127">1127</a> +<a href="#1128" id="1128">1128</a> +<a href="#1129" id="1129">1129</a> +<a href="#1130" id="1130">1130</a> +<a href="#1131" id="1131">1131</a> +<a href="#1132" id="1132">1132</a> +<a href="#1133" id="1133">1133</a> +<a href="#1134" id="1134">1134</a> +<a href="#1135" id="1135">1135</a> +<a href="#1136" id="1136">1136</a> +<a href="#1137" id="1137">1137</a> +<a href="#1138" id="1138">1138</a> +<a href="#1139" id="1139">1139</a> +<a href="#1140" id="1140">1140</a> +<a href="#1141" id="1141">1141</a> +<a href="#1142" id="1142">1142</a> +<a href="#1143" id="1143">1143</a> +<a href="#1144" id="1144">1144</a> +<a href="#1145" id="1145">1145</a> +<a href="#1146" id="1146">1146</a> +<a href="#1147" id="1147">1147</a> +<a href="#1148" id="1148">1148</a> +<a href="#1149" id="1149">1149</a> +<a href="#1150" id="1150">1150</a> +<a href="#1151" id="1151">1151</a> +<a href="#1152" id="1152">1152</a> +<a href="#1153" id="1153">1153</a> +<a href="#1154" id="1154">1154</a> +<a href="#1155" id="1155">1155</a> +<a href="#1156" id="1156">1156</a> +<a href="#1157" id="1157">1157</a> +<a href="#1158" id="1158">1158</a> +<a href="#1159" id="1159">1159</a> +<a href="#1160" id="1160">1160</a> +<a href="#1161" id="1161">1161</a> +<a href="#1162" id="1162">1162</a> +<a href="#1163" id="1163">1163</a> +<a href="#1164" id="1164">1164</a> +<a href="#1165" id="1165">1165</a> +<a href="#1166" id="1166">1166</a> +<a href="#1167" id="1167">1167</a> +<a href="#1168" id="1168">1168</a> +<a href="#1169" id="1169">1169</a> +<a href="#1170" id="1170">1170</a> +<a href="#1171" id="1171">1171</a> +<a href="#1172" id="1172">1172</a> +<a href="#1173" id="1173">1173</a> +<a href="#1174" id="1174">1174</a> +<a href="#1175" id="1175">1175</a> +<a href="#1176" id="1176">1176</a> +<a href="#1177" id="1177">1177</a> +<a href="#1178" id="1178">1178</a> +<a href="#1179" id="1179">1179</a> +<a href="#1180" id="1180">1180</a> +<a href="#1181" id="1181">1181</a> +<a href="#1182" id="1182">1182</a> +<a href="#1183" id="1183">1183</a> +<a href="#1184" id="1184">1184</a> +<a href="#1185" id="1185">1185</a> +<a href="#1186" id="1186">1186</a> +<a href="#1187" id="1187">1187</a> +<a href="#1188" id="1188">1188</a> +<a href="#1189" id="1189">1189</a> +<a href="#1190" id="1190">1190</a> +<a href="#1191" id="1191">1191</a> +<a href="#1192" id="1192">1192</a> +<a href="#1193" id="1193">1193</a> +<a href="#1194" id="1194">1194</a> +<a href="#1195" id="1195">1195</a> +<a href="#1196" id="1196">1196</a> +<a href="#1197" id="1197">1197</a> +<a href="#1198" id="1198">1198</a> +<a href="#1199" id="1199">1199</a> +<a href="#1200" id="1200">1200</a> +<a href="#1201" id="1201">1201</a> +<a href="#1202" id="1202">1202</a> +<a href="#1203" id="1203">1203</a> +<a href="#1204" id="1204">1204</a> +<a href="#1205" id="1205">1205</a> +<a href="#1206" id="1206">1206</a> +<a href="#1207" id="1207">1207</a> +<a href="#1208" id="1208">1208</a> +<a href="#1209" id="1209">1209</a> +<a href="#1210" id="1210">1210</a> +<a href="#1211" id="1211">1211</a> +<a href="#1212" id="1212">1212</a> +<a href="#1213" id="1213">1213</a> +<a href="#1214" id="1214">1214</a> +<a href="#1215" id="1215">1215</a> +<a href="#1216" id="1216">1216</a> +<a href="#1217" id="1217">1217</a> +<a href="#1218" id="1218">1218</a> +<a href="#1219" id="1219">1219</a> +<a href="#1220" id="1220">1220</a> +<a href="#1221" id="1221">1221</a> +<a href="#1222" id="1222">1222</a> +<a href="#1223" id="1223">1223</a> +<a href="#1224" id="1224">1224</a> +<a href="#1225" id="1225">1225</a> +<a href="#1226" id="1226">1226</a> +<a href="#1227" id="1227">1227</a> +<a href="#1228" id="1228">1228</a> +<a href="#1229" id="1229">1229</a> +<a href="#1230" id="1230">1230</a> +<a href="#1231" id="1231">1231</a> +<a href="#1232" id="1232">1232</a> +<a href="#1233" id="1233">1233</a> +<a href="#1234" id="1234">1234</a> +<a href="#1235" id="1235">1235</a> +<a href="#1236" id="1236">1236</a> +<a href="#1237" id="1237">1237</a> +<a href="#1238" id="1238">1238</a> +<a href="#1239" id="1239">1239</a> +<a href="#1240" id="1240">1240</a> +<a href="#1241" id="1241">1241</a> +<a href="#1242" id="1242">1242</a> +<a href="#1243" id="1243">1243</a> +<a href="#1244" id="1244">1244</a> +<a href="#1245" id="1245">1245</a> +<a href="#1246" id="1246">1246</a> +<a href="#1247" id="1247">1247</a> +<a href="#1248" id="1248">1248</a> +<a href="#1249" id="1249">1249</a> +<a href="#1250" id="1250">1250</a> +<a href="#1251" id="1251">1251</a> +<a href="#1252" id="1252">1252</a> +<a href="#1253" id="1253">1253</a> +<a href="#1254" id="1254">1254</a> +<a href="#1255" id="1255">1255</a> +<a href="#1256" id="1256">1256</a> +<a href="#1257" id="1257">1257</a> +<a href="#1258" id="1258">1258</a> +<a href="#1259" id="1259">1259</a> +<a href="#1260" id="1260">1260</a> +<a href="#1261" id="1261">1261</a> +<a href="#1262" id="1262">1262</a> +<a href="#1263" id="1263">1263</a> +<a href="#1264" id="1264">1264</a> +<a href="#1265" id="1265">1265</a> +<a href="#1266" id="1266">1266</a> +<a href="#1267" id="1267">1267</a> +<a href="#1268" id="1268">1268</a> +<a href="#1269" id="1269">1269</a> +<a href="#1270" id="1270">1270</a> +<a href="#1271" id="1271">1271</a> +<a href="#1272" id="1272">1272</a> +<a href="#1273" id="1273">1273</a> +<a href="#1274" id="1274">1274</a> +<a href="#1275" id="1275">1275</a> +<a href="#1276" id="1276">1276</a> +<a href="#1277" id="1277">1277</a> +<a href="#1278" id="1278">1278</a> +<a href="#1279" id="1279">1279</a> +<a href="#1280" id="1280">1280</a> +<a href="#1281" id="1281">1281</a> +<a href="#1282" id="1282">1282</a> +<a href="#1283" id="1283">1283</a> +<a href="#1284" id="1284">1284</a> +<a href="#1285" id="1285">1285</a> +<a href="#1286" id="1286">1286</a> +<a href="#1287" id="1287">1287</a> +<a href="#1288" id="1288">1288</a> +<a href="#1289" id="1289">1289</a> +<a href="#1290" id="1290">1290</a> +<a href="#1291" id="1291">1291</a> +<a href="#1292" id="1292">1292</a> +<a href="#1293" id="1293">1293</a> +<a href="#1294" id="1294">1294</a> +<a href="#1295" id="1295">1295</a> +<a href="#1296" id="1296">1296</a> +<a href="#1297" id="1297">1297</a> +<a href="#1298" id="1298">1298</a> +<a href="#1299" id="1299">1299</a> +<a href="#1300" id="1300">1300</a> +<a href="#1301" id="1301">1301</a> +<a href="#1302" id="1302">1302</a> +<a href="#1303" id="1303">1303</a> +<a href="#1304" id="1304">1304</a> +<a href="#1305" id="1305">1305</a> +<a href="#1306" id="1306">1306</a> +<a href="#1307" id="1307">1307</a> +<a href="#1308" id="1308">1308</a> +<a href="#1309" id="1309">1309</a> +<a href="#1310" id="1310">1310</a> +<a href="#1311" id="1311">1311</a> +<a href="#1312" id="1312">1312</a> +<a href="#1313" id="1313">1313</a> +<a href="#1314" id="1314">1314</a> +<a href="#1315" id="1315">1315</a> +<a href="#1316" id="1316">1316</a> +<a href="#1317" id="1317">1317</a> +<a href="#1318" id="1318">1318</a> +<a href="#1319" id="1319">1319</a> +<a href="#1320" id="1320">1320</a> +<a href="#1321" id="1321">1321</a> +<a href="#1322" id="1322">1322</a> +<a href="#1323" id="1323">1323</a> +<a href="#1324" id="1324">1324</a> +<a href="#1325" id="1325">1325</a> +<a href="#1326" id="1326">1326</a> +<a href="#1327" id="1327">1327</a> +<a href="#1328" id="1328">1328</a> +<a href="#1329" id="1329">1329</a> +<a href="#1330" id="1330">1330</a> +<a href="#1331" id="1331">1331</a> +<a href="#1332" id="1332">1332</a> +<a href="#1333" id="1333">1333</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + containers::{Bytes, CompressableBytes}, + derive, + io::{Endian, Sink, Source}, + protocols::{<span class="self">self</span>, BZString, ZString}, + tes4::{ + <span class="self">self</span>, directory::Map <span class="kw">as </span>DirectoryMap, Directory, DirectoryHash, DirectoryKey, Error, File, + Hash, <span class="prelude-ty">Result</span>, Version, + }, +}; +<span class="kw">use </span>bstr::{BStr, BString, ByteSlice <span class="kw">as _</span>}; +<span class="kw">use </span>core::mem; +<span class="kw">use </span>std::{borrow::Cow, io::Write}; + +<span class="macro">bitflags::bitflags! </span>{ + <span class="doccomment">/// Archive flags can impact the layout of an archive, or how it is read. + </span><span class="attr">#[repr(transparent)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + </span><span class="kw">pub struct </span>Flags: u32 { + <span class="doccomment">/// Includes directory paths within the archive. + /// + /// `archive.exe` does not let you write archives without this flag set. + /// + /// This includes only the parent path of all files, and not filenames. + </span><span class="kw">const </span>DIRECTORY_STRINGS = <span class="number">1 </span><< <span class="number">0</span>; + + <span class="doccomment">/// Includes filenames within the archive. + /// + /// `archive.exe` does not let you write archives without this flag set. + /// + /// This includes only the filename of all files, and not the parent path. + </span><span class="kw">const </span>FILE_STRINGS = <span class="number">1 </span><< <span class="number">1</span>; + + <span class="doccomment">/// Compresses the data within the archive. + /// + /// * The v103 format uses zlib. + /// * The v104 format uses xmem and zlib. + /// * The v105 format uses lz4. + </span><span class="kw">const </span>COMPRESSED = <span class="number">1 </span><< <span class="number">2</span>; + + <span class="doccomment">/// Impacts runtime parsing. + </span><span class="kw">const </span>RETAIN_DIRECTORY_NAMES = <span class="number">1 </span><< <span class="number">3</span>; + + <span class="doccomment">/// Impacts runtime parsing. + </span><span class="kw">const </span>RETAIN_FILE_NAMES = <span class="number">1 </span><< <span class="number">4</span>; + + <span class="doccomment">/// Impacts runtime parsing. + </span><span class="kw">const </span>RETAIN_FILE_NAME_OFFSETS = <span class="number">1 </span><< <span class="number">5</span>; + + <span class="doccomment">/// Writes the archive in the xbox (big-endian) format. + /// + /// This flag affects the sort order of files on disk. + /// + /// Only the crc hash is actually written in big-endian format. + </span><span class="kw">const </span>XBOX_ARCHIVE = <span class="number">1 </span><< <span class="number">6</span>; + + <span class="doccomment">/// Impacts runtime parsing. + </span><span class="kw">const </span>RETAIN_STRINGS_DURING_STARTUP = <span class="number">1 </span><< <span class="number">7</span>; + + <span class="doccomment">/// Writes the full (virtual) path of a file next to the data blob. + /// + /// This flag has a different meaning in the v103 format. + </span><span class="kw">const </span>EMBEDDED_FILE_NAMES = <span class="number">1 </span><< <span class="number">8</span>; + + <span class="doccomment">/// Uses the xmem codec from XNA 4.0 to compress the archive. + /// + /// This flag requires [`Self::compressed`] to be set as well. + /// + /// This flag is unused in SSE. + </span><span class="kw">const </span>XBOX_COMPRESSED = <span class="number">1 </span><< <span class="number">9</span>; + + <span class="kw">const _ </span>= !<span class="number">0</span>; + } +} + +<span class="kw">impl </span>Default <span class="kw">for </span>Flags { + <span class="kw">fn </span>default() -> <span class="self">Self </span>{ + <span class="self">Self</span>::DIRECTORY_STRINGS | <span class="self">Self</span>::FILE_STRINGS + } +} + +<span class="kw">impl </span>Flags { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>directory_strings(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::DIRECTORY_STRINGS) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>file_strings(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::FILE_STRINGS) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compressed(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::COMPRESSED) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>retain_directory_names(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::RETAIN_DIRECTORY_NAMES) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>retain_file_names(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::RETAIN_FILE_NAMES) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>retain_file_name_offsets(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::RETAIN_FILE_NAME_OFFSETS) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>xbox_archive(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::XBOX_ARCHIVE) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>retain_strings_during_startup(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::RETAIN_STRINGS_DURING_STARTUP) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>embedded_file_names(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::EMBEDDED_FILE_NAMES) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>xbox_compressed(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::XBOX_COMPRESSED) + } +} + +<span class="macro">bitflags::bitflags! </span>{ + <span class="doccomment">/// Specifies file types contained within an archive. + /// + /// It's not apparent if the game actually uses these flags for anything. + </span><span class="attr">#[repr(transparent)] + #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] + </span><span class="kw">pub struct </span>Types: u16 { + <span class="kw">const </span>MESHES = <span class="number">1 </span><< <span class="number">0</span>; + <span class="kw">const </span>TEXTURES = <span class="number">1 </span><< <span class="number">1</span>; + <span class="kw">const </span>MENUS = <span class="number">1 </span><< <span class="number">2</span>; + <span class="kw">const </span>SOUNDS = <span class="number">1 </span><< <span class="number">3</span>; + <span class="kw">const </span>VOICES = <span class="number">1 </span><< <span class="number">4</span>; + <span class="kw">const </span>SHADERS = <span class="number">1 </span><< <span class="number">5</span>; + <span class="kw">const </span>TREES = <span class="number">1 </span><< <span class="number">6</span>; + <span class="kw">const </span>FONTS = <span class="number">1 </span><< <span class="number">7</span>; + <span class="kw">const </span>MISC = <span class="number">1 </span><< <span class="number">8</span>; + <span class="kw">const _ </span>= !<span class="number">0</span>; + } +} + +<span class="kw">impl </span>Types { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>meshes(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::MESHES) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>textures(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::TEXTURES) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>menus(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::MENUS) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>sounds(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::SOUNDS) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>voices(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::VOICES) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>shaders(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::SHADERS) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>trees(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::TREES) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>fonts(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::FONTS) + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>misc(<span class="kw-2">&</span><span class="self">self</span>) -> bool { + <span class="self">self</span>.contains(<span class="self">Self</span>::MISC) + } +} + +<span class="kw">mod </span>constants { + <span class="kw">use </span><span class="kw">crate</span>::cc; + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>BSA: u32 = cc::make_four(<span class="string">b"BSA"</span>); + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>HEADER_SIZE: u32 = <span class="number">0x24</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>DIRECTORY_ENTRY_SIZE_X86: usize = <span class="number">0x10</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>DIRECTORY_ENTRY_SIZE_X64: usize = <span class="number">0x18</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>FILE_ENTRY_SIZE: usize = <span class="number">0x10</span>; + + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>FILE_FLAG_COMPRESSION: u32 = <span class="number">1 </span><< <span class="number">30</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>FILE_FLAG_CHECKED: u32 = <span class="number">1 </span><< <span class="number">31</span>; + <span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">const </span>FILE_FLAG_SECONDARY_ARCHIVE: u32 = <span class="number">1 </span><< <span class="number">31</span>; +} + +<span class="kw">struct </span>Offsets { + file_entries: usize, + file_names: usize, + file_data: usize, +} + +<span class="kw">struct </span>Header { + version: Version, + archive_flags: Flags, + directory_count: u32, + file_count: u32, + directory_names_len: u32, + file_names_len: u32, + archive_types: Types, +} + +<span class="kw">impl </span>Header { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>hash_endian(<span class="kw-2">&</span><span class="self">self</span>) -> Endian { + <span class="kw">if </span><span class="self">self</span>.archive_flags.xbox_archive() { + Endian::Big + } <span class="kw">else </span>{ + Endian::Little + } + } + + <span class="attr">#[must_use] + </span><span class="kw">fn </span>compute_offsets(<span class="kw-2">&</span><span class="self">self</span>) -> Offsets { + <span class="kw">let </span>file_entries = { + <span class="kw">let </span>directory_entries = constants::HEADER_SIZE <span class="kw">as </span>usize; + <span class="kw">let </span>directory_entry_size = <span class="kw">match </span><span class="self">self</span>.version { + Version::v103 | Version::v104 => constants::DIRECTORY_ENTRY_SIZE_X86, + Version::v105 => constants::DIRECTORY_ENTRY_SIZE_X64, + }; + directory_entries + (directory_entry_size * <span class="self">self</span>.directory_count <span class="kw">as </span>usize) + }; + + <span class="kw">let </span>file_names = { + <span class="kw">let </span>directory_names_len = <span class="kw">if </span><span class="self">self</span>.archive_flags.directory_strings() { + <span class="comment">// directory names are stored using a bzstring + // directory_names_len includes the length of the string + the null terminator, + // but not the prefix length byte, so we add directory_count to include it + </span><span class="self">self</span>.directory_names_len <span class="kw">as </span>usize + <span class="self">self</span>.directory_count <span class="kw">as </span>usize + } <span class="kw">else </span>{ + <span class="number">0 + </span>}; + file_entries + + (directory_names_len + constants::FILE_ENTRY_SIZE * <span class="self">self</span>.file_count <span class="kw">as </span>usize) + }; + + <span class="kw">let </span>file_data = <span class="kw">if </span><span class="self">self</span>.archive_flags.file_strings() { + file_names + <span class="self">self</span>.file_names_len <span class="kw">as </span>usize + } <span class="kw">else </span>{ + file_names + }; + + Offsets { + file_entries, + file_names, + file_data, + } + } +} + +<span class="kw">struct </span>SortedFile<<span class="lifetime">'this</span>, <span class="lifetime">'bytes</span>> { + key: <span class="kw-2">&</span><span class="lifetime">'this </span>DirectoryKey<<span class="lifetime">'bytes</span>>, + this: <span class="kw-2">&</span><span class="lifetime">'this </span>File<<span class="lifetime">'bytes</span>>, + embedded_name: <span class="prelude-ty">Option</span><Cow<<span class="lifetime">'this</span>, BStr>>, +} + +<span class="kw">struct </span>SortedDirectory<<span class="lifetime">'this</span>, <span class="lifetime">'bytes</span>> { + key: <span class="kw-2">&</span><span class="lifetime">'this </span>Key<<span class="lifetime">'bytes</span>>, + this: <span class="kw-2">&</span><span class="lifetime">'this </span>Directory<<span class="lifetime">'bytes</span>>, + files: Vec<SortedFile<<span class="lifetime">'this</span>, <span class="lifetime">'bytes</span>>>, +} + +<span class="macro">derive::key!</span>(Key: DirectoryHash); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Key<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>hash_in_place(name: <span class="kw-2">&mut </span>BString) -> DirectoryHash { + tes4::hash_directory_in_place(name) + } +} + +<span class="doccomment">/// See also [`ArchiveOptions`](Options). +</span><span class="attr">#[derive(Debug, Default)] +#[repr(transparent)] +</span><span class="kw">pub struct </span>OptionsBuilder(Options); + +<span class="kw">impl </span>OptionsBuilder { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>build(<span class="self">self</span>) -> Options { + <span class="self">self</span>.<span class="number">0 + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>flags(<span class="kw-2">mut </span><span class="self">self</span>, flags: Flags) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.flags = flags; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>types(<span class="kw-2">mut </span><span class="self">self</span>, types: Types) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.types = types; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>version(<span class="kw-2">mut </span><span class="self">self</span>, version: Version) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.version = version; + <span class="self">self + </span>} +} + +<span class="attr">#[derive(Clone, Copy, Debug, Default)] +</span><span class="kw">pub struct </span>Options { + version: Version, + flags: Flags, + types: Types, +} + +<span class="kw">impl </span>Options { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>builder() -> OptionsBuilder { + OptionsBuilder::new() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>flags(<span class="kw-2">&</span><span class="self">self</span>) -> Flags { + <span class="self">self</span>.flags + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>types(<span class="kw-2">&</span><span class="self">self</span>) -> Types { + <span class="self">self</span>.types + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>version(<span class="kw-2">&</span><span class="self">self</span>) -> Version { + <span class="self">self</span>.version + } +} + +<span class="kw">type </span>ReadResult<T> = (T, Options); +<span class="macro">derive::archive! </span>{ + <span class="doccomment">/// Represents the TES4 revision of the bsa format. + </span>Archive => ReadResult + Map: (Key: DirectoryHash) => Directory +} + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Archive<<span class="lifetime">'bytes</span>> { + <span class="kw">pub fn </span>write<Out>(<span class="kw-2">&</span><span class="self">self</span>, stream: <span class="kw-2">&mut </span>Out, options: <span class="kw-2">&</span>Options) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">let </span><span class="kw-2">mut </span>sink = Sink::new(stream); + <span class="kw">let </span>header = <span class="self">self</span>.make_header(<span class="kw-2">*</span>options)<span class="question-mark">?</span>; + <span class="self">Self</span>::write_header(<span class="kw-2">&mut </span>sink, <span class="kw-2">&</span>header)<span class="question-mark">?</span>; + + <span class="kw">let </span>offsets = header.compute_offsets(); + <span class="kw">let </span>directories = <span class="self">self</span>.sort_for_write(<span class="kw-2">*</span>options); + + <span class="comment">// let mut file_entries_offset = offsets.file_entries + header.file_names_len; + </span><span class="kw">let </span><span class="kw-2">mut </span>file_entries_offset = u32::try_from(offsets.file_entries)<span class="question-mark">? + </span>.checked_add(header.file_names_len) + .ok_or(Error::IntegralOverflow)<span class="question-mark">?</span>; + <span class="kw">for </span>directory <span class="kw">in </span><span class="kw-2">&</span>directories { + <span class="self">Self</span>::write_directory_entry( + <span class="kw-2">&mut </span>sink, + <span class="kw-2">*</span>options, + directory.key, + directory.this, + <span class="kw-2">&mut </span>file_entries_offset, + )<span class="question-mark">?</span>; + } + + <span class="kw">let </span><span class="kw-2">mut </span>file_data_offset = u32::try_from(offsets.file_data)<span class="question-mark">?</span>; + <span class="kw">for </span>directory <span class="kw">in </span><span class="kw-2">&</span>directories { + <span class="kw">if </span>options.flags.directory_strings() { + sink.write_protocol::<BZString>(directory.key.name(), Endian::Little)<span class="question-mark">?</span>; + } + <span class="kw">for </span>file <span class="kw">in </span><span class="kw-2">&</span>directory.files { + <span class="self">Self</span>::write_file_entry( + <span class="kw-2">&mut </span>sink, + <span class="kw-2">*</span>options, + file.key, + file.this, + <span class="kw-2">&mut </span>file_data_offset, + file.embedded_name.as_ref().map(AsRef::as_ref), + )<span class="question-mark">?</span>; + } + } + + <span class="kw">if </span>options.flags.file_strings() { + <span class="kw">for </span>directory <span class="kw">in </span><span class="kw-2">&</span>directories { + <span class="kw">for </span>file <span class="kw">in </span><span class="kw-2">&</span>directory.files { + sink.write_protocol::<ZString>(file.key.name(), Endian::Little)<span class="question-mark">?</span>; + } + } + } + + <span class="kw">for </span>directory <span class="kw">in </span><span class="kw-2">&</span>directories { + <span class="kw">for </span>file <span class="kw">in </span><span class="kw-2">&</span>directory.files { + <span class="self">Self</span>::write_file_data( + <span class="kw-2">&mut </span>sink, + file.this, + file.embedded_name.as_ref().map(AsRef::as_ref), + )<span class="question-mark">?</span>; + } + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>make_header(<span class="kw-2">&</span><span class="self">self</span>, options: Options) -> <span class="prelude-ty">Result</span><Header> { + <span class="attr">#[derive(Default)] + </span><span class="kw">struct </span>Info { + count: usize, + names_len: usize, + } + + <span class="kw">let </span><span class="kw-2">mut </span>files = Info::default(); + <span class="kw">let </span><span class="kw-2">mut </span>directories = Info::default(); + + <span class="kw">for </span>directory <span class="kw">in </span><span class="self">self </span>{ + directories.count += <span class="number">1</span>; + <span class="kw">if </span>options.flags.directory_strings() { + <span class="comment">// zstring -> include null terminator + </span>directories.names_len += directory.<span class="number">0</span>.name().len() + <span class="number">1</span>; + } + + <span class="kw">for </span>file <span class="kw">in </span>directory.<span class="number">1 </span>{ + files.count += <span class="number">1</span>; + <span class="kw">if </span>options.flags.file_strings() { + <span class="comment">// zstring -> include null terminator + </span>files.names_len += file.<span class="number">0</span>.name().len() + <span class="number">1</span>; + } + } + } + + <span class="prelude-val">Ok</span>(Header { + version: options.version, + archive_flags: options.flags, + directory_count: directories.count.try_into()<span class="question-mark">?</span>, + file_count: files.count.try_into()<span class="question-mark">?</span>, + directory_names_len: directories.names_len.try_into()<span class="question-mark">?</span>, + file_names_len: files.names_len.try_into()<span class="question-mark">?</span>, + archive_types: options.types, + }) + } + + <span class="kw">fn </span>concat_directory_and_file_name<<span class="lifetime">'string</span>>( + directory: <span class="kw-2">&</span><span class="lifetime">'string </span>Key<<span class="lifetime">'bytes</span>>, + file: <span class="kw-2">&</span><span class="lifetime">'string </span>DirectoryKey<<span class="lifetime">'bytes</span>>, + ) -> Cow<<span class="lifetime">'string</span>, BStr> { + <span class="kw">let </span>directory = directory.name(); + <span class="kw">let </span>file = file.name(); + + <span class="kw">let </span>directory = <span class="kw">match </span>directory.len() { + <span class="number">0 </span>=> <span class="string">b""</span>.as_bstr(), + <span class="number">1 </span>=> <span class="kw">match </span>directory[<span class="number">0</span>] { + <span class="string">b'/' </span>| <span class="string">b'\\' </span>| <span class="string">b'.' </span>=> <span class="string">b""</span>.as_bstr(), + <span class="kw">_ </span>=> directory, + }, + <span class="kw">_ </span>=> directory, + }; + + <span class="kw">match </span>(directory.is_empty(), file.is_empty()) { + (<span class="bool-val">true</span>, <span class="bool-val">true</span>) => Cow::default(), + (<span class="bool-val">true</span>, <span class="bool-val">false</span>) => Cow::from(file), + (<span class="bool-val">false</span>, <span class="bool-val">true</span>) => Cow::from(directory), + (<span class="bool-val">false</span>, <span class="bool-val">false</span>) => { + <span class="kw">let </span>string: BString = [directory, <span class="string">b"\\"</span>.as_bstr(), file] + .into_iter() + .flat_map(|x| x.as_bytes()) + .copied() + .collect::<Vec<<span class="kw">_</span>>>() + .into(); + Cow::from(string) + } + } + } + + <span class="kw">fn </span>sort_for_write<<span class="lifetime">'this</span>>(<span class="kw-2">&</span><span class="lifetime">'this </span><span class="self">self</span>, options: Options) -> Vec<SortedDirectory<<span class="lifetime">'this</span>, <span class="lifetime">'bytes</span>>> { + <span class="kw">let </span><span class="kw-2">mut </span>directories: Vec<<span class="kw">_</span>> = <span class="self">self + </span>.iter() + .map(|(directory_key, directory)| { + <span class="kw">let </span><span class="kw-2">mut </span>files: Vec<<span class="kw">_</span>> = directory + .iter() + .map(|(file_key, file)| { + <span class="kw">let </span>embedded_name = <span class="kw">match </span>options.version { + Version::v104 | Version::v105 + <span class="kw">if </span>options.flags.embedded_file_names() => + { + <span class="prelude-val">Some</span>(<span class="self">Self</span>::concat_directory_and_file_name( + directory_key, + file_key, + )) + } + <span class="kw">_ </span>=> <span class="prelude-val">None</span>, + }; + SortedFile { + key: file_key, + this: file, + embedded_name, + } + }) + .collect(); + <span class="kw">if </span>options.flags.xbox_archive() { + files.sort_by_key(|x| x.key.hash().numeric().swap_bytes()); + } + SortedDirectory { + key: directory_key, + this: directory, + files, + } + }) + .collect(); + <span class="kw">if </span>options.flags.xbox_archive() { + directories.sort_by_key(|x| x.key.hash().numeric().swap_bytes()); + } + directories + } + + <span class="kw">fn </span>write_directory_entry<Out>( + sink: <span class="kw-2">&mut </span>Sink<Out>, + options: Options, + key: <span class="kw-2">&</span>Key<<span class="lifetime">'bytes</span>>, + directory: <span class="kw-2">&</span>Directory<<span class="lifetime">'bytes</span>>, + file_entries_offset: <span class="kw-2">&mut </span>u32, + ) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="self">Self</span>::write_hash(sink, options, (<span class="kw-2">*</span>key.hash()).into())<span class="question-mark">?</span>; + + <span class="kw">let </span>file_count: u32 = directory.len().try_into()<span class="question-mark">?</span>; + sink.write(<span class="kw-2">&</span>file_count, Endian::Little)<span class="question-mark">?</span>; + + <span class="kw">if </span>options.version == Version::v105 { + sink.write(<span class="kw-2">&</span><span class="number">0u32</span>, Endian::Little)<span class="question-mark">?</span>; + } + + sink.write(file_entries_offset, Endian::Little)<span class="question-mark">?</span>; + + <span class="kw">if </span>options.version == Version::v105 { + sink.write(<span class="kw-2">&</span><span class="number">0u32</span>, Endian::Little)<span class="question-mark">?</span>; + } + + <span class="kw">if </span>options.flags.directory_strings() { + <span class="comment">// bzstring -> include prefix byte and null terminator + // file_entries_offset += key.name().len() + 2; + </span><span class="kw-2">*</span>file_entries_offset = file_entries_offset + .checked_add((key.name().len() + <span class="number">2</span>).try_into()<span class="question-mark">?</span>) + .ok_or(Error::IntegralOverflow)<span class="question-mark">?</span>; + } + + <span class="comment">// file_entries_offset += directory.len() * constants::FILE_ENTRY_SIZE; + </span><span class="kw-2">*</span>file_entries_offset = file_entries_offset + .checked_add( + directory + .len() + .checked_mul(constants::FILE_ENTRY_SIZE) + .ok_or(Error::IntegralOverflow)<span class="question-mark">? + </span>.try_into()<span class="question-mark">?</span>, + ) + .ok_or(Error::IntegralOverflow)<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_file_data<Out>( + sink: <span class="kw-2">&mut </span>Sink<Out>, + file: <span class="kw-2">&</span>File<<span class="lifetime">'bytes</span>>, + embedded_file_name: <span class="prelude-ty">Option</span><<span class="kw-2">&</span>BStr>, + ) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="kw">if let </span><span class="prelude-val">Some</span>(name) = embedded_file_name { + sink.write_protocol::<protocols::BString>(name, Endian::Little)<span class="question-mark">?</span>; + } + + <span class="kw">if let </span><span class="prelude-val">Some</span>(len) = file.decompressed_len() { + <span class="kw">let </span>len: u32 = len.try_into()<span class="question-mark">?</span>; + sink.write(<span class="kw-2">&</span>len, Endian::Little)<span class="question-mark">?</span>; + } + + sink.write_bytes(file.as_bytes())<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_file_entry<Out>( + sink: <span class="kw-2">&mut </span>Sink<Out>, + options: Options, + key: <span class="kw-2">&</span>DirectoryKey<<span class="lifetime">'bytes</span>>, + file: <span class="kw-2">&</span>File<<span class="lifetime">'bytes</span>>, + file_data_offset: <span class="kw-2">&mut </span>u32, + embedded_file_name: <span class="prelude-ty">Option</span><<span class="kw-2">&</span>BStr>, + ) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + <span class="self">Self</span>::write_hash(sink, options, (<span class="kw-2">*</span>key.hash()).into())<span class="question-mark">?</span>; + + <span class="kw">let </span>(size_with_info, size) = { + <span class="kw">let </span><span class="kw-2">mut </span>size = file.len(); + <span class="kw">if let </span><span class="prelude-val">Some</span>(name) = embedded_file_name { + <span class="comment">// include prefix byte + </span>size += name.len() + <span class="number">1</span>; + } + <span class="kw">if </span>file.is_compressed() { + size += mem::size_of::<u32>(); + } + + <span class="kw">let </span>size: u32 = size.try_into()<span class="question-mark">?</span>; + <span class="kw">let </span>masked = size & !(constants::FILE_FLAG_COMPRESSION | constants::FILE_FLAG_CHECKED); + <span class="kw">if </span>masked != size { + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::IntegralTruncation); + } + + <span class="kw">if </span>file.is_compressed() == options.flags.compressed() { + (size, masked) + } <span class="kw">else </span>{ + (size | constants::FILE_FLAG_COMPRESSION, masked) + } + }; + sink.write(<span class="kw-2">&</span>(size_with_info, <span class="kw-2">*</span>file_data_offset), Endian::Little)<span class="question-mark">?</span>; + + <span class="comment">// file_data_offset += size; + </span><span class="kw-2">*</span>file_data_offset = file_data_offset + .checked_add(size) + .ok_or(Error::IntegralOverflow)<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_hash<Out>(sink: <span class="kw-2">&mut </span>Sink<Out>, options: Options, hash: Hash) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + sink.write( + <span class="kw-2">&</span>(hash.last, hash.last2, hash.length, hash.first), + Endian::Little, + )<span class="question-mark">?</span>; + + <span class="kw">let </span>endian = <span class="kw">if </span>options.flags.xbox_archive() { + Endian::Big + } <span class="kw">else </span>{ + Endian::Little + }; + sink.write(<span class="kw-2">&</span>hash.crc, endian)<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>write_header<Out>(sink: <span class="kw-2">&mut </span>Sink<Out>, header: <span class="kw-2">&</span>Header) -> <span class="prelude-ty">Result</span><()> + <span class="kw">where + </span>Out: <span class="question-mark">?</span>Sized + Write, + { + sink.write( + <span class="kw-2">&</span>( + constants::BSA, + header.version <span class="kw">as </span>u32, + constants::HEADER_SIZE, + header.archive_flags.bits(), + header.directory_count, + header.file_count, + header.directory_names_len, + header.file_names_len, + header.archive_types.bits(), + <span class="number">0u16</span>, + ), + Endian::Little, + )<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>do_read<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><ReadResult<<span class="self">Self</span>>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>header = <span class="self">Self</span>::read_header(source)<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>offsets = header.compute_offsets(); + <span class="kw">let </span><span class="kw-2">mut </span>map = Map::default(); + + <span class="kw">for _ in </span><span class="number">0</span>..header.directory_count { + <span class="kw">let </span>(key, value) = <span class="self">Self</span>::read_directory(source, <span class="kw-2">&</span>header, <span class="kw-2">&mut </span>offsets)<span class="question-mark">?</span>; + map.insert(key, value); + } + + <span class="prelude-val">Ok</span>(( + <span class="self">Self </span>{ map }, + Options { + version: header.version, + flags: header.archive_flags, + types: header.archive_types, + }, + )) + } + + <span class="kw">fn </span>read_directory<In>( + source: <span class="kw-2">&mut </span>In, + header: <span class="kw-2">&</span>Header, + offsets: <span class="kw-2">&mut </span>Offsets, + ) -> <span class="prelude-ty">Result</span><(Key<<span class="lifetime">'bytes</span>>, Directory<<span class="lifetime">'bytes</span>>)> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>hash = <span class="self">Self</span>::read_hash(source, header.hash_endian())<span class="question-mark">?</span>; + <span class="kw">let </span>file_count: u32 = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="attr">#[allow(clippy::cast_possible_wrap)] + </span><span class="kw">match </span>header.version { + Version::v103 | Version::v104 => source.seek_relative(mem::size_of::<u32>() <span class="kw">as </span>isize)<span class="question-mark">?</span>, + Version::v105 => source.seek_relative((mem::size_of::<u32>() * <span class="number">3</span>) <span class="kw">as </span>isize)<span class="question-mark">?</span>, + } + + <span class="kw">let </span><span class="kw-2">mut </span>map = DirectoryMap::default(); + <span class="kw">let </span>(name, directory) = source.save_restore_position( + |source| -> <span class="prelude-ty">Result</span><(Bytes<<span class="lifetime">'bytes</span>>, Directory<<span class="lifetime">'bytes</span>>)> { + source.seek_absolute(offsets.file_entries)<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>name = <span class="kw">if </span>header.archive_flags.directory_strings() { + <span class="prelude-val">Some</span>(source.read_protocol::<BZString>(Endian::Little)<span class="question-mark">?</span>) + } <span class="kw">else </span>{ + <span class="prelude-val">None + </span>}; + <span class="kw">for _ in </span><span class="number">0</span>..file_count { + <span class="kw">let </span>(key, value) = <span class="self">Self</span>::read_file_entry(source, header, offsets, <span class="kw-2">&mut </span>name)<span class="question-mark">?</span>; + map.insert(key, value); + } + offsets.file_entries = source.stream_position(); + <span class="prelude-val">Ok</span>((name.unwrap_or_default(), Directory { map })) + }, + )<span class="question-mark">??</span>; + + <span class="prelude-val">Ok</span>(( + Key { + hash: hash.into(), + name, + }, + directory, + )) + } + + <span class="kw">fn </span>read_file_entry<In>( + source: <span class="kw-2">&mut </span>In, + header: <span class="kw-2">&</span>Header, + offsets: <span class="kw-2">&mut </span>Offsets, + directory_name: <span class="kw-2">&mut </span><span class="prelude-ty">Option</span><Bytes<<span class="lifetime">'bytes</span>>>, + ) -> <span class="prelude-ty">Result</span><(DirectoryKey<<span class="lifetime">'bytes</span>>, File<<span class="lifetime">'bytes</span>>)> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>hash = <span class="self">Self</span>::read_hash(source, header.hash_endian())<span class="question-mark">?</span>; + <span class="kw">let </span>(compression_flipped, <span class="kw-2">mut </span>data_size, data_offset) = { + <span class="kw">let </span>(size, offset): (u32, u32) = source.read(Endian::Little)<span class="question-mark">?</span>; + ( + (size & constants::FILE_FLAG_COMPRESSION) != <span class="number">0</span>, + (size & !(constants::FILE_FLAG_COMPRESSION | constants::FILE_FLAG_CHECKED)) + <span class="kw">as </span>usize, + (offset & !constants::FILE_FLAG_SECONDARY_ARCHIVE) <span class="kw">as </span>usize, + ) + }; + + <span class="kw">let </span><span class="kw-2">mut </span>name = <span class="kw">if </span>header.archive_flags.file_strings() { + source.save_restore_position(|source| -> <span class="prelude-ty">Result</span><<span class="prelude-ty">Option</span><Bytes<<span class="lifetime">'bytes</span>>>> { + source.seek_absolute(offsets.file_names)<span class="question-mark">?</span>; + <span class="kw">let </span>result = source.read_protocol::<ZString>(Endian::Little)<span class="question-mark">?</span>; + offsets.file_names = source.stream_position(); + <span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(result)) + })<span class="question-mark">?? + </span>} <span class="kw">else </span>{ + <span class="prelude-val">None + </span>}; + + <span class="kw">let </span>container = + source.save_restore_position(|source| -> <span class="prelude-ty">Result</span><CompressableBytes<<span class="lifetime">'bytes</span>>> { + source.seek_absolute(data_offset)<span class="question-mark">?</span>; + + <span class="kw">if </span><span class="macro">matches!</span>(header.version, + Version::v104 | Version::v105 <span class="kw">if </span>header.archive_flags.embedded_file_names()) + { + <span class="kw">let </span><span class="kw-2">mut </span>s = source.read_protocol::<protocols::BString>(Endian::Little)<span class="question-mark">?</span>; + data_size -= s.len() + <span class="number">1</span>; <span class="comment">// include prefix byte + </span><span class="kw">if let </span><span class="prelude-val">Some</span>(pos) = s.as_bytes().iter().rposition(|<span class="kw-2">&</span>x| x == <span class="string">b'\\' </span>|| x == <span class="string">b'/'</span>) { + <span class="kw">if </span>directory_name.is_none() { + <span class="kw-2">*</span>directory_name = <span class="prelude-val">Some</span>(s.copy_slice(<span class="number">0</span>..pos)); + } + s = s.copy_slice(pos + <span class="number">1</span>..s.len()); + } + <span class="kw">if </span>name.is_none() { + name = <span class="prelude-val">Some</span>(s); + } + } + + <span class="kw">let </span>decompressed_len = + <span class="kw">match </span>(header.archive_flags.compressed(), compression_flipped) { + (<span class="bool-val">true</span>, <span class="bool-val">false</span>) | (<span class="bool-val">false</span>, <span class="bool-val">true</span>) => { + <span class="kw">let </span>result: u32 = source.read(Endian::Little)<span class="question-mark">?</span>; + data_size -= mem::size_of::<u32>(); + <span class="prelude-val">Some</span>(result <span class="kw">as </span>usize) + } + (<span class="bool-val">true</span>, <span class="bool-val">true</span>) | (<span class="bool-val">false</span>, <span class="bool-val">false</span>) => <span class="prelude-val">None</span>, + }; + + <span class="kw">let </span>container = source + .read_bytes(data_size)<span class="question-mark">? + </span>.into_compressable(decompressed_len); + <span class="prelude-val">Ok</span>(container) + })<span class="question-mark">??</span>; + + <span class="prelude-val">Ok</span>(( + DirectoryKey { + hash: hash.into(), + name: name.unwrap_or_default(), + }, + File { bytes: container }, + )) + } + + <span class="kw">fn </span>read_hash<In>(source: <span class="kw-2">&mut </span>In, endian: Endian) -> <span class="prelude-ty">Result</span><Hash> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>(last, last2, length, first, crc) = source.read(endian)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(Hash { + last, + last2, + length, + first, + crc, + }) + } + + <span class="kw">fn </span>read_header<In>(source: <span class="kw-2">&mut </span>In) -> <span class="prelude-ty">Result</span><Header> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>( + magic, + version, + header_size, + archive_flags, + directory_count, + file_count, + directory_names_len, + file_names_len, + archive_types, + padding, + ) = source.read(Endian::Little)<span class="question-mark">?</span>; + <span class="kw">let _</span>: u16 = padding; + + <span class="kw">if </span>magic != constants::BSA { + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::InvalidMagic(magic)); + } + + <span class="kw">let </span>version = <span class="kw">match </span>version { + <span class="number">103 </span>=> Version::v103, + <span class="number">104 </span>=> Version::v104, + <span class="number">105 </span>=> Version::v105, + <span class="kw">_ </span>=> <span class="kw">return </span><span class="prelude-val">Err</span>(Error::InvalidVersion(version)), + }; + + <span class="kw">if </span>header_size != constants::HEADER_SIZE { + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::InvalidHeaderSize(header_size)); + } + + <span class="comment">// there probably exist "valid" archives which set extra bits, so it's not worth validating... + </span><span class="kw">let </span>archive_flags = Flags::from_bits_truncate(archive_flags); + <span class="kw">let </span>archive_types = Types::from_bits_truncate(archive_types); + + <span class="prelude-val">Ok</span>(Header { + version, + archive_flags, + directory_count, + file_count, + directory_names_len, + file_names_len, + archive_types, + }) + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use crate</span>::{ + prelude::<span class="kw-2">*</span>, + tes4::{ + Archive, ArchiveFlags, ArchiveKey, ArchiveOptions, Directory, DirectoryKey, Error, + File, FileCompressionOptions, Version, + }, + Borrowed, + }; + <span class="kw">use </span>anyhow::Context <span class="kw">as _</span>; + <span class="kw">use </span>memmap2::Mmap; + <span class="kw">use </span>std::{ + fs, io, + path::{Path, PathBuf}, + }; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() { + <span class="kw">let </span>bsa = Archive::new(); + <span class="macro">assert!</span>(bsa.is_empty()); + <span class="macro">assert!</span>(bsa.len() == <span class="number">0</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>read_compressed() -> anyhow::Result<()> { + <span class="kw">let </span>test = |file_name: <span class="kw-2">&</span>str| -> anyhow::Result<()> { + <span class="kw">let </span>root = Path::new(<span class="string">"data/tes4_compression_test"</span>); + + <span class="kw">let </span>(bsa, options) = Archive::read(root.join(file_name).as_path()) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to read archive: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>compression_options = FileCompressionOptions::builder() + .version(options.version) + .build(); + + <span class="kw">let </span>files = [<span class="string">"License.txt"</span>, <span class="string">"Preview.png"</span>]; + <span class="kw">for </span>file_name <span class="kw">in </span>files { + <span class="kw">let </span>path = root.join(file_name); + <span class="kw">let </span>directory = bsa + .get(<span class="kw-2">&</span>ArchiveKey::from(<span class="string">b"."</span>)) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get directory for: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>compressed_from_archive = directory + .get(<span class="kw-2">&</span>DirectoryKey::from(file_name)) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get file for: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert!</span>(compressed_from_archive.is_compressed()); + + <span class="kw">let </span>metadata = fs::metadata(<span class="kw-2">&</span>path) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get metadata for: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>decompressed_len = compressed_from_archive + .decompressed_len() + .with_context(|| <span class="macro">format!</span>(<span class="string">"file was not compressed: {path:?}"</span>))<span class="question-mark">? + </span><span class="kw">as </span>u64; + <span class="macro">assert_eq!</span>(decompressed_len, metadata.len()); + + <span class="kw">let </span>decompressed_from_disk = File::read(path.as_path(), <span class="kw-2">&</span>Default::default()) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to read file from disk: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>compressed_from_disk = decompressed_from_disk + .compress(<span class="kw-2">&</span>compression_options) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to compress file: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>( + compressed_from_archive.decompressed_len(), + compressed_from_disk.decompressed_len() + ); + + <span class="kw">let </span>decompressed_from_archive = compressed_from_archive + .decompress(<span class="kw-2">&</span>compression_options) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to decompress file: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>( + decompressed_from_archive.as_bytes(), + decompressed_from_disk.as_bytes() + ); + } + + <span class="prelude-val">Ok</span>(()) + }; + + test(<span class="string">"test_104.bsa"</span>).context(<span class="string">"v104"</span>)<span class="question-mark">?</span>; + test(<span class="string">"test_105.bsa"</span>).context(<span class="string">"v105"</span>)<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>xbox_decompressed_read() -> anyhow::Result<()> { + <span class="kw">let </span>root = Path::new(<span class="string">"data/tes4_xbox_read_test"</span>); + + <span class="kw">let </span>(normal, normal_options) = Archive::read(root.join(<span class="string">"normal.bsa"</span>).as_path()) + .context(<span class="string">"failed to read normal archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert!</span>(!normal_options.flags().xbox_archive()); + <span class="macro">assert!</span>(!normal_options.flags().xbox_compressed()); + <span class="macro">assert!</span>(!normal_options.flags().compressed()); + + <span class="kw">let </span>(xbox, xbox_options) = Archive::read(root.join(<span class="string">"xbox.bsa"</span>).as_path()) + .context(<span class="string">"failed to read xbox archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert!</span>(xbox_options.flags().xbox_archive()); + <span class="macro">assert!</span>(!xbox_options.flags().xbox_compressed()); + <span class="macro">assert!</span>(!xbox_options.flags().compressed()); + + <span class="macro">assert_eq!</span>(normal.len(), xbox.len()); + <span class="kw">for </span>(directory_normal, directory_xbox) <span class="kw">in </span>normal.iter().zip(xbox) { + <span class="macro">assert_eq!</span>(directory_normal.<span class="number">0</span>.hash(), directory_xbox.<span class="number">0</span>.hash()); + <span class="macro">assert_eq!</span>(directory_normal.<span class="number">0</span>.name(), directory_xbox.<span class="number">0</span>.name()); + <span class="macro">assert_eq!</span>(directory_normal.<span class="number">1</span>.len(), directory_xbox.<span class="number">1</span>.len()); + + <span class="kw">for </span>(file_normal, file_xbox) <span class="kw">in </span>directory_normal.<span class="number">1</span>.iter().zip(directory_xbox.<span class="number">1</span>) { + <span class="macro">assert_eq!</span>(file_normal.<span class="number">0</span>.hash(), file_xbox.<span class="number">0</span>.hash()); + <span class="macro">assert_eq!</span>(file_normal.<span class="number">0</span>.name(), file_xbox.<span class="number">0</span>.name()); + <span class="macro">assert!</span>(!file_normal.<span class="number">1</span>.is_compressed()); + <span class="macro">assert!</span>(!file_xbox.<span class="number">1</span>.is_compressed()); + <span class="macro">assert_eq!</span>(file_normal.<span class="number">1</span>.len(), file_xbox.<span class="number">1</span>.len()); + <span class="macro">assert_eq!</span>(file_normal.<span class="number">1</span>.as_bytes(), file_xbox.<span class="number">1</span>.as_bytes()); + } + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>xbox_decompressed_write() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/tes4_xbox_write_test/in.bsa"</span>); + + <span class="kw">let </span>original = { + <span class="kw">let </span>fd = + fs::File::open(path).with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) } + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to memory map file: {path:?}"</span>))<span class="question-mark">? + </span>}; + + <span class="kw">let </span>copy = { + <span class="kw">let </span>(archive, options) = + Archive::read(path).with_context(|| <span class="macro">format!</span>(<span class="string">"failed to read archive: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); + archive + .write(<span class="kw-2">&mut </span>v, <span class="kw-2">&</span>options) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to write archive: {path:?}"</span>))<span class="question-mark">?</span>; + v + }; + + <span class="kw">let </span>original = <span class="kw-2">&</span>original[..]; + <span class="kw">let </span>copy = <span class="kw-2">&</span>copy[..]; + <span class="macro">assert_eq!</span>(original.len(), copy.len()); + <span class="macro">assert_eq!</span>(original, copy); + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>file_compression_diverges_from_archive_compression() -> anyhow::Result<()> { + <span class="kw">let </span>root = Path::new(<span class="string">"data/tes4_compression_mismatch_test"</span>); + <span class="kw">let </span>(bsa, options) = + Archive::read(root.join(<span class="string">"test.bsa"</span>).as_path()).context(<span class="string">"failed to read archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert!</span>(options.flags().compressed()); + + <span class="kw">let </span>files = [<span class="string">"License.txt"</span>, <span class="string">"SampleA.png"</span>]; + <span class="kw">let </span>directory = bsa + .get(<span class="kw-2">&</span>ArchiveKey::from(<span class="string">b"."</span>)) + .context(<span class="string">"failed to get root directory from archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(directory.len(), files.len()); + + <span class="kw">for </span>file_name <span class="kw">in </span>files { + <span class="kw">let </span>path = root.join(file_name); + <span class="kw">let </span>metadata = fs::metadata(<span class="kw-2">&</span>path) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get metadata for file: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>file = directory + .get(<span class="kw-2">&</span>DirectoryKey::from(file_name)) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get file from directory: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert!</span>(!file.is_compressed()); + <span class="macro">assert_eq!</span>(file.len() <span class="kw">as </span>u64, metadata.len()); + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>flag_combinations() -> anyhow::Result<()> { + <span class="kw">let </span>infos = { + <span class="kw">struct </span>Pair { + hash: u64, + name: <span class="kw-2">&</span><span class="lifetime">'static </span>str, + } + + <span class="kw">struct </span>Info { + directory: Pair, + file: Pair, + } + + <span class="kw">impl </span>Info { + <span class="kw">fn </span>new( + directory_hash: u64, + directory_name: <span class="kw-2">&</span><span class="lifetime">'static </span>str, + file_hash: u64, + file_name: <span class="kw-2">&</span><span class="lifetime">'static </span>str, + ) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + directory: Pair { + hash: directory_hash, + name: directory_name, + }, + file: Pair { + hash: file_hash, + name: file_name, + }, + } + } + } + + [ + Info::new( + <span class="number">0x006819F973057265</span>, + <span class="string">"Share"</span>, + <span class="number">0xDC415D456C077365</span>, + <span class="string">"License.txt"</span>, + ), + Info::new( + <span class="number">0x00691A4374056573</span>, + <span class="string">"Tiles"</span>, + <span class="number">0xDDE285B874093030</span>, + <span class="string">"tile_0000.png"</span>, + ), + Info::new( + <span class="number">0x0E09AFBA620A6E64</span>, + <span class="string">"Background"</span>, + <span class="number">0xC41A947762116F6D</span>, + <span class="string">"background_bottom.png"</span>, + ), + Info::new( + <span class="number">0x4ADF420B74076170</span>, + <span class="string">"Tilemap"</span>, + <span class="number">0x0D9BA627630A7273</span>, + <span class="string">"characters.png"</span>, + ), + Info::new( + <span class="number">0x6A326CD4630B2033</span>, + <span class="string">"Construct 3"</span>, + <span class="number">0xC7EDDCEA72066D65</span>, + <span class="string">"Readme.txt"</span>, + ), + Info::new( + <span class="number">0x79CD3FEC630A7273</span>, + <span class="string">"Characters"</span>, + <span class="number">0xD0E4FC14630E3030</span>, + <span class="string">"character_0000.png"</span>, + ), + ] + }; + + <span class="kw">let </span>mappings: Vec<<span class="kw">_</span>> = infos + .iter() + .map(|info| { + <span class="kw">let </span>path: PathBuf = [ + <span class="string">"data/tes4_flags_test"</span>, + <span class="string">"data"</span>, + info.directory.name, + info.file.name, + ] + .into_iter() + .collect(); + <span class="kw">let </span>fd = fs::File::open(<span class="kw-2">&</span>path) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to open file: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="kw">let </span>map = <span class="kw">unsafe </span>{ Mmap::map(<span class="kw-2">&</span>fd) } + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to memory map file: {path:?}"</span>))<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(map) + }) + .collect::<anyhow::Result<<span class="kw">_</span>>>()<span class="question-mark">?</span>; + <span class="kw">let </span>main: Archive = infos + .iter() + .zip(<span class="kw-2">&</span>mappings) + .map(|(info, mapping)| { + <span class="kw">let </span>file = File::from_decompressed(<span class="kw-2">&</span>mapping[..]); + <span class="kw">let </span>directory: Directory = [(info.file.name.into(), file)].into_iter().collect(); + (info.directory.name.into(), directory) + }) + .collect(); + + <span class="kw">let </span>test = |version: Version, flags: ArchiveFlags| -> anyhow::Result<()> { + <span class="kw">let </span>buffer = { + <span class="kw">let </span><span class="kw-2">mut </span>v = Vec::new(); + <span class="kw">let </span>options = ArchiveOptions::builder() + .version(version) + .flags(flags) + .build(); + main.write(<span class="kw-2">&mut </span>v, <span class="kw-2">&</span>options) + .context(<span class="string">"failed to write archive to buffer"</span>)<span class="question-mark">?</span>; + v + }; + + <span class="kw">let </span>(child, options) = + Archive::read(Borrowed(<span class="kw-2">&</span>buffer)).context(<span class="string">"failed to read archive from buffer"</span>)<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(options.version(), version); + <span class="macro">assert_eq!</span>(options.flags(), flags); + <span class="macro">assert_eq!</span>(main.len(), child.len()); + + <span class="kw">let </span>embedded_file_names = version != Version::v103 && flags.embedded_file_names(); + + <span class="kw">for </span>(info, mapping) <span class="kw">in </span>infos.iter().zip(<span class="kw-2">&</span>mappings) { + <span class="kw">let </span>archive_key: ArchiveKey = info.directory.name.into(); + <span class="kw">let </span>directory = child + .get_key_value(<span class="kw-2">&</span>archive_key) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get directory: {}"</span>, info.directory.name))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(directory.<span class="number">0</span>.hash().numeric(), info.directory.hash); + <span class="macro">assert_eq!</span>(directory.<span class="number">1</span>.len(), <span class="number">1</span>); + <span class="kw">if </span>flags.directory_strings() || embedded_file_names { + <span class="macro">assert_eq!</span>(directory.<span class="number">0</span>.name(), archive_key.name()); + } + + <span class="kw">let </span>directory_key: DirectoryKey = info.file.name.into(); + <span class="kw">let </span>file = directory + .<span class="number">1 + </span>.get_key_value(<span class="kw-2">&</span>directory_key) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get file: {}"</span>, info.file.name))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(file.<span class="number">0</span>.hash().numeric(), info.file.hash); + <span class="kw">if </span>flags.file_strings() || embedded_file_names { + <span class="macro">assert_eq!</span>(file.<span class="number">0</span>.name(), directory_key.name()); + } + + <span class="kw">let </span>decompressed_file = <span class="kw">if </span>file.<span class="number">1</span>.is_compressed() { + <span class="kw">let </span>options = FileCompressionOptions::builder().version(version).build(); + <span class="kw">let </span>result = file.<span class="number">1</span>.decompress(<span class="kw-2">&</span>options).with_context(|| { + <span class="macro">format!</span>(<span class="string">"failed to decompress file: {}"</span>, info.file.name) + })<span class="question-mark">?</span>; + <span class="prelude-val">Some</span>(result) + } <span class="kw">else </span>{ + <span class="prelude-val">None + </span>}; + <span class="kw">let </span>decompressed_bytes = decompressed_file.as_ref().unwrap_or(file.<span class="number">1</span>).as_bytes(); + <span class="macro">assert_eq!</span>(decompressed_bytes, <span class="kw-2">&</span>mapping[..]); + } + + <span class="prelude-val">Ok</span>(()) + }; + + <span class="kw">let </span>versions = [Version::v103, Version::v104, Version::v105]; + <span class="kw">let </span>flags = [ + ArchiveFlags::DIRECTORY_STRINGS, + ArchiveFlags::FILE_STRINGS, + ArchiveFlags::COMPRESSED, + ArchiveFlags::XBOX_ARCHIVE, + ArchiveFlags::EMBEDDED_FILE_NAMES, + ]; + + <span class="kw">for </span>version <span class="kw">in </span>versions { + <span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..flags.len() { + <span class="kw">for </span>j <span class="kw">in </span>i..flags.len() { + <span class="kw">let </span>f = flags[i..=j] + .iter() + .copied() + .reduce(|acc, x| acc.union(x)) + .unwrap(); + test(version, f).with_context(|| { + <span class="macro">format!</span>(<span class="string">"archive test failed for version ({version:?}) with flags ({f:?})"</span>) + })<span class="question-mark">?</span>; + } + } + } + + <span class="prelude-val">Ok</span>(()) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_magic() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/tes4_invalid_test/invalid_magic.bsa"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidMagic(<span class="number">0x00324142</span>)) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(err.into()), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_size() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/tes4_invalid_test/invalid_size.bsa"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidHeaderSize(<span class="number">0xCC</span>)) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(err.into()), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_version() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/tes4_invalid_test/invalid_version.bsa"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::InvalidVersion(<span class="number">42</span>)) => <span class="prelude-val">Ok</span>(()), + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(anyhow::Error::from(err)), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>invalid_exhausted() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/tes4_invalid_test/invalid_exhausted.bsa"</span>); + <span class="kw">match </span>Archive::read(path) { + <span class="prelude-val">Err</span>(Error::Io(error)) => { + <span class="macro">assert_eq!</span>(error.kind(), io::ErrorKind::UnexpectedEof); + <span class="prelude-val">Ok</span>(()) + } + <span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(err.into()), + <span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="macro">anyhow::bail!</span>(<span class="string">"read should have failed"</span>), + } + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>data_sharing_name() -> anyhow::Result<()> { + <span class="kw">let </span>path = Path::new(<span class="string">"data/tes4_data_sharing_name_test/share.bsa"</span>); + <span class="kw">let </span>(archive, options) = Archive::read(path).context(<span class="string">"failed to read archive"</span>)<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(options.version, Version::TES5); + <span class="macro">assert!</span>(options.flags.embedded_file_names()); + + <span class="kw">let </span>find = |directory_name: <span class="kw-2">&</span>str, file_name: <span class="kw-2">&</span>str| -> anyhow::Result<()> { + <span class="kw">let </span>directory = archive + .get_key_value(<span class="kw-2">&</span>ArchiveKey::from(directory_name)) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get directory: {directory_name}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(directory.<span class="number">0</span>.name(), directory_name); + + <span class="kw">let </span>file = directory + .<span class="number">1 + </span>.get_key_value(<span class="kw-2">&</span>DirectoryKey::from(file_name)) + .with_context(|| <span class="macro">format!</span>(<span class="string">"failed to get file: {file_name}"</span>))<span class="question-mark">?</span>; + <span class="macro">assert_eq!</span>(file.<span class="number">0</span>.name(), file_name); + + <span class="prelude-val">Ok</span>(()) + }; + + find(<span class="string">"misc1"</span>, <span class="string">"example1.txt"</span>)<span class="question-mark">?</span>; + find(<span class="string">"misc2"</span>, <span class="string">"example2.txt"</span>)<span class="question-mark">?</span>; + + <span class="prelude-val">Ok</span>(()) + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes4/directory.rs.html b/src/ba2/tes4/directory.rs.html new file mode 100644 index 0000000..cebc9a3 --- /dev/null +++ b/src/ba2/tes4/directory.rs.html @@ -0,0 +1,67 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes4/directory.rs`."><title>directory.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + derive, + tes4::{<span class="self">self</span>, File, FileHash}, +}; +<span class="kw">use </span>bstr::BString; + +<span class="macro">derive::key!</span>(Key: FileHash); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> Key<<span class="lifetime">'bytes</span>> { + <span class="attr">#[must_use] + </span><span class="kw">fn </span>hash_in_place(name: <span class="kw-2">&mut </span>BString) -> FileHash { + tes4::hash_file_in_place(name) + } +} + +<span class="macro">derive::mapping! </span>{ + <span class="doccomment">/// Represents a directory within the TES4 virtual filesystem. + </span>Directory + Map: (Key: FileHash) => File +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">crate</span>::tes4::Directory; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() { + <span class="kw">let </span>d = Directory::new(); + <span class="macro">assert!</span>(d.is_empty()); + <span class="macro">assert!</span>(d.len() == <span class="number">0</span>); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes4/file.rs.html b/src/ba2/tes4/file.rs.html new file mode 100644 index 0000000..eac4592 --- /dev/null +++ b/src/ba2/tes4/file.rs.html @@ -0,0 +1,699 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes4/file.rs`."><title>file.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +<a href="#253" id="253">253</a> +<a href="#254" id="254">254</a> +<a href="#255" id="255">255</a> +<a href="#256" id="256">256</a> +<a href="#257" id="257">257</a> +<a href="#258" id="258">258</a> +<a href="#259" id="259">259</a> +<a href="#260" id="260">260</a> +<a href="#261" id="261">261</a> +<a href="#262" id="262">262</a> +<a href="#263" id="263">263</a> +<a href="#264" id="264">264</a> +<a href="#265" id="265">265</a> +<a href="#266" id="266">266</a> +<a href="#267" id="267">267</a> +<a href="#268" id="268">268</a> +<a href="#269" id="269">269</a> +<a href="#270" id="270">270</a> +<a href="#271" id="271">271</a> +<a href="#272" id="272">272</a> +<a href="#273" id="273">273</a> +<a href="#274" id="274">274</a> +<a href="#275" id="275">275</a> +<a href="#276" id="276">276</a> +<a href="#277" id="277">277</a> +<a href="#278" id="278">278</a> +<a href="#279" id="279">279</a> +<a href="#280" id="280">280</a> +<a href="#281" id="281">281</a> +<a href="#282" id="282">282</a> +<a href="#283" id="283">283</a> +<a href="#284" id="284">284</a> +<a href="#285" id="285">285</a> +<a href="#286" id="286">286</a> +<a href="#287" id="287">287</a> +<a href="#288" id="288">288</a> +<a href="#289" id="289">289</a> +<a href="#290" id="290">290</a> +<a href="#291" id="291">291</a> +<a href="#292" id="292">292</a> +<a href="#293" id="293">293</a> +<a href="#294" id="294">294</a> +<a href="#295" id="295">295</a> +<a href="#296" id="296">296</a> +<a href="#297" id="297">297</a> +<a href="#298" id="298">298</a> +<a href="#299" id="299">299</a> +<a href="#300" id="300">300</a> +<a href="#301" id="301">301</a> +<a href="#302" id="302">302</a> +<a href="#303" id="303">303</a> +<a href="#304" id="304">304</a> +<a href="#305" id="305">305</a> +<a href="#306" id="306">306</a> +<a href="#307" id="307">307</a> +<a href="#308" id="308">308</a> +<a href="#309" id="309">309</a> +<a href="#310" id="310">310</a> +<a href="#311" id="311">311</a> +<a href="#312" id="312">312</a> +<a href="#313" id="313">313</a> +<a href="#314" id="314">314</a> +<a href="#315" id="315">315</a> +<a href="#316" id="316">316</a> +<a href="#317" id="317">317</a> +<a href="#318" id="318">318</a> +<a href="#319" id="319">319</a> +<a href="#320" id="320">320</a> +<a href="#321" id="321">321</a> +<a href="#322" id="322">322</a> +<a href="#323" id="323">323</a> +<a href="#324" id="324">324</a> +<a href="#325" id="325">325</a> +<a href="#326" id="326">326</a> +<a href="#327" id="327">327</a> +<a href="#328" id="328">328</a> +<a href="#329" id="329">329</a> +<a href="#330" id="330">330</a> +<a href="#331" id="331">331</a> +<a href="#332" id="332">332</a> +<a href="#333" id="333">333</a> +<a href="#334" id="334">334</a> +<a href="#335" id="335">335</a> +<a href="#336" id="336">336</a> +<a href="#337" id="337">337</a> +<a href="#338" id="338">338</a> +<a href="#339" id="339">339</a> +<a href="#340" id="340">340</a> +<a href="#341" id="341">341</a> +<a href="#342" id="342">342</a> +<a href="#343" id="343">343</a> +<a href="#344" id="344">344</a> +<a href="#345" id="345">345</a> +<a href="#346" id="346">346</a> +<a href="#347" id="347">347</a> +<a href="#348" id="348">348</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{ + containers::CompressableBytes, + derive, + io::Source, + tes4::{ArchiveOptions, CompressionCodec, Error, <span class="prelude-ty">Result</span>, Version}, + CompressionResult, +}; +<span class="kw">use </span>flate2::{ + write::{ZlibDecoder, ZlibEncoder}, + Compression, +}; +<span class="kw">use </span>lzzzz::lz4f::{<span class="self">self</span>, AutoFlush, PreferencesBuilder}; +<span class="kw">use </span>std::io::Write; + +<span class="doccomment">/// See also [`FileCompressionOptions`](CompressionOptions). +</span><span class="attr">#[derive(Debug, Default)] +#[repr(transparent)] +</span><span class="kw">pub struct </span>CompressionOptionsBuilder(CompressionOptions); + +<span class="kw">impl </span>CompressionOptionsBuilder { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>build(<span class="self">self</span>) -> CompressionOptions { + <span class="self">self</span>.<span class="number">0 + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_codec(<span class="kw-2">mut </span><span class="self">self</span>, compression_codec: CompressionCodec) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_codec = compression_codec; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>version(<span class="kw-2">mut </span><span class="self">self</span>, version: Version) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.version = version; + <span class="self">self + </span>} +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>CompressionOptionsBuilder { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>CompressionOptionsBuilder { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self</span>(value.into()) + } +} + +<span class="doccomment">/// Common parameters to configure how files are compressed/decompressed. +/// +/// ```rust +/// use ba2::tes4::{FileCompressionOptions, Version}; +/// +/// // Configure for TES:IV +/// let _ = FileCompressionOptions::builder() +/// .version(Version::TES4) +/// .build(); +/// +/// // Configure for F3/FNV/TES:V +/// let _ = FileCompressionOptions::builder() +/// .version(Version::FO3) +/// .build(); +/// +/// // Configure for SSE +/// let _ = FileCompressionOptions::builder() +/// .version(Version::SSE) +/// .build(); +/// ``` +</span><span class="attr">#[derive(Clone, Copy, Debug, Default)] +</span><span class="kw">pub struct </span>CompressionOptions { + version: Version, + compression_codec: CompressionCodec, +} + +<span class="kw">impl </span>CompressionOptions { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>builder() -> CompressionOptionsBuilder { + CompressionOptionsBuilder::new() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_codec(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionCodec { + <span class="self">self</span>.compression_codec + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>version(<span class="kw-2">&</span><span class="self">self</span>) -> Version { + <span class="self">self</span>.version + } +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>CompressionOptions { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>CompressionOptions { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + version: value.version(), + ..Default::default() + } + } +} + +<span class="doccomment">/// See also [`FileReadOptions`](ReadOptions). +</span><span class="attr">#[derive(Debug, Default)] +#[repr(transparent)] +</span><span class="kw">pub struct </span>ReadOptionsBuilder(ReadOptions); + +<span class="kw">impl </span>ReadOptionsBuilder { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>build(<span class="self">self</span>) -> ReadOptions { + <span class="self">self</span>.<span class="number">0 + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_codec(<span class="kw-2">mut </span><span class="self">self</span>, compression_codec: CompressionCodec) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_options.compression_codec = compression_codec; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_result(<span class="kw-2">mut </span><span class="self">self</span>, compression_result: CompressionResult) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_result = compression_result; + <span class="self">self + </span>} + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>version(<span class="kw-2">mut </span><span class="self">self</span>, version: Version) -> <span class="self">Self </span>{ + <span class="self">self</span>.<span class="number">0</span>.compression_options.version = version; + <span class="self">self + </span>} +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>ReadOptionsBuilder { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>ReadOptionsBuilder { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self</span>(value.into()) + } +} + +<span class="doccomment">/// Common parameters to configure how files are read. +/// +/// ```rust +/// use ba2::{ +/// tes4::{FileReadOptions, Version}, +/// CompressionResult, +/// }; +/// +/// // Read and compress a file for TES:IV +/// let _ = FileReadOptions::builder() +/// .version(Version::TES4) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// +/// // Read and compress a file for F3/FNV/TES:V +/// let _ = FileReadOptions::builder() +/// .version(Version::FO3) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// +/// // Read and compress a file for SSE +/// let _ = FileReadOptions::builder() +/// .version(Version::SSE) +/// .compression_result(CompressionResult::Compressed) +/// .build(); +/// ``` +</span><span class="attr">#[derive(Clone, Copy, Debug, Default)] +</span><span class="kw">pub struct </span>ReadOptions { + compression_options: CompressionOptions, + compression_result: CompressionResult, +} + +<span class="kw">impl </span>ReadOptions { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>builder() -> ReadOptionsBuilder { + ReadOptionsBuilder::new() + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_codec(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionCodec { + <span class="self">self</span>.compression_options.compression_codec + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>compression_result(<span class="kw-2">&</span><span class="self">self</span>) -> CompressionResult { + <span class="self">self</span>.compression_result + } + + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>version(<span class="kw-2">&</span><span class="self">self</span>) -> Version { + <span class="self">self</span>.compression_options.version + } +} + +<span class="kw">impl </span>From<ArchiveOptions> <span class="kw">for </span>ReadOptions { + <span class="kw">fn </span>from(value: ArchiveOptions) -> <span class="self">Self </span>{ + (<span class="kw-2">&</span>value).into() + } +} + +<span class="kw">impl </span>From<<span class="kw-2">&</span>ArchiveOptions> <span class="kw">for </span>ReadOptions { + <span class="kw">fn </span>from(value: <span class="kw-2">&</span>ArchiveOptions) -> <span class="self">Self </span>{ + <span class="self">Self </span>{ + compression_options: value.into(), + ..Default::default() + } + } +} + +<span class="doccomment">/// Represents a file within the TES4 virtual filesystem. +</span><span class="attr">#[derive(Clone, Debug, Default)] +</span><span class="kw">pub struct </span>File<<span class="lifetime">'bytes</span>> { + <span class="kw">pub</span>(<span class="kw">crate</span>) bytes: CompressableBytes<<span class="lifetime">'bytes</span>>, +} + +<span class="kw">type </span>ReadResult<T> = T; +<span class="macro">derive::compressable_bytes!</span>(File: CompressionOptions); +<span class="macro">derive::reader_with_options!</span>((File: ReadOptions) => ReadResult); + +<span class="kw">impl</span><<span class="lifetime">'bytes</span>> File<<span class="lifetime">'bytes</span>> { + <span class="kw">pub fn </span>compress_into(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>, options: <span class="kw-2">&</span>CompressionOptions) -> <span class="prelude-ty">Result</span><()> { + <span class="kw">if </span><span class="self">self</span>.is_compressed() { + <span class="prelude-val">Err</span>(Error::AlreadyCompressed) + } <span class="kw">else </span>{ + <span class="kw">match </span>options.version { + Version::v103 => <span class="self">self</span>.compress_into_zlib(out), + Version::v104 => <span class="kw">match </span>options.compression_codec { + CompressionCodec::Normal => <span class="self">self</span>.compress_into_zlib(out), + }, + Version::v105 => <span class="self">self</span>.compress_into_lz4(out), + } + } + } + + <span class="kw">pub fn </span>decompress_into(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>, options: <span class="kw-2">&</span>CompressionOptions) -> <span class="prelude-ty">Result</span><()> { + <span class="kw">let </span><span class="prelude-val">Some</span>(decompressed_len) = <span class="self">self</span>.decompressed_len() <span class="kw">else </span>{ + <span class="kw">return </span><span class="prelude-val">Err</span>(Error::AlreadyDecompressed); + }; + + out.reserve_exact(decompressed_len); + <span class="kw">let </span>out_len = <span class="kw">match </span>options.version { + Version::v103 => <span class="self">self</span>.decompress_into_zlib(out), + Version::v104 => <span class="kw">match </span>options.compression_codec { + CompressionCodec::Normal => <span class="self">self</span>.decompress_into_zlib(out), + }, + Version::v105 => <span class="self">self</span>.decompress_into_lz4(out), + }<span class="question-mark">?</span>; + + <span class="kw">if </span>out_len == decompressed_len { + <span class="prelude-val">Ok</span>(()) + } <span class="kw">else </span>{ + <span class="prelude-val">Err</span>(Error::DecompressionSizeMismatch { + expected: decompressed_len, + actual: out_len, + }) + } + } + + <span class="attr">#[allow(clippy::unused_self)] + </span><span class="kw">fn </span>copy_with<<span class="lifetime">'other</span>>(<span class="kw-2">&</span><span class="self">self</span>, bytes: CompressableBytes<<span class="lifetime">'other</span>>) -> File<<span class="lifetime">'other</span>> { + File { bytes } + } + + <span class="kw">fn </span>compress_into_lz4(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>) -> <span class="prelude-ty">Result</span><()> { + <span class="kw">let </span>prefs = PreferencesBuilder::new() + .compression_level(<span class="number">9</span>) + .auto_flush(AutoFlush::Enabled) + .build(); + lz4f::compress_to_vec(<span class="self">self</span>.as_bytes(), out, <span class="kw-2">&</span>prefs)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>compress_into_zlib(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>) -> <span class="prelude-ty">Result</span><()> { + <span class="kw">let </span><span class="kw-2">mut </span>e = ZlibEncoder::new(out, Compression::default()); + e.write_all(<span class="self">self</span>.as_bytes())<span class="question-mark">?</span>; + e.finish()<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(()) + } + + <span class="kw">fn </span>decompress_into_lz4(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>) -> <span class="prelude-ty">Result</span><usize> { + <span class="kw">let </span>len = lz4f::decompress_to_vec(<span class="self">self</span>.as_bytes(), out)<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(len) + } + + <span class="kw">fn </span>decompress_into_zlib(<span class="kw-2">&</span><span class="self">self</span>, out: <span class="kw-2">&mut </span>Vec<u8>) -> <span class="prelude-ty">Result</span><usize> { + <span class="kw">let </span><span class="kw-2">mut </span>d = ZlibDecoder::new(out); + d.write_all(<span class="self">self</span>.as_bytes())<span class="question-mark">?</span>; + <span class="prelude-val">Ok</span>(d.total_out().try_into()<span class="question-mark">?</span>) + } + + <span class="attr">#[allow(clippy::trivially_copy_pass_by_ref)] + </span><span class="kw">fn </span>do_read<In>(stream: <span class="kw-2">&mut </span>In, options: <span class="kw-2">&</span>ReadOptions) -> <span class="prelude-ty">Result</span><ReadResult<<span class="self">Self</span>>> + <span class="kw">where + </span>In: <span class="question-mark">?</span>Sized + Source<<span class="lifetime">'bytes</span>>, + { + <span class="kw">let </span>decompressed = <span class="self">Self </span>{ + bytes: stream.read_bytes_to_end().into_compressable(<span class="prelude-val">None</span>), + }; + <span class="kw">match </span>options.compression_result { + CompressionResult::Decompressed => <span class="prelude-val">Ok</span>(decompressed), + CompressionResult::Compressed => decompressed.compress(<span class="kw-2">&</span>options.compression_options), + } + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use crate</span>::{prelude::<span class="kw-2">*</span>, tes4::File}; + + <span class="attr">#[test] + </span><span class="kw">fn </span>default_state() { + <span class="kw">let </span>f = File::new(); + <span class="macro">assert!</span>(!f.is_compressed()); + <span class="macro">assert!</span>(f.is_empty()); + <span class="macro">assert_eq!</span>(f.len(), <span class="number">0</span>); + <span class="macro">assert_eq!</span>(f.as_bytes().len(), <span class="number">0</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>assign_state() { + <span class="kw">let </span>payload = [<span class="number">0u8</span>; <span class="number">64</span>]; + <span class="kw">let </span>f = File::from_decompressed(<span class="kw-2">&</span>payload[..]); + <span class="macro">assert_eq!</span>(f.len(), payload.len()); + <span class="macro">assert_eq!</span>(f.as_ptr(), payload.as_ptr()); + <span class="macro">assert_eq!</span>(f.as_bytes().len(), payload.len()); + <span class="macro">assert_eq!</span>(f.as_bytes().as_ptr(), payload.as_ptr()); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes4/hashing.rs.html b/src/ba2/tes4/hashing.rs.html new file mode 100644 index 0000000..bf67056 --- /dev/null +++ b/src/ba2/tes4/hashing.rs.html @@ -0,0 +1,507 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes4/hashing.rs`."><title>hashing.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +<a href="#171" id="171">171</a> +<a href="#172" id="172">172</a> +<a href="#173" id="173">173</a> +<a href="#174" id="174">174</a> +<a href="#175" id="175">175</a> +<a href="#176" id="176">176</a> +<a href="#177" id="177">177</a> +<a href="#178" id="178">178</a> +<a href="#179" id="179">179</a> +<a href="#180" id="180">180</a> +<a href="#181" id="181">181</a> +<a href="#182" id="182">182</a> +<a href="#183" id="183">183</a> +<a href="#184" id="184">184</a> +<a href="#185" id="185">185</a> +<a href="#186" id="186">186</a> +<a href="#187" id="187">187</a> +<a href="#188" id="188">188</a> +<a href="#189" id="189">189</a> +<a href="#190" id="190">190</a> +<a href="#191" id="191">191</a> +<a href="#192" id="192">192</a> +<a href="#193" id="193">193</a> +<a href="#194" id="194">194</a> +<a href="#195" id="195">195</a> +<a href="#196" id="196">196</a> +<a href="#197" id="197">197</a> +<a href="#198" id="198">198</a> +<a href="#199" id="199">199</a> +<a href="#200" id="200">200</a> +<a href="#201" id="201">201</a> +<a href="#202" id="202">202</a> +<a href="#203" id="203">203</a> +<a href="#204" id="204">204</a> +<a href="#205" id="205">205</a> +<a href="#206" id="206">206</a> +<a href="#207" id="207">207</a> +<a href="#208" id="208">208</a> +<a href="#209" id="209">209</a> +<a href="#210" id="210">210</a> +<a href="#211" id="211">211</a> +<a href="#212" id="212">212</a> +<a href="#213" id="213">213</a> +<a href="#214" id="214">214</a> +<a href="#215" id="215">215</a> +<a href="#216" id="216">216</a> +<a href="#217" id="217">217</a> +<a href="#218" id="218">218</a> +<a href="#219" id="219">219</a> +<a href="#220" id="220">220</a> +<a href="#221" id="221">221</a> +<a href="#222" id="222">222</a> +<a href="#223" id="223">223</a> +<a href="#224" id="224">224</a> +<a href="#225" id="225">225</a> +<a href="#226" id="226">226</a> +<a href="#227" id="227">227</a> +<a href="#228" id="228">228</a> +<a href="#229" id="229">229</a> +<a href="#230" id="230">230</a> +<a href="#231" id="231">231</a> +<a href="#232" id="232">232</a> +<a href="#233" id="233">233</a> +<a href="#234" id="234">234</a> +<a href="#235" id="235">235</a> +<a href="#236" id="236">236</a> +<a href="#237" id="237">237</a> +<a href="#238" id="238">238</a> +<a href="#239" id="239">239</a> +<a href="#240" id="240">240</a> +<a href="#241" id="241">241</a> +<a href="#242" id="242">242</a> +<a href="#243" id="243">243</a> +<a href="#244" id="244">244</a> +<a href="#245" id="245">245</a> +<a href="#246" id="246">246</a> +<a href="#247" id="247">247</a> +<a href="#248" id="248">248</a> +<a href="#249" id="249">249</a> +<a href="#250" id="250">250</a> +<a href="#251" id="251">251</a> +<a href="#252" id="252">252</a> +</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{cc, derive, hashing}; +<span class="kw">use </span>bstr::{BStr, BString, ByteSlice <span class="kw">as _</span>}; +<span class="kw">use </span>core::cmp::Ordering; + +<span class="doccomment">/// The underlying hash object used to uniquely identify objects within the archive. +</span><span class="attr">#[derive(Clone, Copy, Debug, Default)] +#[repr(C)] +</span><span class="kw">pub struct </span>Hash { + <span class="doccomment">/// The last character of the path (directory) or stem (file). + </span><span class="kw">pub </span>last: u8, + <span class="doccomment">/// The second to last character of the path (directory) or stem (file). + </span><span class="kw">pub </span>last2: u8, + <span class="doccomment">/// The length of the path (directory) or stem (file). + </span><span class="kw">pub </span>length: u8, + <span class="doccomment">/// The first character of the path (directory) or stem (file). + </span><span class="kw">pub </span>first: u8, + <span class="kw">pub </span>crc: u32, +} + +<span class="macro">derive::hash!</span>(DirectoryHash); +<span class="macro">derive::hash!</span>(FileHash); + +<span class="kw">impl </span>Hash { + <span class="attr">#[must_use] + </span><span class="kw">pub fn </span>new() -> <span class="self">Self </span>{ + <span class="self">Self</span>::default() + } + + <span class="attr">#[allow(clippy::identity_op, clippy::erasing_op)] + #[must_use] + </span><span class="kw">pub fn </span>numeric(<span class="kw-2">&</span><span class="self">self</span>) -> u64 { + (u64::from(<span class="self">self</span>.last) << (<span class="number">0 </span>* <span class="number">8</span>)) + | (u64::from(<span class="self">self</span>.last2) << (<span class="number">1 </span>* <span class="number">8</span>)) + | (u64::from(<span class="self">self</span>.length) << (<span class="number">2 </span>* <span class="number">8</span>)) + | (u64::from(<span class="self">self</span>.first) << (<span class="number">3 </span>* <span class="number">8</span>)) + | (u64::from(<span class="self">self</span>.crc) << (<span class="number">4 </span>* <span class="number">8</span>)) + } +} + +<span class="kw">impl </span>PartialEq <span class="kw">for </span>Hash { + <span class="kw">fn </span>eq(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> bool { + <span class="self">self</span>.numeric() == other.numeric() + } +} + +<span class="kw">impl </span>Eq <span class="kw">for </span>Hash {} + +<span class="kw">impl </span>PartialOrd <span class="kw">for </span>Hash { + <span class="kw">fn </span>partial_cmp(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> <span class="prelude-ty">Option</span><Ordering> { + <span class="prelude-val">Some</span>(<span class="self">self</span>.cmp(other)) + } +} + +<span class="kw">impl </span>Ord <span class="kw">for </span>Hash { + <span class="kw">fn </span>cmp(<span class="kw-2">&</span><span class="self">self</span>, other: <span class="kw-2">&</span><span class="self">Self</span>) -> Ordering { + <span class="self">self</span>.numeric().cmp(<span class="kw-2">&</span>other.numeric()) + } +} + +<span class="kw">fn </span>crc32(bytes: <span class="kw-2">&</span>[u8]) -> u32 { + <span class="kw">let </span><span class="kw-2">mut </span>crc: u32 = <span class="number">0</span>; + <span class="kw">for </span><span class="kw-2">&</span>b <span class="kw">in </span>bytes { + crc = u32::from(b).wrapping_add(crc.wrapping_mul(<span class="number">0x1003F</span>)); + } + crc +} + +<span class="doccomment">/// Produces a hash using the given path. +</span><span class="attr">#[must_use] +</span><span class="kw">pub fn </span>hash_directory(path: <span class="kw-2">&</span>BStr) -> (DirectoryHash, BString) { + <span class="kw">let </span><span class="kw-2">mut </span>path = path.to_owned(); + (hash_directory_in_place(<span class="kw-2">&mut </span>path), path) +} + +<span class="doccomment">/// Produces a hash using the given path. +/// +/// The path is normalized in place. After the function returns, the path contains the string that would be stored on disk. +</span><span class="attr">#[must_use] +</span><span class="kw">pub fn </span>hash_directory_in_place(path: <span class="kw-2">&mut </span>BString) -> DirectoryHash { + hashing::normalize_path(path); + <span class="kw">let </span><span class="kw-2">mut </span>h = Hash::new(); + <span class="kw">let </span>len = path.len(); + <span class="kw">if </span>len >= <span class="number">3 </span>{ + h.last2 = path[len - <span class="number">2</span>]; + } + <span class="kw">if </span>len >= <span class="number">1 </span>{ + h.last = path[len - <span class="number">1</span>]; + h.first = path[<span class="number">0</span>]; + } + + <span class="comment">// truncation here is intentional, this is how bethesda does it + </span><span class="attr">#[allow(clippy::cast_possible_truncation)] + </span>{ + h.length = len <span class="kw">as </span>u8; + } + + <span class="kw">if </span>h.length > <span class="number">3 </span>{ + <span class="comment">// skip first and last two chars -> already processed + </span>h.crc = crc32(<span class="kw-2">&</span>path[<span class="number">1</span>..len - <span class="number">2</span>]); + } + + h.into() +} + +<span class="doccomment">/// Produces a hash using the given path. +</span><span class="attr">#[must_use] +</span><span class="kw">pub fn </span>hash_file(path: <span class="kw-2">&</span>BStr) -> (FileHash, BString) { + <span class="kw">let </span><span class="kw-2">mut </span>path = path.to_owned(); + (hash_file_in_place(<span class="kw-2">&mut </span>path), path) +} + +<span class="doccomment">/// Produces a hash using the given path. +/// +/// The path is normalized in place. After the function returns, the path contains the string that would be stored on disk. +</span><span class="attr">#[must_use] +</span><span class="kw">pub fn </span>hash_file_in_place(path: <span class="kw-2">&mut </span>BString) -> FileHash { + <span class="kw">const </span>LUT: [u32; <span class="number">6</span>] = [ + cc::make_four(<span class="string">b""</span>), + cc::make_four(<span class="string">b".nif"</span>), + cc::make_four(<span class="string">b".kf"</span>), + cc::make_four(<span class="string">b".dds"</span>), + cc::make_four(<span class="string">b".wav"</span>), + cc::make_four(<span class="string">b".adp"</span>), + ]; + + hashing::normalize_path(path); + <span class="kw">if let </span><span class="prelude-val">Some</span>(pos) = path.iter().rposition(|<span class="kw-2">&</span>x| x == <span class="string">b'\\'</span>) { + path.drain(..=pos); + } + + <span class="kw">let </span>path: <span class="kw-2">&</span><span class="kw">_ </span>= path; + <span class="kw">let </span>(stem, extension) = <span class="kw">if let </span><span class="prelude-val">Some</span>(split_at) = path.iter().rposition(|<span class="kw-2">&</span>x| x == <span class="string">b'.'</span>) { + (<span class="kw-2">&</span>path[..split_at], <span class="kw-2">&</span>path[split_at..]) + } <span class="kw">else </span>{ + (<span class="kw-2">&</span>path[..], <span class="string">b""</span>.as_slice()) + }; + + <span class="kw">if </span>!stem.is_empty() && stem.len() < <span class="number">260 </span>&& extension.len() < <span class="number">16 </span>{ + <span class="kw">let </span><span class="kw-2">mut </span>h: Hash = hash_directory(stem.as_bstr()).<span class="number">0</span>.into(); + h.crc = u32::wrapping_add(h.crc, crc32(extension)); + + <span class="kw">let </span>cc = cc::make_four(extension); + <span class="comment">// truncations are on purpose + </span><span class="attr">#[allow(clippy::cast_possible_truncation)] + </span><span class="kw">if let </span><span class="prelude-val">Some</span>(i) = LUT.iter().position(|<span class="kw-2">&</span>x| x == cc) { + <span class="kw">let </span>i = i <span class="kw">as </span>u8; + h.first = u32::from(h.first).wrapping_add(<span class="number">32 </span>* u32::from(i & <span class="number">0xFC</span>)) <span class="kw">as </span>u8; + h.last = u32::from(h.last).wrapping_add(u32::from(i & <span class="number">0xFE</span>) << <span class="number">6</span>) <span class="kw">as </span>u8; + h.last2 = u32::from(h.last2).wrapping_add(u32::from(i.wrapping_shl(<span class="number">7</span>))) <span class="kw">as </span>u8; + } + + h.into() + } <span class="kw">else </span>{ + FileHash::default() + } +} + +<span class="attr">#[cfg(test)] +</span><span class="kw">mod </span>tests { + <span class="kw">use </span><span class="kw">crate</span>::tes4; + <span class="kw">use </span>bstr::ByteSlice <span class="kw">as _</span>; + + <span class="attr">#[test] + </span><span class="kw">fn </span>validate_directory_hashes() { + <span class="kw">let </span>h = |path: <span class="kw-2">&</span>[u8]| tes4::hash_directory(path.as_bstr()).<span class="number">0</span>.numeric(); + <span class="macro">assert_eq!</span>( + h(<span class="string">b"textures/armor/amuletsandrings/elder council"</span>), + <span class="number">0x04BC422C742C696C + </span>); + <span class="macro">assert_eq!</span>( + h(<span class="string">b"sound/voice/skyrim.esm/maleuniquedbguardian"</span>), + <span class="number">0x594085AC732B616E + </span>); + <span class="macro">assert_eq!</span>(h(<span class="string">b"textures/architecture/windhelm"</span>), <span class="number">0xC1D97EBE741E6C6D</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>validate_file_hashes() { + <span class="kw">let </span>h = |path: <span class="kw-2">&</span>[u8]| tes4::hash_file(path.as_bstr()).<span class="number">0</span>.numeric(); + <span class="macro">assert_eq!</span>(h(<span class="string">b"darkbrotherhood__0007469a_1.fuz"</span>), <span class="number">0x011F11B0641B5F31</span>); + <span class="macro">assert_eq!</span>(h(<span class="string">b"elder_council_amulet_n.dds"</span>), <span class="number">0xDC531E2F6516DFEE</span>); + <span class="macro">assert_eq!</span>( + h(<span class="string">b"testtoddquest_testtoddhappy_00027fa2_1.mp3"</span>), + <span class="number">0xDE0301EE74265F31 + </span>); + <span class="macro">assert_eq!</span>(h(<span class="string">b"Mar\xEDa_F.fuz"</span>), <span class="number">0x690E07826D075F66</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>empty_path_equivalent_to_current_path() { + <span class="kw">let </span>empty = tes4::hash_directory(<span class="string">b""</span>.as_bstr()); + <span class="kw">let </span>current = tes4::hash_directory(<span class="string">b"."</span>.as_bstr()); + <span class="macro">assert_eq!</span>(empty, current); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>archive_tool_detects_file_extensions_incorrectly() { + <span class="kw">let </span>gitignore = tes4::hash_file(<span class="string">b".gitignore"</span>.as_bstr()).<span class="number">0</span>; + <span class="kw">let </span>gitmodules = tes4::hash_file(<span class="string">b".gitmodules"</span>.as_bstr()).<span class="number">0</span>; + <span class="macro">assert_eq!</span>(gitignore, gitmodules); + <span class="macro">assert_eq!</span>(gitignore.first, <span class="string">b'\0'</span>); + <span class="macro">assert_eq!</span>(gitignore.last2, <span class="string">b'\0'</span>); + <span class="macro">assert_eq!</span>(gitignore.last, <span class="string">b'\0'</span>); + <span class="macro">assert_eq!</span>(gitignore.length, <span class="number">0</span>); + <span class="macro">assert_eq!</span>(gitignore.crc, <span class="number">0</span>); + <span class="macro">assert_eq!</span>(gitignore.numeric(), <span class="number">0</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>root_paths_are_included_in_hashes() { + <span class="kw">let </span>h1 = tes4::hash_directory(<span class="string">b"C:\\foo\\bar\\baz"</span>.as_bstr()).<span class="number">0</span>; + <span class="kw">let </span>h2 = tes4::hash_directory(<span class="string">b"foo/bar/baz"</span>.as_bstr()).<span class="number">0</span>; + <span class="macro">assert_ne!</span>(h1, h2); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>directories_longer_than_259_chars_are_equivalent_to_empty_path() { + <span class="kw">let </span>long = tes4::hash_directory([<span class="number">0u8</span>; <span class="number">260</span>].as_bstr()).<span class="number">0</span>; + <span class="kw">let </span>empty = tes4::hash_directory(<span class="string">b""</span>.as_bstr()).<span class="number">0</span>; + <span class="macro">assert_eq!</span>(long, empty); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>files_longer_than_259_chars_will_fail() { + <span class="kw">let </span>good = tes4::hash_file([<span class="number">0u8</span>; <span class="number">259</span>].as_bstr()).<span class="number">0</span>; + <span class="kw">let </span>bad = tes4::hash_file([<span class="number">0u8</span>; <span class="number">260</span>].as_bstr()).<span class="number">0</span>; + <span class="macro">assert_ne!</span>(good.numeric(), <span class="number">0</span>); + <span class="macro">assert_eq!</span>(bad.numeric(), <span class="number">0</span>) + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>file_extensions_longer_than_14_chars_will_fail() { + <span class="kw">let </span>good = tes4::hash_file(<span class="string">b"test.123456789ABCDE"</span>.as_bstr()).<span class="number">0</span>; + <span class="kw">let </span>bad = tes4::hash_file(<span class="string">b"test.123456789ABCDEF"</span>.as_bstr()).<span class="number">0</span>; + <span class="macro">assert_ne!</span>(good.numeric(), <span class="number">0</span>); + <span class="macro">assert_eq!</span>(bad.numeric(), <span class="number">0</span>); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>root_paths_are_included_in_directory_names() { + <span class="kw">let </span>h1 = tes4::hash_directory(<span class="string">b"C:\\foo\\bar\\baz"</span>.as_bstr()).<span class="number">0</span>; + <span class="kw">let </span>h2 = tes4::hash_directory(<span class="string">b"foo\\bar\\baz"</span>.as_bstr()).<span class="number">0</span>; + <span class="macro">assert_ne!</span>(h1, h2); + } + + <span class="attr">#[test] + </span><span class="kw">fn </span>parent_directories_are_not_included_in_file_names() { + <span class="kw">let </span>h1 = tes4::hash_file(<span class="string">b"users/john/test.txt"</span>.as_bstr()).<span class="number">0</span>; + <span class="kw">let </span>h2 = tes4::hash_file(<span class="string">b"test.txt"</span>.as_bstr()).<span class="number">0</span>; + <span class="macro">assert_eq!</span>(h1, h2); + } +} +</code></pre></div></section></main></body></html> \ No newline at end of file diff --git a/src/ba2/tes4/mod.rs.html b/src/ba2/tes4/mod.rs.html new file mode 100644 index 0000000..6667f95 --- /dev/null +++ b/src/ba2/tes4/mod.rs.html @@ -0,0 +1,343 @@ +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src/tes4/mod.rs`."><title>mod.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-5bc39a1768837dd0.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="ba2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.77.0 (aedd173a2 2024-03-17)" data-channel="1.77.0" data-search-js="search-dd67cee4cfa65049.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../../../static.files/src-script-e66d777a5a92e9b2.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-48f368f3872407c8.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"> + <h2>Files</h2></div></nav><div class="sidebar-resizer"></div> + <main><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../ba2/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"><a href="#1" id="1">1</a> +<a href="#2" id="2">2</a> +<a href="#3" id="3">3</a> +<a href="#4" id="4">4</a> +<a href="#5" id="5">5</a> +<a href="#6" id="6">6</a> +<a href="#7" id="7">7</a> +<a href="#8" id="8">8</a> +<a href="#9" id="9">9</a> +<a href="#10" id="10">10</a> +<a href="#11" id="11">11</a> +<a href="#12" id="12">12</a> +<a href="#13" id="13">13</a> +<a href="#14" id="14">14</a> +<a href="#15" id="15">15</a> +<a href="#16" id="16">16</a> +<a href="#17" id="17">17</a> +<a href="#18" id="18">18</a> +<a href="#19" id="19">19</a> +<a href="#20" id="20">20</a> +<a href="#21" id="21">21</a> +<a href="#22" id="22">22</a> +<a href="#23" id="23">23</a> +<a href="#24" id="24">24</a> +<a href="#25" id="25">25</a> +<a href="#26" id="26">26</a> +<a href="#27" id="27">27</a> +<a href="#28" id="28">28</a> +<a href="#29" id="29">29</a> +<a href="#30" id="30">30</a> +<a href="#31" id="31">31</a> +<a href="#32" id="32">32</a> +<a href="#33" id="33">33</a> +<a href="#34" id="34">34</a> +<a href="#35" id="35">35</a> +<a href="#36" id="36">36</a> +<a href="#37" id="37">37</a> +<a href="#38" id="38">38</a> +<a href="#39" id="39">39</a> +<a href="#40" id="40">40</a> +<a href="#41" id="41">41</a> +<a href="#42" id="42">42</a> +<a href="#43" id="43">43</a> +<a href="#44" id="44">44</a> +<a href="#45" id="45">45</a> +<a href="#46" id="46">46</a> +<a href="#47" id="47">47</a> +<a href="#48" id="48">48</a> +<a href="#49" id="49">49</a> +<a href="#50" id="50">50</a> +<a href="#51" id="51">51</a> +<a href="#52" id="52">52</a> +<a href="#53" id="53">53</a> +<a href="#54" id="54">54</a> +<a href="#55" id="55">55</a> +<a href="#56" id="56">56</a> +<a href="#57" id="57">57</a> +<a href="#58" id="58">58</a> +<a href="#59" id="59">59</a> +<a href="#60" id="60">60</a> +<a href="#61" id="61">61</a> +<a href="#62" id="62">62</a> +<a href="#63" id="63">63</a> +<a href="#64" id="64">64</a> +<a href="#65" id="65">65</a> +<a href="#66" id="66">66</a> +<a href="#67" id="67">67</a> +<a href="#68" id="68">68</a> +<a href="#69" id="69">69</a> +<a href="#70" id="70">70</a> +<a href="#71" id="71">71</a> +<a href="#72" id="72">72</a> +<a href="#73" id="73">73</a> +<a href="#74" id="74">74</a> +<a href="#75" id="75">75</a> +<a href="#76" id="76">76</a> +<a href="#77" id="77">77</a> +<a href="#78" id="78">78</a> +<a href="#79" id="79">79</a> +<a href="#80" id="80">80</a> +<a href="#81" id="81">81</a> +<a href="#82" id="82">82</a> +<a href="#83" id="83">83</a> +<a href="#84" id="84">84</a> +<a href="#85" id="85">85</a> +<a href="#86" id="86">86</a> +<a href="#87" id="87">87</a> +<a href="#88" id="88">88</a> +<a href="#89" id="89">89</a> +<a href="#90" id="90">90</a> +<a href="#91" id="91">91</a> +<a href="#92" id="92">92</a> +<a href="#93" id="93">93</a> +<a href="#94" id="94">94</a> +<a href="#95" id="95">95</a> +<a href="#96" id="96">96</a> +<a href="#97" id="97">97</a> +<a href="#98" id="98">98</a> +<a href="#99" id="99">99</a> +<a href="#100" id="100">100</a> +<a href="#101" id="101">101</a> +<a href="#102" id="102">102</a> +<a href="#103" id="103">103</a> +<a href="#104" id="104">104</a> +<a href="#105" id="105">105</a> +<a href="#106" id="106">106</a> +<a href="#107" id="107">107</a> +<a href="#108" id="108">108</a> +<a href="#109" id="109">109</a> +<a href="#110" id="110">110</a> +<a href="#111" id="111">111</a> +<a href="#112" id="112">112</a> +<a href="#113" id="113">113</a> +<a href="#114" id="114">114</a> +<a href="#115" id="115">115</a> +<a href="#116" id="116">116</a> +<a href="#117" id="117">117</a> +<a href="#118" id="118">118</a> +<a href="#119" id="119">119</a> +<a href="#120" id="120">120</a> +<a href="#121" id="121">121</a> +<a href="#122" id="122">122</a> +<a href="#123" id="123">123</a> +<a href="#124" id="124">124</a> +<a href="#125" id="125">125</a> +<a href="#126" id="126">126</a> +<a href="#127" id="127">127</a> +<a href="#128" id="128">128</a> +<a href="#129" id="129">129</a> +<a href="#130" id="130">130</a> +<a href="#131" id="131">131</a> +<a href="#132" id="132">132</a> +<a href="#133" id="133">133</a> +<a href="#134" id="134">134</a> +<a href="#135" id="135">135</a> +<a href="#136" id="136">136</a> +<a href="#137" id="137">137</a> +<a href="#138" id="138">138</a> +<a href="#139" id="139">139</a> +<a href="#140" id="140">140</a> +<a href="#141" id="141">141</a> +<a href="#142" id="142">142</a> +<a href="#143" id="143">143</a> +<a href="#144" id="144">144</a> +<a href="#145" id="145">145</a> +<a href="#146" id="146">146</a> +<a href="#147" id="147">147</a> +<a href="#148" id="148">148</a> +<a href="#149" id="149">149</a> +<a href="#150" id="150">150</a> +<a href="#151" id="151">151</a> +<a href="#152" id="152">152</a> +<a href="#153" id="153">153</a> +<a href="#154" id="154">154</a> +<a href="#155" id="155">155</a> +<a href="#156" id="156">156</a> +<a href="#157" id="157">157</a> +<a href="#158" id="158">158</a> +<a href="#159" id="159">159</a> +<a href="#160" id="160">160</a> +<a href="#161" id="161">161</a> +<a href="#162" id="162">162</a> +<a href="#163" id="163">163</a> +<a href="#164" id="164">164</a> +<a href="#165" id="165">165</a> +<a href="#166" id="166">166</a> +<a href="#167" id="167">167</a> +<a href="#168" id="168">168</a> +<a href="#169" id="169">169</a> +<a href="#170" id="170">170</a> +</pre></div><pre class="rust"><code><span class="attr">#![doc(alias = <span class="string">"oblivion"</span>)] +#![doc(alias = <span class="string">"fallout 3"</span>)] +#![doc(alias = <span class="string">"fo3"</span>)] +#![doc(alias = <span class="string">"fallout new vegas"</span>)] +#![doc(alias = <span class="string">"new vegas"</span>)] +#![doc(alias = <span class="string">"fnv"</span>)] +#![doc(alias = <span class="string">"tes5"</span>)] +#![doc(alias = <span class="string">"skyrim"</span>)] +#![doc(alias = <span class="string">"sse"</span>)] +#![doc(alias = <span class="string">"special edition"</span>)] + +</span><span class="doccomment">//! TES IV: Oblivion +//! +//! *"You ... I've seen you... Let me see your face... You are the one from my dreams... Then the stars were right, and this is the day. Gods give me strength."* +//! +//! This format debuted with Oblivion and sunset with Skyrim: SSE. This is the first format to introduce compression, and primarily utilizes zlib/lz4 for this purpose. Unlike other formats, [`tes4`](crate::tes4) utilizes a split architecture where files and directories are tracked as separate paths, rather than combined. +//! +//! # Reading +//! ```rust +//! use ba2::{ +//! prelude::*, +//! tes4::{Archive, ArchiveKey, DirectoryKey, FileCompressionOptions}, +//! }; +//! use std::{fs, path::Path}; +//! +//! fn example() -> Option<()> { +//! let path = Path::new("path/to/oblivion/Data/Oblivion - Voices2.bsa"); +//! let (archive, meta) = Archive::read(path).ok()?; +//! let file = archive +//! .get(&ArchiveKey::from(b"sound/voice/oblivion.esm/imperial/m"))? +//! .get(&DirectoryKey::from( +//! b"testtoddquest_testtoddhappy_00027fa2_1.mp3", +//! ))?; +//! let mut dst = fs::File::create("happy.mp3").ok()?; +//! let options: FileCompressionOptions = meta.into(); +//! file.write(&mut dst, &options).ok()?; +//! Some(()) +//! } +//! ``` +//! +//! # Writing +//! ```rust +//! use ba2::{ +//! prelude::*, +//! tes4::{ +//! Archive, ArchiveKey, ArchiveOptions, ArchiveTypes, Directory, DirectoryKey, File, Version, +//! }, +//! }; +//! use std::fs; +//! +//! fn example() -> Option<()> { +//! let file = File::from_decompressed(b"Hello world!\n"); +//! let directory: Directory = [(DirectoryKey::from(b"hello.txt"), file)] +//! .into_iter() +//! .collect(); +//! let archive: Archive = [(ArchiveKey::from(b"misc"), directory)] +//! .into_iter() +//! .collect(); +//! let mut dst = fs::File::create("example.bsa").ok()?; +//! let options = ArchiveOptions::builder() +//! .types(ArchiveTypes::MISC) +//! .version(Version::SSE) +//! .build(); +//! archive.write(&mut dst, &options).ok()?; +//! Some(()) +//! } +//! ``` + +</span><span class="kw">mod </span>archive; +<span class="kw">mod </span>directory; +<span class="kw">mod </span>file; +<span class="kw">mod </span>hashing; + +<span class="kw">pub use </span><span class="self">self</span>::{ + archive::{ + Archive, Flags <span class="kw">as </span>ArchiveFlags, Key <span class="kw">as </span>ArchiveKey, Options <span class="kw">as </span>ArchiveOptions, + OptionsBuilder <span class="kw">as </span>ArchiveOptionsBuilder, Types <span class="kw">as </span>ArchiveTypes, + }, + directory::{Directory, Key <span class="kw">as </span>DirectoryKey}, + file::{ + CompressionOptions <span class="kw">as </span>FileCompressionOptions, + CompressionOptionsBuilder <span class="kw">as </span>FileCompressionOptionsBuilder, File, + ReadOptions <span class="kw">as </span>FileReadOptions, ReadOptionsBuilder <span class="kw">as </span>FileReadOptionsBuilder, + }, + hashing::{ + hash_directory, hash_directory_in_place, hash_file, hash_file_in_place, DirectoryHash, + FileHash, Hash, + }, +}; + +<span class="kw">use </span>core::num::TryFromIntError; +<span class="kw">use </span>lzzzz::lz4f; +<span class="kw">use </span>std::io; + +<span class="attr">#[non_exhaustive] +#[derive(thiserror::Error, Debug)] +</span><span class="kw">pub enum </span>Error { + <span class="attr">#[error(<span class="string">"can not compress the given file because it is already compressed"</span>)] + </span>AlreadyCompressed, + + <span class="attr">#[error(<span class="string">"can not decompress the given file because it is already decompressed"</span>)] + </span>AlreadyDecompressed, + + <span class="attr">#[error(<span class="string">"buffer failed to decompress to the expected size... expected {expected} bytes, but got {actual} bytes"</span>)] + </span>DecompressionSizeMismatch { expected: usize, actual: usize }, + + <span class="attr">#[error(<span class="string">"an operation on two integers would have overflowed and corrupted data"</span>)] + </span>IntegralOverflow, + + <span class="attr">#[error(<span class="string">"an operation on an integer would have truncated and corrupted data"</span>)] + </span>IntegralTruncation, + + <span class="attr">#[error(<span class="string">"invalid size read from archive header: {0}"</span>)] + </span>InvalidHeaderSize(u32), + + <span class="attr">#[error(<span class="string">"invalid magic read from archive header: {0}"</span>)] + </span>InvalidMagic(u32), + + <span class="attr">#[error(<span class="string">"invalid version read from archive header: {0}"</span>)] + </span>InvalidVersion(u32), + + <span class="attr">#[error(transparent)] + </span>Io(<span class="attr">#[from] </span>io::Error), + + <span class="attr">#[error(transparent)] + </span>LZ4(<span class="attr">#[from] </span>lz4f::Error), +} + +<span class="kw">impl </span>From<TryFromIntError> <span class="kw">for </span>Error { + <span class="kw">fn </span>from(<span class="kw">_</span>: TryFromIntError) -> <span class="self">Self </span>{ + <span class="self">Self</span>::IntegralTruncation + } +} + +<span class="kw">pub type </span><span class="prelude-ty">Result</span><T> = core::result::Result<T, Error>; + +<span class="doccomment">/// Specifies the codec to use when performing compression/decompression actions on files. +</span><span class="attr">#[non_exhaustive] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +</span><span class="kw">pub enum </span>CompressionCodec { + <span class="doccomment">/// The default compression codec. + </span><span class="attr">#[default] + </span>Normal, + <span class="comment">//XMem, +</span>} + +<span class="doccomment">/// The archive version. +/// +/// Each version has an impact on the abi of the TES4 archive file format. +</span><span class="attr">#[allow(non_camel_case_types)] +#[derive(Clone, Copy, Debug, Default, Eq, Ord, PartialEq, PartialOrd)] +</span><span class="kw">pub enum </span>Version { + <span class="attr">#[default] + </span>v103 = <span class="number">103</span>, + v104 = <span class="number">104</span>, + v105 = <span class="number">105</span>, +} + +<span class="kw">impl </span>Version { + <span class="doccomment">/// The Elder Scrolls IV: Oblivion. + </span><span class="kw">pub const </span>TES4: <span class="self">Self </span>= <span class="self">Self</span>::v103; + <span class="doccomment">/// Fallout 3. + </span><span class="kw">pub const </span>FO3: <span class="self">Self </span>= <span class="self">Self</span>::v104; + <span class="doccomment">/// Fallout: New Vegas. + </span><span class="kw">pub const </span>FNV: <span class="self">Self </span>= <span class="self">Self</span>::v104; + <span class="doccomment">/// The Elder Scrolls V: Skyrim. + </span><span class="kw">pub const </span>TES5: <span class="self">Self </span>= <span class="self">Self</span>::v104; + <span class="doccomment">/// The Elder Scrolls V: Skyrim - Special Edition. + </span><span class="kw">pub const </span>SSE: <span class="self">Self </span>= <span class="self">Self</span>::v105; +} +</code></pre></div></section></main></body></html> \ 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 @@ +<!-- REUSE-IgnoreStart --> + +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. + +<!-- REUSE-IgnoreEnd --> 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/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 @@ +<svg width="24" height="25" viewBox="0 0 24 25" xmlns="http://www.w3.org/2000/svg" aria-label="Copy to clipboard"><path d="M18 20h2v3c0 1-1 2-2 2H2c-.998 0-2-1-2-2V5c0-.911.755-1.667 1.667-1.667h5A3.323 3.323 0 0110 0a3.323 3.323 0 013.333 3.333h5C19.245 3.333 20 4.09 20 5v8.333h-2V9H2v14h16v-3zM3 7h14c0-.911-.793-1.667-1.75-1.667H13.5c-.957 0-1.75-.755-1.75-1.666C11.75 2.755 10.957 2 10 2s-1.75.755-1.75 1.667c0 .911-.793 1.666-1.75 1.666H4.75C3.793 5.333 3 6.09 3 7z"/><path d="M4 19h6v2H4zM12 11H4v2h8zM4 17h4v-2H4zM15 15v-3l-4.5 4.5L15 21v-3l8.027-.032L23 15z"/></svg> 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 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"> +<defs> + <style type="text/css"><![CDATA[ + #logo { + fill-rule: nonzero; + } + #logo-teeth { + stroke: #000000; + stroke-width: 0.92px; + } + @media (prefers-color-scheme: dark) { + #logo { + fill: #FFFFFF; + fill-rule: nonzero; + } + #logo-teeth { + fill: #FFFFFF; + stroke: #FFFFFF; + stroke-width: 0.92px; + } + } + ]]></style> +</defs> +<path id="logo" d="M15.993,1.54c-7.972,0 -14.461,6.492 -14.461,14.462c0,7.969 6.492,14.461 14.461,14.461c7.97,0 14.462,-6.492 14.462,-14.461c0,-7.97 -6.492,-14.462 -14.462,-14.462Zm-0.021,1.285c0.511,0.013 0.924,0.439 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0.001 0.028,0.001Zm2.178,1.566c3.379,0.633 6.313,2.723 8.016,5.709l-1.123,2.533c-0.193,0.438 0.006,0.952 0.44,1.147l2.16,0.958c0.067,0.675 0.076,1.355 0.025,2.031l-1.202,0c-0.12,0 -0.169,0.08 -0.169,0.196l0,0.551c0,1.297 -0.731,1.582 -1.373,1.652c-0.612,0.07 -1.288,-0.257 -1.374,-0.63c-0.361,-2.029 -0.961,-2.46 -1.909,-3.21c1.178,-0.746 2.401,-1.85 2.401,-3.325c0,-1.594 -1.092,-2.597 -1.835,-3.09c-1.046,-0.688 -2.203,-0.826 -2.515,-0.826l-12.421,0c1.717,-1.918 4.02,-3.218 6.55,-3.696l1.466,1.536c0.33,0.346 0.878,0.361 1.223,0.028l1.64,-1.564Zm-13.522,7.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.951 0.951,-0.951c0.009,0 0.019,0 0.028,0Zm22.685,0.043c0.511,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.43,0.952 -0.952,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.01,0 0.019,0 0.028,0.001Zm-20.892,0.153l1.658,0l0,7.477l-3.347,0c-0.414,-1.452 -0.542,-2.97 -0.38,-4.47l2.05,-0.912c0.438,-0.195 0.637,-0.706 0.441,-1.144l-0.422,-0.951Zm6.92,0.079l3.949,0c0.205,0 1.441,0.236 1.441,1.163c0,0.768 -0.948,1.043 -1.728,1.043l-3.665,0l0.003,-2.206Zm0,5.373l3.026,0c0.275,0 1.477,0.079 1.86,1.615c0.119,0.471 0.385,2.007 0.566,2.499c0.18,0.551 0.911,1.652 1.691,1.652l4.938,0c-0.331,0.444 -0.693,0.863 -1.083,1.255l-2.01,-0.432c-0.468,-0.101 -0.93,0.199 -1.031,0.667l-0.477,2.228c-3.104,1.406 -6.672,1.389 -9.762,-0.046l-0.478,-2.228c-0.101,-0.468 -0.56,-0.767 -1.028,-0.667l-1.967,0.423c-0.365,-0.377 -0.704,-0.778 -1.016,-1.2l9.567,0c0.107,0 0.181,-0.018 0.181,-0.119l0,-3.384c0,-0.097 -0.074,-0.119 -0.181,-0.119l-2.799,0l0.003,-2.144Zm-4.415,7.749c0.512,0.015 0.924,0.44 0.924,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.952,-0.43 -0.952,-0.952c0,0 0,0 0,0c0,-0.522 0.43,-0.952 0.952,-0.952c0.009,0 0.018,0.001 0.027,0.001Zm14.089,0.043c0.511,0.015 0.924,0.439 0.923,0.951c0,0.522 -0.429,0.952 -0.951,0.952c-0.522,0 -0.951,-0.43 -0.951,-0.952c0,0 0,0 0,0c0,-0.522 0.429,-0.952 0.951,-0.952c0.009,0 0.018,0 0.028,0.001Z"/><path id="logo-teeth" d="M29.647,16.002c0,7.49 -6.163,13.653 -13.654,13.653c-7.49,0 -13.654,-6.163 -13.654,-13.653c0,-7.491 6.164,-13.654 13.654,-13.654c7.491,0 13.654,6.163 13.654,13.654Zm-0.257,-1.319l2.13,1.319l-2.13,1.318l1.83,1.71l-2.344,0.878l1.463,2.035l-2.475,0.404l1.04,2.282l-2.506,-0.089l0.575,2.442l-2.441,-0.576l0.089,2.506l-2.283,-1.04l-0.403,2.475l-2.035,-1.462l-0.878,2.343l-1.71,-1.829l-1.319,2.129l-1.318,-2.129l-1.71,1.829l-0.878,-2.343l-2.035,1.462l-0.404,-2.475l-2.282,1.04l0.089,-2.506l-2.442,0.576l0.575,-2.442l-2.505,0.089l1.04,-2.282l-2.475,-0.404l1.462,-2.035l-2.343,-0.878l1.829,-1.71l-2.129,-1.318l2.129,-1.319l-1.829,-1.71l2.343,-0.878l-1.462,-2.035l2.475,-0.404l-1.04,-2.282l2.505,0.089l-0.575,-2.441l2.442,0.575l-0.089,-2.506l2.282,1.04l0.404,-2.475l2.035,1.463l0.878,-2.344l1.71,1.83l1.318,-2.13l1.319,2.13l1.71,-1.83l0.878,2.344l2.035,-1.463l0.403,2.475l2.283,-1.04l-0.089,2.506l2.441,-0.575l-0.575,2.441l2.506,-0.089l-1.04,2.282l2.475,0.404l-1.463,2.035l2.344,0.878l-1.83,1.71Z"/></svg> 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/main-48f368f3872407c8.js b/static.files/main-48f368f3872407c8.js new file mode 100644 index 0000000..987fae4 --- /dev/null +++ b/static.files/main-48f368f3872407c8.js @@ -0,0 +1,11 @@ +"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 blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerText=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}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 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();loadScript(getVar("static-root-path")+getVar("settings-js"));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("=").map(x=>x.replace(/\+/g," "));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="<h3 class=\"search-loading\">"+searchState.loadingText+"</h3>";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)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}})}}}}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 modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`<a href="${modpath}index.html#${id}">${longty}</a>`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}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("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");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&&!href.startsWith("#")&&!/^(?:[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)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aI<bI?-1:aI>bI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}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";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}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<count;++i){elems.push(i+1)}const node=document.createElement("pre");addClass(node,"example-line-numbers");node.innerHTML=elems.join("\n");parent.insertBefore(node,x)})};window.rustdoc_remove_line_numbers_from_examples=()=>{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="<div class=\"content\">"+window.NOTABLE_TRAITS[notable_ty]+"</div>"}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=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){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&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){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=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){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 \ +<a href="https://doc.rust-lang.org/${channel}/rustdoc/">the rustdoc book</a>.`;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=>"<dt>"+x[0].split(" ").map((y,index)=>((index&1)===0?"<kbd>"+y+"</kbd>":" "+y+" ")).join("")+"</dt><dd>"+x[1]+"</dd>").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="<h2>Keyboard Shortcuts</h2><dl>"+shortcuts+"</dl></div>";const infos=[`For a full list of all search features, take a look <a \ +href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.html">here</a>.`,"Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to \ + restrict the search to a given item kind.","Accepted kinds are: <code>fn</code>, <code>mod</code>, <code>struct</code>, \ + <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, \ + and <code>const</code>.","Search functions by type signature (e.g., <code>vec -> usize</code> or \ + <code>-> vec</code> or <code>String, enum:Cow -> bool</code>)","You can look for items with an exact name by putting double quotes around \ + your request: <code>\"string\"</code>","Look for functions that accept or return \ + <a href=\"https://doc.rust-lang.org/std/primitive.slice.html\">slices</a> and \ + <a href=\"https://doc.rust-lang.org/std/primitive.array.html\">arrays</a> by writing \ + square brackets (e.g., <code>-> [u8]</code> or <code>[] -> Option</code>)","Look for items inside another one by searching for a path: <code>vec::Vec</code>",].map(x=>"<p>"+x+"</p>").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="<h2>Search Tricks</h2>"+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=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{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(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos<SIDEBAR_VANISH_THRESHOLD){hideSidebar()}else if(pos>=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px")},100)}}window.addEventListener("resize",()=>{if(window.innerWidth<RUSTDOC_MOBILE_BREAKPOINT){return}stopResize();if(desiredSidebarSize>=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(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-04d5337699b92874.css b/static.files/noscript-04d5337699b92874.css new file mode 100644 index 0000000..fbd55f5 --- /dev/null +++ b/static.files/noscript-04d5337699b92874.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}: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;--mobile-sidebar-menu-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);--warning-border-color:#ff8e00;--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:#fff;--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);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){: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%);--mobile-sidebar-menu-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);--warning-border-color:#ff8e00;--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:#4e8bca;--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:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--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);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ 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 @@ +<svg version="1.1" height="106" width="106" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="logo" transform="translate(53, 53)"> + <path id="r" transform="translate(0.5, 0.5)" stroke="black" stroke-width="1" stroke-linejoin="round" d=" + M -9,-15 H 4 C 12,-15 12,-7 4,-7 H -9 Z + M -40,22 H 0 V 11 H -9 V 3 H 1 C 12,3 6,22 15,22 H 40 + V 3 H 34 V 5 C 34,13 25,12 24,7 C 23,2 19,-2 18,-2 C 33,-10 24,-26 12,-26 H -35 + V -15 H -25 V 11 H -40 Z" /> + <g id="gear" mask="url(#holes)"> + <circle r="43" fill="none" stroke="black" stroke-width="9" /> + <g id="cogs"> + <polygon id="cog" stroke="black" stroke-width="3" stroke-linejoin="round" points="46,3 51,0 46,-3" /> + <use xlink:href="#cog" transform="rotate(11.25)" /> + <use xlink:href="#cog" transform="rotate(22.50)" /> + <use xlink:href="#cog" transform="rotate(33.75)" /> + <use xlink:href="#cog" transform="rotate(45.00)" /> + <use xlink:href="#cog" transform="rotate(56.25)" /> + <use xlink:href="#cog" transform="rotate(67.50)" /> + <use xlink:href="#cog" transform="rotate(78.75)" /> + <use xlink:href="#cog" transform="rotate(90.00)" /> + <use xlink:href="#cog" transform="rotate(101.25)" /> + <use xlink:href="#cog" transform="rotate(112.50)" /> + <use xlink:href="#cog" transform="rotate(123.75)" /> + <use xlink:href="#cog" transform="rotate(135.00)" /> + <use xlink:href="#cog" transform="rotate(146.25)" /> + <use xlink:href="#cog" transform="rotate(157.50)" /> + <use xlink:href="#cog" transform="rotate(168.75)" /> + <use xlink:href="#cog" transform="rotate(180.00)" /> + <use xlink:href="#cog" transform="rotate(191.25)" /> + <use xlink:href="#cog" transform="rotate(202.50)" /> + <use xlink:href="#cog" transform="rotate(213.75)" /> + <use xlink:href="#cog" transform="rotate(225.00)" /> + <use xlink:href="#cog" transform="rotate(236.25)" /> + <use xlink:href="#cog" transform="rotate(247.50)" /> + <use xlink:href="#cog" transform="rotate(258.75)" /> + <use xlink:href="#cog" transform="rotate(270.00)" /> + <use xlink:href="#cog" transform="rotate(281.25)" /> + <use xlink:href="#cog" transform="rotate(292.50)" /> + <use xlink:href="#cog" transform="rotate(303.75)" /> + <use xlink:href="#cog" transform="rotate(315.00)" /> + <use xlink:href="#cog" transform="rotate(326.25)" /> + <use xlink:href="#cog" transform="rotate(337.50)" /> + <use xlink:href="#cog" transform="rotate(348.75)" /> + </g> + <g id="mounts"> + <polygon id="mount" stroke="black" stroke-width="6" stroke-linejoin="round" points="-7,-42 0,-35 7,-42" /> + <use xlink:href="#mount" transform="rotate(72)" /> + <use xlink:href="#mount" transform="rotate(144)" /> + <use xlink:href="#mount" transform="rotate(216)" /> + <use xlink:href="#mount" transform="rotate(288)" /> + </g> + </g> + <mask id="holes"> + <rect x="-60" y="-60" width="120" height="120" fill="white"/> + <circle id="hole" cy="-40" r="3" /> + <use xlink:href="#hole" transform="rotate(72)" /> + <use xlink:href="#hole" transform="rotate(144)" /> + <use xlink:href="#hole" transform="rotate(216)" /> + <use xlink:href="#hole" transform="rotate(288)" /> + </mask> +</g> +</svg> diff --git a/static.files/rustdoc-5bc39a1768837dd0.css b/static.files/rustdoc-5bc39a1768837dd0.css new file mode 100644 index 0000000..175164e --- /dev/null +++ b/static.files/rustdoc-5bc39a1768837dd0.css @@ -0,0 +1,24 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@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,.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,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning: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%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{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;}.logo-container>img{height:48px;width:48px;}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;margin-right: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>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.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;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.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);}div.where{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;}.section-header{display:block;position:relative;}.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;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{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,<svg xmlns="http://www.w3.org/2000/svg" \ + width="128" height="128" viewBox="-30 -20 176 176"><path d="M111,40.5L64,87.499L17,40.5" \ + fill="none" stroke="black" strike-linecap="square" stroke-miterlimit="10" stroke-width="12"/> \ + </svg>');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:calc(var(--desktop-sidebar-z-index) + 1);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;}.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,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40">\ + <path d="M7,25L17,32L33,12" fill="none" stroke="black" stroke-width="5"/>\ + <path d="M7,23L17,30L33,10" fill="none" stroke="white" stroke-width="5"/></svg>');}.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;}#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{display:block;padding:3px;margin-bottom:5px;}.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;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.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;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}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;font-variant-numeric:tabular-nums;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{width:100%;overflow:auto;}#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-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-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,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#sidebar-button>a:before{content:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" \ + fill="none" stroke="black">\ + <rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5"/>\ + <circle cx="4.375" cy="4.375" r="1" stroke-width=".75"/>\ + <path d="m7.6121 3v16 M5.375 7.625h-2 m2 3h-2 m2 3h-2" stroke-width="1.25"/></svg>');width:22px;height:22px;}#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,<svg width="17" height="17" \ +shape-rendering="crispEdges" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg"><path \ +d="M5 2.5H2.5v12H5m7-12h2.5v12H12M5 8.5h7M8.5 12V8.625v0V5"/></svg>') 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,<svg width="17" height="17" \ +shape-rendering="crispEdges" stroke="black" fill="none" xmlns="http://www.w3.org/2000/svg"><path \ +d="M5 2.5H2.5v12H5m7-12h2.5v12H12M5 8.5h7"/></svg>') 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;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \ + viewBox="0 0 22 22" fill="none" stroke="black">\ + <path d="M3,5h16M3,11h16M3,17h16" stroke-width="2.75"/></svg>');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \ + viewBox="0 0 22 22" fill="none" stroke="black">\ + <path d="M16,9v-4h-6v-1l-2,-2h-4l-2,2v16h13L21,9h-15L2,19" stroke-width="1.25"/>\ + <path d="M15,7h-11v3" stroke-width="0.75"/>\ + <path d="M3.75,10v1.25" stroke-width="0.375"/></svg>');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@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,.sidebar-resizer{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;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left: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;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \ + viewBox="0 0 22 22" fill="none" stroke="black">\ + <rect x="1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5"/>\ + <circle cx="4.375" cy="4.375" r="1" stroke-width=".75"/>\ + <path d="m3 7.375h16m0-3h-4" stroke-width="1.25"/></svg>');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.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{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}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;}}.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;}:root[data-theme="light"]{--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;--mobile-sidebar-menu-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);--warning-border-color:#ff8e00;--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:#fff;--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);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--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%);--mobile-sidebar-menu-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);--warning-border-color:#ff8e00;--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:#4e8bca;--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:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--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);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--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%);--mobile-sidebar-menu-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);--warning-border-color:#ff8e00;--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:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--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);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ 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-dd67cee4cfa65049.js b/static.files/search-dd67cee4cfa65049.js new file mode 100644 index 0000000..ef8bf86 --- /dev/null +++ b/static.files/search-dd67cee4cfa65049.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";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.length<b.length){const aTmp=a;a=b;b=aTmp}const minDist=a.length-b.length;if(minDist>limit){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 functionTypeFingerprint;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;let typeNameIdOfTuple;let typeNameIdOfUnit;let typeNameIdOfTupleOrUnit;function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(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===","||c==="="}function isPathSeparator(c){return c===":"||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(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.pos<parserState.userQuery.length){const c=parserState.userQuery[parserState.pos];if(c!==" "){break}parserState.pos+=1}}function createQueryElement(query,parserState,name,generics,isInGenerics){const path=name.trim();if(path.length===0&&generics.length===0){throw["Unexpected ",parserState.userQuery[parserState.pos]]}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){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",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",normalizedPathLast:"never",generics:[],bindings:new Map(),typeFilter:"primitive",bindingName,}}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\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}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){bindings.set(gen.bindingName.name,[gen,...gen.bindingName.generics]);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos<parserState.length){const c=parserState.userQuery[parserState.pos];if(!isIdentCharacter(c)){if(c==="!"){if(foundExclamation!==-1){throw["Cannot have more than one ","!"," in an ident"]}else if(parserState.pos+1<parserState.length&&isIdentCharacter(parserState.userQuery[parserState.pos+1])){throw["Unexpected ","!",": it can only be at the end of an ident"]}foundExclamation=parserState.pos}else if(isPathSeparator(c)){if(c===":"){if(!isPathStart(parserState)){break}parserState.pos+=1}else{while(parserState.pos+1<parserState.length){const next_c=parserState.userQuery[parserState.pos+1];if(next_c!==" "){break}parserState.pos+=1}}if(foundExclamation!==-1){if(foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){throw["Cannot have associated items in macros"]}else{foundExclamation=-1}}}else if(c==="["||c==="("||isEndCharacter(c)||isSpecialStartCharacter(c)||isSeparatorCharacter(c)){break}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}return end}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const isInBinding=parserState.isInBinding;if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else{parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push({name:name,id:null,fullPath:[name],pathWithoutLast:[],pathLast:name,normalizedPathLast:name,generics,bindings:new Map(),typeFilter:"primitive",bindingName:isInBinding,})}}else{const isStringElem=parserState.userQuery[start]==="\"";if(isStringElem){start+=1;getStringElem(query,parserState,isInGenerics);end=parserState.pos-1}else{end=getIdentEndPosition(parserState)}if(parserState.pos<parserState.length&&parserState.userQuery[parserState.pos]==="<"){if(start>=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}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos<parserState.length){const c=parserState.userQuery[parserState.pos];if(c===endChar){if(parserState.isInBinding){throw["Unexpected ",endChar," after ","="]}break}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(c===":"){if(parserState.typeFilter!==null){throw["Unexpected ",":"]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}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(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...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;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}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<parserState.length){const c=parserState.userQuery[parserState.pos];if(isEndCharacter(c)){foundStopChar=true;if(isSeparatorCharacter(c)){parserState.pos+=1;continue}else if(c==="-"||c===">"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}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(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<parserState.length){if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getItemsBefore(query,parserState,query.returned,"");if(query.returned.length===0){throw["Expected at least one item after ","->"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}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"&&rawSearchIndex.has(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)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding: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;query.totalElems=parserState.totalElems;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,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.item=searchIndex[result.id];result.word=searchIndex[result.id].word;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)}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});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb);if(passesUnification){return true}}return false});if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size<queryElem.bindings.size){return false}const queryElemPathLength=queryElem.pathWithoutLast.length;if(queryElemPathLength>0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i<queryElemPathLength){return false}}return true}}function unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensIn){if(fnType.bindings.size<queryElem.bindings.size){return false}let simplifiedGenerics=fnType.generics||[];if(fnType.bindings.size>0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false});return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens){if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens)}return false}function checkIfInList(list,elem,whereClause,mgens){for(const entry of list){if(checkType(entry,elem,whereClause,mgens)){return true}}return false}function checkType(row,elem,whereClause,mgens){if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens)}}return unifyFunctionTypes([row],[elem],whereClause,mgens)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3);let ret_dist=maxPathEditDistance+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;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;x<clength;++x){const[p,c]=[path[i+x],contains[x]];if(Math.floor((p.length-c.length)/3)<=maxPathEditDistance&&p.indexOf(c)!==-1){dist_total+=Math.floor((p.length-c.length)/3)}else{const dist=editDistance(p,c,maxPathEditDistance);if(dist>maxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null: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,implDisambiguator:item.implDisambiguator,}}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<bbb.path){return 1}else if(aaa.path===bbb.path){return 0}return-1};crateAliases.sort(sortFunc);aliases.sort(sortFunc);const pushFunc=alias=>{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){if(dist<=maxEditDistance||index!==-1){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 path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.size<MAX_RESULTS?(tfpDist+1):results_in_args.max_dist;addIntoResults(results_in_args,fullId,pos,-1,tfpDist,0,maxDist)}if(returned){results_returned.max_dist=Math.max(results_returned.max_dist||0,tfpDist);const maxDist=results_returned.size<MAX_RESULTS?(tfpDist+1):results_returned.max_dist;addIntoResults(results_returned,fullId,pos,-1,tfpDist,0,maxDist)}}if(!typePassesFilter(elem.typeFilter,row.ty)){return}let index=row.word.indexOf(elem.pathLast);const normalizedIndex=row.normalizedName.indexOf(elem.pathLast);if(index===-1||(index>normalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&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}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}))}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i<nSearchIndex;++i){handleSingleArg(searchIndex[i],i,elem,results_others,results_in_args,results_returned,maxEditDistance)}}}else if(parsedQuery.foundElems>0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i<nSearchIndex;++i){handleArgs(searchIndex[i],i,results_others)}}}if(parsedQuery.error===null){innerRunQuery()}const ret=createQueryResults(sortResults(results_in_args,true,currentCrate),sortResults(results_returned,true,currentCrate),sortResults(results_others,false,currentCrate),parsedQuery);handleAliases(ret,parsedQuery.original.replace(/"/g,""),filterCrates,currentCrate);if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}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+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}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="<span>"+path.replace(/::/g,"::</span><span>");if(tmp.endsWith("<span>")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");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}`:"?";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",`<span class="typename">${typeName}</span>`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=` <div class="alias">\ +<b>${item.alias}</b><i class="grey"> - see </i>\ +</div>`}resultName.insertAdjacentHTML("beforeend",`<div class="path">${alias}\ +${item.displayPath}<span class="${type}">${name}</span>\ +</div>`);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 :(<br/>"+"Try on <a href=\"https://duckduckgo.com/?q="+encodeURIComponent("rust "+query.userQuery)+"\">DuckDuckGo</a>?<br/><br/>"+"Or try looking in one of these:<ul><li>The <a "+"href=\"https://doc.rust-lang.org/reference/index.html\">Rust Reference</a> "+" for technical details about the language.</li><li><a "+"href=\"https://doc.rust-lang.org/rust-by-example/index.html\">Rust By "+"Example</a> for expository code examples.</a></li><li>The <a "+"href=\"https://doc.rust-lang.org/book/index.html\">Rust Book</a> for "+"introductions to language features and the language itself.</li><li><a "+"href=\"https://docs.rs\">Docs.rs</a> for documentation of crates released on"+" <a href=\"https://crates.io/\">crates.io</a>.</li></ul>"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return"<button class=\"selected\">"+text+"<span class=\"count\">"+fmtNbElems+"</span></button>"}return"<button>"+text+"<span class=\"count\">"+fmtNbElems+"</span></button>"}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="";if(rawSearchIndex.size>1){crates=" in <div id=\"crate-search-div\"><select id=\"crate-search\">"+"<option value=\"all crates\">all crates</option>";for(const c of rawSearchIndex.keys()){crates+=`<option value="${c}" ${c === filterCrates && "selected"}>${c}</option>`}crates+="</select></div>"}let output=`<h1 class="search-results-title">Results${crates}</h1>`;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]=`<code>${value.replaceAll(" ", " ")}</code>`}else{error[index]=value}});output+=`<h3 class="error">Query parser error: "${error.join("")}".</h3>`;output+="<div id=\"search-tabs\">"+makeTabHeader(0,"In Names",ret_others[1])+"</div>";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="<div id=\"search-tabs\">"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"</div>"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="<div id=\"search-tabs\">"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"</div>";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+="<h3 class=\"search-corrections\">"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.</h3>`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="<h3 class=\"search-corrections\">"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.</h3>`}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(forced){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,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchType(itemFunctionDecoder,lowercasePaths){const c=itemFunctionDecoder.string.charCodeAt(itemFunctionDecoder.offset);itemFunctionDecoder.offset+=1;const[zero,ua,la,ob,cb]=["0","@","`","{","}"].map(c=>c.charCodeAt(0));if(c===la){return null}if(c>=zero&&c<ua){return itemFunctionDecoder.backrefQueue[c-zero]}if(c!==ob){throw["Unexpected ",c," in function: expected ","{","; this is a bug"]}function decodeList(){let c=itemFunctionDecoder.string.charCodeAt(itemFunctionDecoder.offset);const ret=[];while(c!==cb){ret.push(decode());c=itemFunctionDecoder.string.charCodeAt(itemFunctionDecoder.offset)}itemFunctionDecoder.offset+=1;return ret}function decode(){let n=0;let c=itemFunctionDecoder.string.charCodeAt(itemFunctionDecoder.offset);if(c===ob){itemFunctionDecoder.offset+=1;return decodeList()}while(c<la){n=(n<<4)|(c&0xF);itemFunctionDecoder.offset+=1;c=itemFunctionDecoder.string.charCodeAt(itemFunctionDecoder.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];itemFunctionDecoder.offset+=1;return sign?-value:value}const functionSearchType=decodeList();const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i<l;++i){where_clause.push(typeof functionSearchType[i]==="number"?[buildItemSearchType(functionSearchType[i],lowercasePaths)]:buildItemSearchTypeAll(functionSearchType[i],lowercasePaths))}const ret={inputs,output,where_clause,};itemFunctionDecoder.backrefQueue.unshift(ret);if(itemFunctionDecoder.backrefQueue.length>16){itemFunctionDecoder.backrefQueue.pop()}return ret}function buildFunctionTypeFingerprint(type,output,fps){let input=type.id;if(input===typeNameIdOfArray||input===typeNameIdOfSlice){input=typeNameIdOfArrayOrSlice}if(input===typeNameIdOfTuple||input===typeNameIdOfUnit){input=typeNameIdOfTupleOrUnit}const hashint1=k=>{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}function buildIndex(rawSearchIndex){searchIndex=[];typeNameIdMap=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;typeNameIdOfArray=buildTypeMapIndex("array");typeNameIdOfSlice=buildTypeMapIndex("slice");typeNameIdOfTuple=buildTypeMapIndex("tuple");typeNameIdOfUnit=buildTypeMapIndex("unit");typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const crateRow={crate:crate,ty:3,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),deprecated:null,implDisambiguator: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 itemFunctionDecoder={string:crateCorpus.f,offset:0,backrefQueue:[],};const deprecatedItems=new Set(crateCorpus.c);const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i<len;++i){const elem=paths[i];const ty=elem[0];const name=elem[1];let path=null;if(elem.length>2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i<len;++i){let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=buildFunctionSearchType(itemFunctionDecoder,lowercasePaths);if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate:crate,ty:itemTypes.charCodeAt(i)-charA,name:itemNames[i],path:path,desc:itemDescs[i],parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id:id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(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+=itemTypes.length}TYPES_POOL=new Map()}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<rect.height){window.scrollBy(0,rect.height)}e.preventDefault()}else if(e.which===37){nextTab(-1);e.preventDefault()}else if(e.which===39){nextTab(1);e.preventDefault()}});searchState.input.addEventListener("keydown",e=>{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;e.preventDefault();search()}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(true)}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}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static.files/settings-4313503d2e1961c2.js b/static.files/settings-4313503d2e1961c2.js new file mode 100644 index 0000000..ab425fe --- /dev/null +++ b/static.files/settings-4313503d2e1961c2.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;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}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=()=>{changeSetting(toggle.id,toggle.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+=`\ +<div class="setting-line" id="${js_data_name}"> + <div class="setting-radio-name">${setting_name}</div> + <div class="setting-radio-choices">`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + <label for="${full}" class="setting-radio"> + <input type="radio" name="${js_data_name}" + id="${full}" value="${option}"${checked}> + <span>${option}</span> + </label>`});output+=`\ + </div> +</div>`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +<div class="setting-line">\ + <label class="setting-check">\ + <input type="checkbox" id="${js_data_name}"${checked}>\ + <span>${setting_name}</span>\ + </label>\ +</div>`}}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":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`<div class="settings">${buildSettingsPageSections(settings)}</div>`;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="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){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-e66d777a5a92e9b2.js b/static.files/src-script-e66d777a5a92e9b2.js new file mode 100644 index 0000000..d0aebb8 --- /dev/null +++ b/static.files/src-script-e66d777a5a92e9b2.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<RUSTDOC_MOBILE_BREAKPOINT){updateLocalStorage("source-sidebar-show","false")}}function createDirEntry(elem,parent,fullPath,hasFoundFile){const dirEntry=document.createElement("details");const summary=document.createElement("summary");dirEntry.className="dir-entry";fullPath+=elem[NAME_OFFSET]+"/";summary.innerText=elem[NAME_OFFSET];dirEntry.appendChild(summary);const folders=document.createElement("div");folders.className="folders";if(elem[DIRS_OFFSET]){for(const dir of elem[DIRS_OFFSET]){if(createDirEntry(dir,folders,fullPath,false)){dirEntry.open=true;hasFoundFile=true}}}dirEntry.appendChild(folders);const files=document.createElement("div");files.className="files";if(elem[FILES_OFFSET]){const w=window.location.href.split("#")[0];for(const file_text of elem[FILES_OFFSET]){const file=document.createElement("a");file.innerText=file_text;file.href=rootPath+"src/"+fullPath+file_text+".html";file.addEventListener("click",closeSidebarIfMobile);if(!hasFoundFile&&w===file.href){file.className="selected";dirEntry.open=true;hasFoundFile=true}files.appendChild(file)}}dirEntry.appendChild(files);parent.appendChild(dirEntry);return hasFoundFile}window.rustdocCloseSourceSidebar=()=>{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to<from){const tmp=to;to=from;from=tmp}let elem=document.getElementById(from);if(!elem){return}const x=document.getElementById(from);if(x){x.scrollIntoView()}onEachLazy(document.getElementsByClassName("src-line-numbers"),e=>{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",highlightSrcLines);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-4c98445ec4002617.js b/static.files/storage-4c98445ec4002617.js new file mode 100644 index 0000000..b378b85 --- /dev/null +++ b/static.files/storage-4c98445ec4002617.js @@ -0,0 +1 @@ +"use strict";const builtinThemes=["light","dark","ayu"];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){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}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){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(`<link rel="stylesheet" id="themeStyle" href="${newHref}">`);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}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")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px")}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px")}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,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 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="27.434" height="29.5" enable-background="new 0 0 27.434 29.5" viewBox="0 0 27.434 29.5"><path d="M27.316 18.39a2.696 2.696 0 0 0-.98-1.46 1.62 1.62 0 0 1-.016-.762l.035-.176v-1.191c0-1.246-.003-1.278-.046-1.473a1.717 1.717 0 0 1 .007-.805c.477-.343.829-.859.997-1.472.257-.957.074-2.094-.508-3.117l-.594-1.032c-.746-1.304-1.965-2.117-3.18-2.117-.379 0-.75.078-1.086.235a1.958 1.958 0 0 1-.855-.391l-.102-.082-.117-.063-1.855-1.07-.094-.055-.106-.043c-.378-.156-.66-.41-.77-.554C17.919 1.172 16.349 0 14.297 0h-1.155c-2.043 0-3.61 1.152-3.75 2.723-.114.14-.391.382-.758.527l-.102.04-.094.05-1.94 1.066-.134.074-.117.094a2.019 2.019 0 0 1-.832.403 2.518 2.518 0 0 0-1.008-.211c-1.199 0-2.414.82-3.168 2.14l-.59 1.032c-.41.718-.64 1.523-.64 2.257-.004.953.36 1.758 1.012 2.258.035.152.058.445-.016.785-.04.168-.063.282-.063 1.563 0 1.148 0 1.148.016 1.261l.008.075.015.074c.075.344.047.64.012.8-.644.5-1.004 1.302-.992 2.259.008.726.238 1.52.648 2.242l.59 1.027c.758 1.332 1.965 2.16 3.149 2.16.324 0 .644-.062.937-.187.168.039.492.156.813.418l.11.086.124.07 2.047 1.156.102.059.105.043c.363.144.648.379.766.52.164 1.519 1.718 2.632 3.746 2.632h1.156c2.035 0 3.598-1.133 3.746-2.672.117-.144.402-.394.773-.55l.114-.047.101-.063 1.961-1.156.106-.063.097-.078c.309-.246.653-.37.832-.398.313.136.66.21 1.016.21 1.2 0 2.41-.82 3.164-2.14l.594-1.031c.59-1.028.777-2.164.52-3.117Zm-2.043 2.247-.59 1.031c-.437.766-1.105 1.25-1.636 1.25a.7.7 0 0 1-.371-.094 1.146 1.146 0 0 0-.567-.129c-.593 0-1.382.297-2.007.797l-1.961 1.156c-1.016.426-1.848 1.293-1.848 1.93 0 .64-.898 1.16-1.996 1.16H13.14c-1.102 0-2-.515-2-1.14 0-.63-.832-1.477-1.852-1.887l-2.047-1.16c-.637-.512-1.426-.813-2.008-.813-.199 0-.379.035-.515.114a.648.648 0 0 1-.332.085c-.52 0-1.18-.5-1.621-1.273l-.59-1.031c-.543-.953-.555-1.98-.024-2.285.532-.305.782-1.434.551-2.504V14.8c0-1.09.02-1.18.02-1.18.238-1.074-.008-2.203-.551-2.516-.54-.304-.54-1.34.008-2.293l.59-1.03c.437-.766 1.101-1.255 1.636-1.255a.73.73 0 0 1 .364.094c.152.086.343.125.566.125.594 0 1.379-.297 2.004-.793l1.945-1.066c1.02-.407 1.856-1.278 1.856-1.934 0-.656.898-1.191 2-1.191h1.156c1.098 0 1.996.543 1.996 1.21 0 .669.832 1.555 1.848 1.973L20 6.012c.617.492 1.402.777 2.012.777.242 0 .453-.047.62-.14a.79.79 0 0 1 .403-.102c.55 0 1.223.476 1.652 1.23l.59 1.032c.543.953.52 2.004-.062 2.336-.574.332-.86 1.48-.625 2.554 0 0 .008.04.008 1.102v1.011c-.215 1.051.07 2.176.636 2.5.567.325.586 1.368.04 2.325Zm0 0"/><path d="M13.61 7.61a7.084 7.084 0 0 0-7.083 7.085 7.085 7.085 0 1 0 14.168 0A7.088 7.088 0 0 0 13.61 7.61Zm0 12.41a5.33 5.33 0 0 1-5.325-5.325 5.33 5.33 0 0 1 5.324-5.32 5.327 5.327 0 0 1 5.325 5.32 5.328 5.328 0 0 1-5.325 5.325Zm0 0"/><path d="M13.684 9.906a4.722 4.722 0 0 0-4.72 4.719 4.722 4.722 0 0 0 4.72 4.719 4.724 4.724 0 0 0 4.714-4.719 4.724 4.724 0 0 0-4.714-4.719Zm0 7.676a2.954 2.954 0 1 1 0-5.91 2.953 2.953 0 0 1 2.953 2.953 2.957 2.957 0 0 1-2.953 2.957Zm0 0"/></svg> \ No newline at end of file diff --git a/trait.impl/ba2/trait.CompressableFrom.js b/trait.impl/ba2/trait.CompressableFrom.js new file mode 100644 index 0000000..5df944d --- /dev/null +++ b/trait.impl/ba2/trait.CompressableFrom.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/ba2/trait.Reader.js b/trait.impl/ba2/trait.Reader.js new file mode 100644 index 0000000..5df944d --- /dev/null +++ b/trait.impl/ba2/trait.Reader.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/ba2/trait.ReaderWithOptions.js b/trait.impl/ba2/trait.ReaderWithOptions.js new file mode 100644 index 0000000..5df944d --- /dev/null +++ b/trait.impl/ba2/trait.ReaderWithOptions.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/bitflags/traits/trait.Flags.js b/trait.impl/bitflags/traits/trait.Flags.js new file mode 100644 index 0000000..4229fa5 --- /dev/null +++ b/trait.impl/bitflags/traits/trait.Flags.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl Flags for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl Flags for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/bitflags/traits/trait.PublicFlags.js b/trait.impl/bitflags/traits/trait.PublicFlags.js new file mode 100644 index 0000000..898fddd --- /dev/null +++ b/trait.impl/bitflags/traits/trait.PublicFlags.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl PublicFlags for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl PublicFlags for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/bstr/ext_slice/trait.ByteSlice.js b/trait.impl/bstr/ext_slice/trait.ByteSlice.js new file mode 100644 index 0000000..5df944d --- /dev/null +++ b/trait.impl/bstr/ext_slice/trait.ByteSlice.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/bstr/ext_vec/trait.ByteVec.js b/trait.impl/bstr/ext_vec/trait.ByteVec.js new file mode 100644 index 0000000..5df944d --- /dev/null +++ b/trait.impl/bstr/ext_vec/trait.ByteVec.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/borrow/trait.Borrow.js b/trait.impl/core/borrow/trait.Borrow.js new file mode 100644 index 0000000..a73ad48 --- /dev/null +++ b/trait.impl/core/borrow/trait.Borrow.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a><<a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a><<a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a><<a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a><<a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a><<a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a><<a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.Borrow.html\" title=\"trait core::borrow::Borrow\">Borrow</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/borrow/trait.BorrowMut.js b/trait.impl/core/borrow/trait.BorrowMut.js new file mode 100644 index 0000000..17cc467 --- /dev/null +++ b/trait.impl/core/borrow/trait.BorrowMut.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html\" title=\"trait core::borrow::BorrowMut\">BorrowMut</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html\" title=\"trait core::borrow::BorrowMut\">BorrowMut</a><<a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html\" title=\"trait core::borrow::BorrowMut\">BorrowMut</a><<a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/borrow/trait.BorrowMut.html\" title=\"trait core::borrow::BorrowMut\">BorrowMut</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 0000000..2231300 --- /dev/null +++ b/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Eq.js b/trait.impl/core/cmp/trait.Eq.js new file mode 100644 index 0000000..072da90 --- /dev/null +++ b/trait.impl/core/cmp/trait.Eq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Ord.js b/trait.impl/core/cmp/trait.Ord.js new file mode 100644 index 0000000..9a8fe93 --- /dev/null +++ b/trait.impl/core/cmp/trait.Ord.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialEq.js b/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..1648965 --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialOrd.js b/trait.impl/core/cmp/trait.PartialOrd.js new file mode 100644 index 0000000..e353b33 --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialOrd.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.AsMut.js b/trait.impl/core/convert/trait.AsMut.js new file mode 100644 index 0000000..4f84c9a --- /dev/null +++ b/trait.impl/core/convert/trait.AsMut.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html\" title=\"trait core::convert::AsMut\">AsMut</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html\" title=\"trait core::convert::AsMut\">AsMut</a><<a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html\" title=\"trait core::convert::AsMut\">AsMut</a><<a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.AsMut.html\" title=\"trait core::convert::AsMut\">AsMut</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.AsRef.js b/trait.impl/core/convert/trait.AsRef.js new file mode 100644 index 0000000..2970c07 --- /dev/null +++ b/trait.impl/core/convert/trait.AsRef.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a><<a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a><<a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.AsRef.html\" title=\"trait core::convert::AsRef\">AsRef</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js new file mode 100644 index 0000000..7774198 --- /dev/null +++ b/trait.impl/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html\" title=\"struct std::io::error::Error\">Error</a>> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html\" title=\"struct core::num::error::TryFromIntError\">TryFromIntError</a>> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html\" title=\"struct core::num::error::TryFromIntError\">TryFromIntError</a>> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html\" title=\"struct std::io::error::Error\">Error</a>> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><HResultError> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/num/error/struct.TryFromIntError.html\" title=\"struct core::num::error::TryFromIntError\">TryFromIntError</a>> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'static>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>"],["impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><T> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'static><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html\" title=\"trait core::convert::Into\">Into</a><<a class=\"struct\" href=\"ba2/struct.BString.html\" title=\"struct ba2::BString\">BString</a>>,</div>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/alloc/boxed/struct.Box.html\" title=\"struct alloc::boxed::Box\">Box</a><[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]>> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'static>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'bytes [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>]> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>"],["impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><T> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'static><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html\" title=\"trait core::convert::Into\">Into</a><<a class=\"struct\" href=\"ba2/struct.BString.html\" title=\"struct ba2::BString\">BString</a>>,</div>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'static>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/std/io/error/struct.Error.html\" title=\"struct std::io::error::Error\">Error</a>> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><Error> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>"],["impl<'bytes, const N: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.usize.html\">usize</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&'bytes [<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.u8.html\">u8</a>; <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.array.html\">N</a>]> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'static>"],["impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><T> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'static><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html\" title=\"trait core::convert::Into\">Into</a><<a class=\"struct\" href=\"ba2/struct.BString.html\" title=\"struct ba2::BString\">BString</a>>,</div>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><Error> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><<a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'static>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>"],["impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><T> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'static><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html\" title=\"trait core::convert::Into\">Into</a><<a class=\"struct\" href=\"ba2/struct.BString.html\" title=\"struct ba2::BString\">BString</a>>,</div>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><&<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.TryFrom.js b/trait.impl/core/convert/trait.TryFrom.js new file mode 100644 index 0000000..f885f49 --- /dev/null +++ b/trait.impl/core/convert/trait.TryFrom.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&<a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>> for TexMetadata"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.TryFrom.html\" title=\"trait core::convert::TryFrom\">TryFrom</a><&TexMetadata> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/default/trait.Default.js b/trait.impl/core/default/trait.Default.js new file mode 100644 index 0000000..22590b2 --- /dev/null +++ b/trait.impl/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::tes4::ArchiveOptionsBuilder\">OptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/error/trait.Error.js b/trait.impl/core/error/trait.Error.js new file mode 100644 index 0000000..26a45de --- /dev/null +++ b/trait.impl/core/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/error/trait.Error.html\" title=\"trait core::error::Error\">Error</a> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Binary.js b/trait.impl/core/fmt/trait.Binary.js new file mode 100644 index 0000000..a6a400c --- /dev/null +++ b/trait.impl/core/fmt/trait.Binary.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html\" title=\"trait core::fmt::Binary\">Binary</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Binary.html\" title=\"trait core::fmt::Binary\">Binary</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 0000000..0c01199 --- /dev/null +++ b/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::tes4::ArchiveOptionsBuilder\">OptionsBuilder</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Display.js b/trait.impl/core/fmt/trait.Display.js new file mode 100644 index 0000000..79efb74 --- /dev/null +++ b/trait.impl/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.LowerHex.js b/trait.impl/core/fmt/trait.LowerHex.js new file mode 100644 index 0000000..8543387 --- /dev/null +++ b/trait.impl/core/fmt/trait.LowerHex.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html\" title=\"trait core::fmt::LowerHex\">LowerHex</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.LowerHex.html\" title=\"trait core::fmt::LowerHex\">LowerHex</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Octal.js b/trait.impl/core/fmt/trait.Octal.js new file mode 100644 index 0000000..c89a4ba --- /dev/null +++ b/trait.impl/core/fmt/trait.Octal.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html\" title=\"trait core::fmt::Octal\">Octal</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Octal.html\" title=\"trait core::fmt::Octal\">Octal</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.UpperHex.js b/trait.impl/core/fmt/trait.UpperHex.js new file mode 100644 index 0000000..26bc97a --- /dev/null +++ b/trait.impl/core/fmt/trait.UpperHex.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html\" title=\"trait core::fmt::UpperHex\">UpperHex</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.UpperHex.html\" title=\"trait core::fmt::UpperHex\">UpperHex</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.Extend.js b/trait.impl/core/iter/traits/collect/trait.Extend.js new file mode 100644 index 0000000..d3cb815 --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.Extend.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html\" title=\"trait core::iter::traits::collect::Extend\">Extend</a><<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.Extend.html\" title=\"trait core::iter::traits::collect::Extend\">Extend</a><<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/trait.impl/core/iter/traits/collect/trait.FromIterator.js new file mode 100644 index 0000000..896f153 --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><(<a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>, <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>)> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><(<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>, <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>)> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><<a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><<a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><(<a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>, <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>)> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><(<a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>, <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>)> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.IntoIterator.js b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js new file mode 100644 index 0000000..1e4c40e --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this mut <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this mut <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this mut <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this mut <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this mut <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>"],["impl<'bytes, 'this> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for &'this <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Copy.js b/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 0000000..c956ecd --- /dev/null +++ b/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 0000000..4601dd9 --- /dev/null +++ b/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::fo4::archive::OptionsBuilder"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>",1,["ba2::fo4::archive::Options"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>",1,["ba2::fo4::archive::Key"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>",1,["ba2::fo4::archive::Archive"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::fo4::chunk::CompressionOptionsBuilder"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>",1,["ba2::fo4::chunk::CompressionOptions"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>",1,["ba2::fo4::chunk::Chunk"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>",1,["ba2::fo4::file::CapacityError"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::fo4::file::ReadOptionsBuilder"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>",1,["ba2::fo4::file::ReadOptions"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>",1,["ba2::fo4::file::WriteOptionsBuilder"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>",1,["ba2::fo4::file::WriteOptions"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>",1,["ba2::fo4::file::DX10"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>",1,["ba2::fo4::file::GNMF"]],["impl Freeze for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>",1,["ba2::fo4::file::Header"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>",1,["ba2::fo4::file::File"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>",1,["ba2::fo4::hashing::Hash"]],["impl Freeze for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>",1,["ba2::fo4::hashing::FileHash"]],["impl Freeze for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>",1,["ba2::fo4::Error"]],["impl Freeze for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>",1,["ba2::fo4::CompressionFormat"]],["impl Freeze for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>",1,["ba2::fo4::CompressionLevel"]],["impl Freeze for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>",1,["ba2::fo4::Format"]],["impl Freeze for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>",1,["ba2::fo4::Version"]],["impl Freeze for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>",1,["ba2::guess::FileFormat"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes3::archive::Key"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>",1,["ba2::tes3::archive::Archive"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>",1,["ba2::tes3::file::File"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>",1,["ba2::tes3::hashing::Hash"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>",1,["ba2::tes3::hashing::FileHash"]],["impl Freeze for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>",1,["ba2::tes3::Error"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>",1,["ba2::tes4::archive::Flags"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>",1,["ba2::tes4::archive::Types"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes4::archive::Key"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::tes4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::tes4::archive::OptionsBuilder"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>",1,["ba2::tes4::archive::Options"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>",1,["ba2::tes4::archive::Archive"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>",1,["ba2::tes4::directory::Key"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>",1,["ba2::tes4::directory::Directory"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::tes4::file::CompressionOptionsBuilder"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>",1,["ba2::tes4::file::CompressionOptions"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::tes4::file::ReadOptionsBuilder"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>",1,["ba2::tes4::file::ReadOptions"]],["impl<'bytes> Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>",1,["ba2::tes4::file::File"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>",1,["ba2::tes4::hashing::Hash"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>",1,["ba2::tes4::hashing::DirectoryHash"]],["impl Freeze for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>",1,["ba2::tes4::hashing::FileHash"]],["impl Freeze for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>",1,["ba2::tes4::Error"]],["impl Freeze for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>",1,["ba2::tes4::CompressionCodec"]],["impl Freeze for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>",1,["ba2::tes4::Version"]],["impl<'borrow> Freeze for <a class=\"struct\" href=\"ba2/struct.Borrowed.html\" title=\"struct ba2::Borrowed\">Borrowed</a><'borrow>",1,["ba2::Borrowed"]],["impl<'copy> Freeze for <a class=\"struct\" href=\"ba2/struct.Copied.html\" title=\"struct ba2::Copied\">Copied</a><'copy>",1,["ba2::Copied"]],["impl Freeze for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>",1,["ba2::CompressionResult"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js new file mode 100644 index 0000000..c152843 --- /dev/null +++ b/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::fo4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>",1,["ba2::fo4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>",1,["ba2::fo4::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>",1,["ba2::fo4::archive::Archive"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::fo4::chunk::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>",1,["ba2::fo4::chunk::CompressionOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>",1,["ba2::fo4::chunk::Chunk"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>",1,["ba2::fo4::file::CapacityError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::fo4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>",1,["ba2::fo4::file::ReadOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>",1,["ba2::fo4::file::WriteOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>",1,["ba2::fo4::file::WriteOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>",1,["ba2::fo4::file::DX10"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>",1,["ba2::fo4::file::GNMF"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>",1,["ba2::fo4::file::Header"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>",1,["ba2::fo4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>",1,["ba2::fo4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>",1,["ba2::fo4::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>",1,["ba2::fo4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>",1,["ba2::fo4::CompressionFormat"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>",1,["ba2::fo4::CompressionLevel"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>",1,["ba2::fo4::Format"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>",1,["ba2::fo4::Version"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>",1,["ba2::guess::FileFormat"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes3::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>",1,["ba2::tes3::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>",1,["ba2::tes3::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>",1,["ba2::tes3::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>",1,["ba2::tes3::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>",1,["ba2::tes3::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>",1,["ba2::tes4::archive::Flags"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>",1,["ba2::tes4::archive::Types"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes4::archive::Key"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::tes4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::tes4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>",1,["ba2::tes4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>",1,["ba2::tes4::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>",1,["ba2::tes4::directory::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>",1,["ba2::tes4::directory::Directory"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::tes4::file::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>",1,["ba2::tes4::file::CompressionOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::tes4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>",1,["ba2::tes4::file::ReadOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>",1,["ba2::tes4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>",1,["ba2::tes4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>",1,["ba2::tes4::hashing::DirectoryHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>",1,["ba2::tes4::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>",1,["ba2::tes4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>",1,["ba2::tes4::CompressionCodec"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>",1,["ba2::tes4::Version"]],["impl<'borrow> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/struct.Borrowed.html\" title=\"struct ba2::Borrowed\">Borrowed</a><'borrow>",1,["ba2::Borrowed"]],["impl<'copy> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"struct\" href=\"ba2/struct.Copied.html\" title=\"struct ba2::Copied\">Copied</a><'copy>",1,["ba2::Copied"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Send.html\" title=\"trait core::marker::Send\">Send</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>",1,["ba2::CompressionResult"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralPartialEq.js b/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..637e18c --- /dev/null +++ b/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 0000000..6001365 --- /dev/null +++ b/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::fo4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>",1,["ba2::fo4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>",1,["ba2::fo4::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>",1,["ba2::fo4::archive::Archive"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::fo4::chunk::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>",1,["ba2::fo4::chunk::CompressionOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>",1,["ba2::fo4::chunk::Chunk"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>",1,["ba2::fo4::file::CapacityError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::fo4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>",1,["ba2::fo4::file::ReadOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>",1,["ba2::fo4::file::WriteOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>",1,["ba2::fo4::file::WriteOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>",1,["ba2::fo4::file::DX10"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>",1,["ba2::fo4::file::GNMF"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>",1,["ba2::fo4::file::Header"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>",1,["ba2::fo4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>",1,["ba2::fo4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>",1,["ba2::fo4::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>",1,["ba2::fo4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>",1,["ba2::fo4::CompressionFormat"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>",1,["ba2::fo4::CompressionLevel"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>",1,["ba2::fo4::Format"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>",1,["ba2::fo4::Version"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>",1,["ba2::guess::FileFormat"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes3::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>",1,["ba2::tes3::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>",1,["ba2::tes3::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>",1,["ba2::tes3::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>",1,["ba2::tes3::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>",1,["ba2::tes3::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>",1,["ba2::tes4::archive::Flags"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>",1,["ba2::tes4::archive::Types"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes4::archive::Key"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::tes4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::tes4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>",1,["ba2::tes4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>",1,["ba2::tes4::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>",1,["ba2::tes4::directory::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>",1,["ba2::tes4::directory::Directory"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::tes4::file::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>",1,["ba2::tes4::file::CompressionOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::tes4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>",1,["ba2::tes4::file::ReadOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>",1,["ba2::tes4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>",1,["ba2::tes4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>",1,["ba2::tes4::hashing::DirectoryHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>",1,["ba2::tes4::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>",1,["ba2::tes4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>",1,["ba2::tes4::CompressionCodec"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>",1,["ba2::tes4::Version"]],["impl<'borrow> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/struct.Borrowed.html\" title=\"struct ba2::Borrowed\">Borrowed</a><'borrow>",1,["ba2::Borrowed"]],["impl<'copy> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"struct\" href=\"ba2/struct.Copied.html\" title=\"struct ba2::Copied\">Copied</a><'copy>",1,["ba2::Copied"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sync.html\" title=\"trait core::marker::Sync\">Sync</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>",1,["ba2::CompressionResult"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 0000000..8940d58 --- /dev/null +++ b/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::fo4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>",1,["ba2::fo4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>",1,["ba2::fo4::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>",1,["ba2::fo4::archive::Archive"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::fo4::chunk::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>",1,["ba2::fo4::chunk::CompressionOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>",1,["ba2::fo4::chunk::Chunk"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>",1,["ba2::fo4::file::CapacityError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::fo4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>",1,["ba2::fo4::file::ReadOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>",1,["ba2::fo4::file::WriteOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>",1,["ba2::fo4::file::WriteOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>",1,["ba2::fo4::file::DX10"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>",1,["ba2::fo4::file::GNMF"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>",1,["ba2::fo4::file::Header"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>",1,["ba2::fo4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>",1,["ba2::fo4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>",1,["ba2::fo4::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>",1,["ba2::fo4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>",1,["ba2::fo4::CompressionFormat"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>",1,["ba2::fo4::CompressionLevel"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>",1,["ba2::fo4::Format"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>",1,["ba2::fo4::Version"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>",1,["ba2::guess::FileFormat"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes3::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>",1,["ba2::tes3::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>",1,["ba2::tes3::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>",1,["ba2::tes3::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>",1,["ba2::tes3::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>",1,["ba2::tes3::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>",1,["ba2::tes4::archive::Flags"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>",1,["ba2::tes4::archive::Types"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes4::archive::Key"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::tes4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::tes4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>",1,["ba2::tes4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>",1,["ba2::tes4::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>",1,["ba2::tes4::directory::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>",1,["ba2::tes4::directory::Directory"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::tes4::file::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>",1,["ba2::tes4::file::CompressionOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::tes4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>",1,["ba2::tes4::file::ReadOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>",1,["ba2::tes4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>",1,["ba2::tes4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>",1,["ba2::tes4::hashing::DirectoryHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>",1,["ba2::tes4::hashing::FileHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>",1,["ba2::tes4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>",1,["ba2::tes4::CompressionCodec"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>",1,["ba2::tes4::Version"]],["impl<'borrow> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/struct.Borrowed.html\" title=\"struct ba2::Borrowed\">Borrowed</a><'borrow>",1,["ba2::Borrowed"]],["impl<'copy> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"ba2/struct.Copied.html\" title=\"struct ba2::Copied\">Copied</a><'copy>",1,["ba2::Copied"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>",1,["ba2::CompressionResult"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/arith/trait.Sub.js b/trait.impl/core/ops/arith/trait.Sub.js new file mode 100644 index 0000000..b437a86 --- /dev/null +++ b/trait.impl/core/ops/arith/trait.Sub.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.Sub.html\" title=\"trait core::ops::arith::Sub\">Sub</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.Sub.html\" title=\"trait core::ops::arith::Sub\">Sub</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/arith/trait.SubAssign.js b/trait.impl/core/ops/arith/trait.SubAssign.js new file mode 100644 index 0000000..c8f280a --- /dev/null +++ b/trait.impl/core/ops/arith/trait.SubAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.SubAssign.html\" title=\"trait core::ops::arith::SubAssign\">SubAssign</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/arith/trait.SubAssign.html\" title=\"trait core::ops::arith::SubAssign\">SubAssign</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitAnd.js b/trait.impl/core/ops/bit/trait.BitAnd.js new file mode 100644 index 0000000..5f217b9 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitAnd.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAnd.html\" title=\"trait core::ops::bit::BitAnd\">BitAnd</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAnd.html\" title=\"trait core::ops::bit::BitAnd\">BitAnd</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitAndAssign.js b/trait.impl/core/ops/bit/trait.BitAndAssign.js new file mode 100644 index 0000000..ab0ee20 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitAndAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAndAssign.html\" title=\"trait core::ops::bit::BitAndAssign\">BitAndAssign</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitAndAssign.html\" title=\"trait core::ops::bit::BitAndAssign\">BitAndAssign</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitOr.js b/trait.impl/core/ops/bit/trait.BitOr.js new file mode 100644 index 0000000..5fd5ed9 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitOr.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOr.html\" title=\"trait core::ops::bit::BitOr\">BitOr</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOr.html\" title=\"trait core::ops::bit::BitOr\">BitOr</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitOrAssign.js b/trait.impl/core/ops/bit/trait.BitOrAssign.js new file mode 100644 index 0000000..9cd7b63 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitOrAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOrAssign.html\" title=\"trait core::ops::bit::BitOrAssign\">BitOrAssign</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitOrAssign.html\" title=\"trait core::ops::bit::BitOrAssign\">BitOrAssign</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitXor.js b/trait.impl/core/ops/bit/trait.BitXor.js new file mode 100644 index 0000000..33d5cb4 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitXor.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXor.html\" title=\"trait core::ops::bit::BitXor\">BitXor</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXor.html\" title=\"trait core::ops::bit::BitXor\">BitXor</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.BitXorAssign.js b/trait.impl/core/ops/bit/trait.BitXorAssign.js new file mode 100644 index 0000000..13a61d8 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.BitXorAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXorAssign.html\" title=\"trait core::ops::bit::BitXorAssign\">BitXorAssign</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.BitXorAssign.html\" title=\"trait core::ops::bit::BitXorAssign\">BitXorAssign</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/bit/trait.Not.js b/trait.impl/core/ops/bit/trait.Not.js new file mode 100644 index 0000000..2db1c35 --- /dev/null +++ b/trait.impl/core/ops/bit/trait.Not.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.Not.html\" title=\"trait core::ops::bit::Not\">Not</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/bit/trait.Not.html\" title=\"trait core::ops::bit::Not\">Not</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/deref/trait.Deref.js b/trait.impl/core/ops/deref/trait.Deref.js new file mode 100644 index 0000000..7363049 --- /dev/null +++ b/trait.impl/core/ops/deref/trait.Deref.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/deref/trait.DerefMut.js b/trait.impl/core/ops/deref/trait.DerefMut.js new file mode 100644 index 0000000..d4eb641 --- /dev/null +++ b/trait.impl/core/ops/deref/trait.DerefMut.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/index/trait.Index.js b/trait.impl/core/ops/index/trait.Index.js new file mode 100644 index 0000000..c1bf270 --- /dev/null +++ b/trait.impl/core/ops/index/trait.Index.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/index/trait.Index.html\" title=\"trait core::ops::index::Index\">Index</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.usize.html\">usize</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/index/trait.IndexMut.js b/trait.impl/core/ops/index/trait.IndexMut.js new file mode 100644 index 0000000..7c73b64 --- /dev/null +++ b/trait.impl/core/ops/index/trait.IndexMut.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/index/trait.IndexMut.html\" title=\"trait core::ops::index::IndexMut\">IndexMut</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.usize.html\">usize</a>> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 0000000..d77b1eb --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::fo4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>",1,["ba2::fo4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>",1,["ba2::fo4::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>",1,["ba2::fo4::archive::Archive"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::fo4::chunk::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>",1,["ba2::fo4::chunk::CompressionOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>",1,["ba2::fo4::chunk::Chunk"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>",1,["ba2::fo4::file::CapacityError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::fo4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>",1,["ba2::fo4::file::ReadOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>",1,["ba2::fo4::file::WriteOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>",1,["ba2::fo4::file::WriteOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>",1,["ba2::fo4::file::DX10"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>",1,["ba2::fo4::file::GNMF"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>",1,["ba2::fo4::file::Header"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>",1,["ba2::fo4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>",1,["ba2::fo4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>",1,["ba2::fo4::hashing::FileHash"]],["impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>",1,["ba2::fo4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>",1,["ba2::fo4::CompressionFormat"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>",1,["ba2::fo4::CompressionLevel"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>",1,["ba2::fo4::Format"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>",1,["ba2::fo4::Version"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>",1,["ba2::guess::FileFormat"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes3::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>",1,["ba2::tes3::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>",1,["ba2::tes3::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>",1,["ba2::tes3::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>",1,["ba2::tes3::hashing::FileHash"]],["impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>",1,["ba2::tes3::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>",1,["ba2::tes4::archive::Flags"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>",1,["ba2::tes4::archive::Types"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes4::archive::Key"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::tes4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::tes4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>",1,["ba2::tes4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>",1,["ba2::tes4::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>",1,["ba2::tes4::directory::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>",1,["ba2::tes4::directory::Directory"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::tes4::file::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>",1,["ba2::tes4::file::CompressionOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::tes4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>",1,["ba2::tes4::file::ReadOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>",1,["ba2::tes4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>",1,["ba2::tes4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>",1,["ba2::tes4::hashing::DirectoryHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>",1,["ba2::tes4::hashing::FileHash"]],["impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>",1,["ba2::tes4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>",1,["ba2::tes4::CompressionCodec"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>",1,["ba2::tes4::Version"]],["impl<'borrow> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/struct.Borrowed.html\" title=\"struct ba2::Borrowed\">Borrowed</a><'borrow>",1,["ba2::Borrowed"]],["impl<'copy> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"struct\" href=\"ba2/struct.Copied.html\" title=\"struct ba2::Copied\">Copied</a><'copy>",1,["ba2::Copied"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.RefUnwindSafe.html\" title=\"trait core::panic::unwind_safe::RefUnwindSafe\">RefUnwindSafe</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>",1,["ba2::CompressionResult"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 0000000..e5eb59d --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"ba2":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::fo4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::fo4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveOptions.html\" title=\"struct ba2::fo4::ArchiveOptions\">Options</a>",1,["ba2::fo4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ArchiveKey.html\" title=\"struct ba2::fo4::ArchiveKey\">Key</a><'bytes>",1,["ba2::fo4::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Archive.html\" title=\"struct ba2::fo4::Archive\">Archive</a><'bytes>",1,["ba2::fo4::archive::Archive"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptionsBuilder.html\" title=\"struct ba2::fo4::ChunkCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::fo4::chunk::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.ChunkCompressionOptions.html\" title=\"struct ba2::fo4::ChunkCompressionOptions\">CompressionOptions</a>",1,["ba2::fo4::chunk::CompressionOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Chunk.html\" title=\"struct ba2::fo4::Chunk\">Chunk</a><'bytes>",1,["ba2::fo4::chunk::Chunk"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileCapacityError.html\" title=\"struct ba2::fo4::FileCapacityError\">CapacityError</a><'bytes>",1,["ba2::fo4::file::CapacityError"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::fo4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::fo4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileReadOptions.html\" title=\"struct ba2::fo4::FileReadOptions\">ReadOptions</a>",1,["ba2::fo4::file::ReadOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptionsBuilder.html\" title=\"struct ba2::fo4::FileWriteOptionsBuilder\">WriteOptionsBuilder</a>",1,["ba2::fo4::file::WriteOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileWriteOptions.html\" title=\"struct ba2::fo4::FileWriteOptions\">WriteOptions</a>",1,["ba2::fo4::file::WriteOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.DX10Header.html\" title=\"struct ba2::fo4::DX10Header\">DX10</a>",1,["ba2::fo4::file::DX10"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.GNMFHeader.html\" title=\"struct ba2::fo4::GNMFHeader\">GNMF</a>",1,["ba2::fo4::file::GNMF"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.FileHeader.html\" title=\"enum ba2::fo4::FileHeader\">Header</a>",1,["ba2::fo4::file::Header"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.File.html\" title=\"struct ba2::fo4::File\">File</a><'bytes>",1,["ba2::fo4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.Hash.html\" title=\"struct ba2::fo4::Hash\">Hash</a>",1,["ba2::fo4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/fo4/struct.FileHash.html\" title=\"struct ba2::fo4::FileHash\">FileHash</a>",1,["ba2::fo4::hashing::FileHash"]],["impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Error.html\" title=\"enum ba2::fo4::Error\">Error</a>",1,["ba2::fo4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionFormat.html\" title=\"enum ba2::fo4::CompressionFormat\">CompressionFormat</a>",1,["ba2::fo4::CompressionFormat"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.CompressionLevel.html\" title=\"enum ba2::fo4::CompressionLevel\">CompressionLevel</a>",1,["ba2::fo4::CompressionLevel"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Format.html\" title=\"enum ba2::fo4::Format\">Format</a>",1,["ba2::fo4::Format"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/fo4/enum.Version.html\" title=\"enum ba2::fo4::Version\">Version</a>",1,["ba2::fo4::Version"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/enum.FileFormat.html\" title=\"enum ba2::FileFormat\">FileFormat</a>",1,["ba2::guess::FileFormat"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.ArchiveKey.html\" title=\"struct ba2::tes3::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes3::archive::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Archive.html\" title=\"struct ba2::tes3::Archive\">Archive</a><'bytes>",1,["ba2::tes3::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.File.html\" title=\"struct ba2::tes3::File\">File</a><'bytes>",1,["ba2::tes3::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.Hash.html\" title=\"struct ba2::tes3::Hash\">Hash</a>",1,["ba2::tes3::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes3/struct.FileHash.html\" title=\"struct ba2::tes3::FileHash\">FileHash</a>",1,["ba2::tes3::hashing::FileHash"]],["impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/tes3/enum.Error.html\" title=\"enum ba2::tes3::Error\">Error</a>",1,["ba2::tes3::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveFlags.html\" title=\"struct ba2::tes4::ArchiveFlags\">Flags</a>",1,["ba2::tes4::archive::Flags"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveTypes.html\" title=\"struct ba2::tes4::ArchiveTypes\">Types</a>",1,["ba2::tes4::archive::Types"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveKey.html\" title=\"struct ba2::tes4::ArchiveKey\">Key</a><'bytes>",1,["ba2::tes4::archive::Key"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptionsBuilder.html\" title=\"struct ba2::tes4::ArchiveOptionsBuilder\">OptionsBuilder</a>",1,["ba2::tes4::archive::OptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.ArchiveOptions.html\" title=\"struct ba2::tes4::ArchiveOptions\">Options</a>",1,["ba2::tes4::archive::Options"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Archive.html\" title=\"struct ba2::tes4::Archive\">Archive</a><'bytes>",1,["ba2::tes4::archive::Archive"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryKey.html\" title=\"struct ba2::tes4::DirectoryKey\">Key</a><'bytes>",1,["ba2::tes4::directory::Key"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Directory.html\" title=\"struct ba2::tes4::Directory\">Directory</a><'bytes>",1,["ba2::tes4::directory::Directory"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptionsBuilder.html\" title=\"struct ba2::tes4::FileCompressionOptionsBuilder\">CompressionOptionsBuilder</a>",1,["ba2::tes4::file::CompressionOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileCompressionOptions.html\" title=\"struct ba2::tes4::FileCompressionOptions\">CompressionOptions</a>",1,["ba2::tes4::file::CompressionOptions"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptionsBuilder.html\" title=\"struct ba2::tes4::FileReadOptionsBuilder\">ReadOptionsBuilder</a>",1,["ba2::tes4::file::ReadOptionsBuilder"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileReadOptions.html\" title=\"struct ba2::tes4::FileReadOptions\">ReadOptions</a>",1,["ba2::tes4::file::ReadOptions"]],["impl<'bytes> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.File.html\" title=\"struct ba2::tes4::File\">File</a><'bytes>",1,["ba2::tes4::file::File"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.Hash.html\" title=\"struct ba2::tes4::Hash\">Hash</a>",1,["ba2::tes4::hashing::Hash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.DirectoryHash.html\" title=\"struct ba2::tes4::DirectoryHash\">DirectoryHash</a>",1,["ba2::tes4::hashing::DirectoryHash"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/tes4/struct.FileHash.html\" title=\"struct ba2::tes4::FileHash\">FileHash</a>",1,["ba2::tes4::hashing::FileHash"]],["impl !<a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Error.html\" title=\"enum ba2::tes4::Error\">Error</a>",1,["ba2::tes4::Error"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/tes4/enum.CompressionCodec.html\" title=\"enum ba2::tes4::CompressionCodec\">CompressionCodec</a>",1,["ba2::tes4::CompressionCodec"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/tes4/enum.Version.html\" title=\"enum ba2::tes4::Version\">Version</a>",1,["ba2::tes4::Version"]],["impl<'borrow> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/struct.Borrowed.html\" title=\"struct ba2::Borrowed\">Borrowed</a><'borrow>",1,["ba2::Borrowed"]],["impl<'copy> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"struct\" href=\"ba2/struct.Copied.html\" title=\"struct ba2::Copied\">Copied</a><'copy>",1,["ba2::Copied"]],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/panic/unwind_safe/trait.UnwindSafe.html\" title=\"trait core::panic::unwind_safe::UnwindSafe\">UnwindSafe</a> for <a class=\"enum\" href=\"ba2/enum.CompressionResult.html\" title=\"enum ba2::CompressionResult\">CompressionResult</a>",1,["ba2::CompressionResult"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/type.impl/core/result/enum.Result.js b/type.impl/core/result/enum.Result.js new file mode 100644 index 0000000..839274a --- /dev/null +++ b/type.impl/core/result/enum.Result.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"ba2":[["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Result%3CT,+E%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#518\">source</a><a href=\"#impl-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_ok\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0, const since 1.48.0\">1.0.0 (const: 1.48.0)</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#538\">source</a></span><h4 class=\"code-header\">pub const fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.is_ok\" class=\"fn\">is_ok</a>(&self) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><i32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(-<span class=\"number\">3</span>);\n<span class=\"macro\">assert_eq!</span>(x.is_ok(), <span class=\"bool-val\">true</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><i32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Some error message\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.is_ok(), <span class=\"bool-val\">false</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_ok_and\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#559\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.is_ok_and\" class=\"fn\">is_ok_and</a>(self, f: impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(T) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a>) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> and the value inside of it matches a predicate.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(x.is_ok_and(|x| x > <span class=\"number\">1</span>), <span class=\"bool-val\">true</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">0</span>);\n<span class=\"macro\">assert_eq!</span>(x.is_ok_and(|x| x > <span class=\"number\">1</span>), <span class=\"bool-val\">false</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"hey\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.is_ok_and(|x| x > <span class=\"number\">1</span>), <span class=\"bool-val\">false</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_err\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0, const since 1.48.0\">1.0.0 (const: 1.48.0)</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#581\">source</a></span><h4 class=\"code-header\">pub const fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.is_err\" class=\"fn\">is_err</a>(&self) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>.</p>\n<h5 id=\"examples-2\"><a class=\"doc-anchor\" href=\"#examples-2\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><i32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(-<span class=\"number\">3</span>);\n<span class=\"macro\">assert_eq!</span>(x.is_err(), <span class=\"bool-val\">false</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><i32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Some error message\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.is_err(), <span class=\"bool-val\">true</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.is_err_and\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.70.0\">1.70.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#604\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.is_err_and\" class=\"fn\">is_err_and</a>(self, f: impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(E) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a>) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class=\"docblock\"><p>Returns <code>true</code> if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> and the value inside of it matches a predicate.</p>\n<h5 id=\"examples-3\"><a class=\"doc-anchor\" href=\"#examples-3\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>std::io::{Error, ErrorKind};\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, Error> = <span class=\"prelude-val\">Err</span>(Error::new(ErrorKind::NotFound, <span class=\"string\">\"!\"</span>));\n<span class=\"macro\">assert_eq!</span>(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), <span class=\"bool-val\">true</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, Error> = <span class=\"prelude-val\">Err</span>(Error::new(ErrorKind::PermissionDenied, <span class=\"string\">\"!\"</span>));\n<span class=\"macro\">assert_eq!</span>(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), <span class=\"bool-val\">false</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, Error> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">123</span>);\n<span class=\"macro\">assert_eq!</span>(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), <span class=\"bool-val\">false</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ok\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#631\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.ok\" class=\"fn\">ok</a>(self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a><T></h4></section></summary><div class=\"docblock\"><p>Converts from <code>Result<T, E></code> to <a href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\"><code>Option<T></code></a>.</p>\n<p>Converts <code>self</code> into an <a href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\"><code>Option<T></code></a>, consuming <code>self</code>,\nand discarding the error, if any.</p>\n<h5 id=\"examples-4\"><a class=\"doc-anchor\" href=\"#examples-4\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(x.ok(), <span class=\"prelude-val\">Some</span>(<span class=\"number\">2</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Nothing here\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.ok(), <span class=\"prelude-val\">None</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.err\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#654\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.err\" class=\"fn\">err</a>(self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a><E></h4></section></summary><div class=\"docblock\"><p>Converts from <code>Result<T, E></code> to <a href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\"><code>Option<E></code></a>.</p>\n<p>Converts <code>self</code> into an <a href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\"><code>Option<E></code></a>, consuming <code>self</code>,\nand discarding the success value, if any.</p>\n<h5 id=\"examples-5\"><a class=\"doc-anchor\" href=\"#examples-5\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(x.err(), <span class=\"prelude-val\">None</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Nothing here\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.err(), <span class=\"prelude-val\">Some</span>(<span class=\"string\">\"Nothing here\"</span>));</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.as_ref\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0, const since 1.48.0\">1.0.0 (const: 1.48.0)</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#682\">source</a></span><h4 class=\"code-header\">pub const fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.as_ref\" class=\"fn\">as_ref</a>(&self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&T</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&E</a>></h4></section></summary><div class=\"docblock\"><p>Converts from <code>&Result<T, E></code> to <code>Result<&T, &E></code>.</p>\n<p>Produces a new <code>Result</code>, containing a reference\ninto the original, leaving the original in place.</p>\n<h5 id=\"examples-6\"><a class=\"doc-anchor\" href=\"#examples-6\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(x.as_ref(), <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&</span><span class=\"number\">2</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Error\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.as_ref(), <span class=\"prelude-val\">Err</span>(<span class=\"kw-2\">&</span><span class=\"string\">\"Error\"</span>));</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.as_mut\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0, const unstable\">1.0.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/82814\" title=\"Tracking issue for const_result\">unstable</a>)</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#712\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.as_mut\" class=\"fn\">as_mut</a>(&mut self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&mut T</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&mut E</a>></h4></section></summary><div class=\"docblock\"><p>Converts from <code>&mut Result<T, E></code> to <code>Result<&mut T, &mut E></code>.</p>\n<h5 id=\"examples-7\"><a class=\"doc-anchor\" href=\"#examples-7\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">fn </span>mutate(r: <span class=\"kw-2\">&mut </span><span class=\"prelude-ty\">Result</span><i32, i32>) {\n <span class=\"kw\">match </span>r.as_mut() {\n <span class=\"prelude-val\">Ok</span>(v) => <span class=\"kw-2\">*</span>v = <span class=\"number\">42</span>,\n <span class=\"prelude-val\">Err</span>(e) => <span class=\"kw-2\">*</span>e = <span class=\"number\">0</span>,\n }\n}\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>x: <span class=\"prelude-ty\">Result</span><i32, i32> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\nmutate(<span class=\"kw-2\">&mut </span>x);\n<span class=\"macro\">assert_eq!</span>(x.unwrap(), <span class=\"number\">42</span>);\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>x: <span class=\"prelude-ty\">Result</span><i32, i32> = <span class=\"prelude-val\">Err</span>(<span class=\"number\">13</span>);\nmutate(<span class=\"kw-2\">&mut </span>x);\n<span class=\"macro\">assert_eq!</span>(x.unwrap_err(), <span class=\"number\">0</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.map\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#744\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.map\" class=\"fn\">map</a><U, F>(self, op: F) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E><div class=\"where\">where\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(T) -> U,</div></h4></section></summary><div class=\"docblock\"><p>Maps a <code>Result<T, E></code> to <code>Result<U, E></code> by applying a function to a\ncontained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value, leaving an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value untouched.</p>\n<p>This function can be used to compose the results of two functions.</p>\n<h5 id=\"examples-8\"><a class=\"doc-anchor\" href=\"#examples-8\">§</a>Examples</h5>\n<p>Print the numbers on each line of a string multiplied by two.</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>line = <span class=\"string\">\"1\\n2\\n3\\n4\\n\"</span>;\n\n<span class=\"kw\">for </span>num <span class=\"kw\">in </span>line.lines() {\n <span class=\"kw\">match </span>num.parse::<i32>().map(|i| i * <span class=\"number\">2</span>) {\n <span class=\"prelude-val\">Ok</span>(n) => <span class=\"macro\">println!</span>(<span class=\"string\">\"{n}\"</span>),\n <span class=\"prelude-val\">Err</span>(..) => {}\n }\n}</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.map_or\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0\">1.41.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#772\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.map_or\" class=\"fn\">map_or</a><U, F>(self, default: U, f: F) -> U<div class=\"where\">where\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(T) -> U,</div></h4></section></summary><div class=\"docblock\"><p>Returns the provided default (if <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>), or\napplies a function to the contained value (if <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>).</p>\n<p>Arguments passed to <code>map_or</code> are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.map_or_else\" title=\"method core::result::Result::map_or_else\"><code>map_or_else</code></a>,\nwhich is lazily evaluated.</p>\n<h5 id=\"examples-9\"><a class=\"doc-anchor\" href=\"#examples-9\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"kw\">_</span>, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"foo\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.map_or(<span class=\"number\">42</span>, |v| v.len()), <span class=\"number\">3</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>str, <span class=\"kw\">_</span>> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"bar\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.map_or(<span class=\"number\">42</span>, |v| v.len()), <span class=\"number\">42</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.map_or_else\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.41.0\">1.41.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#799\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.map_or_else\" class=\"fn\">map_or_else</a><U, D, F>(self, default: D, f: F) -> U<div class=\"where\">where\n D: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(E) -> U,\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(T) -> U,</div></h4></section></summary><div class=\"docblock\"><p>Maps a <code>Result<T, E></code> to <code>U</code> by applying fallback function <code>default</code> to\na contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value, or function <code>f</code> to a contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value.</p>\n<p>This function can be used to unpack a successful result\nwhile handling an error.</p>\n<h5 id=\"examples-10\"><a class=\"doc-anchor\" href=\"#examples-10\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>k = <span class=\"number\">21</span>;\n\n<span class=\"kw\">let </span>x : <span class=\"prelude-ty\">Result</span><<span class=\"kw\">_</span>, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"foo\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.map_or_else(|e| k * <span class=\"number\">2</span>, |v| v.len()), <span class=\"number\">3</span>);\n\n<span class=\"kw\">let </span>x : <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>str, <span class=\"kw\">_</span>> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"bar\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.map_or_else(|e| k * <span class=\"number\">2</span>, |v| v.len()), <span class=\"number\">42</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.map_err\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#826\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.map_err\" class=\"fn\">map_err</a><F, O>(self, op: O) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F><div class=\"where\">where\n O: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(E) -> F,</div></h4></section></summary><div class=\"docblock\"><p>Maps a <code>Result<T, E></code> to <code>Result<T, F></code> by applying a function to a\ncontained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value, leaving an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value untouched.</p>\n<p>This function can be used to pass through a successful result while handling\nan error.</p>\n<h5 id=\"examples-11\"><a class=\"doc-anchor\" href=\"#examples-11\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">fn </span>stringify(x: u32) -> String { <span class=\"macro\">format!</span>(<span class=\"string\">\"error code: {x}\"</span>) }\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, u32> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(x.map_err(stringify), <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, u32> = <span class=\"prelude-val\">Err</span>(<span class=\"number\">13</span>);\n<span class=\"macro\">assert_eq!</span>(x.map_err(stringify), <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"error code: 13\"</span>.to_string()));</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.inspect\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.76.0\">1.76.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#846\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.inspect\" class=\"fn\">inspect</a><F>(self, f: F) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&T</a>),</div></h4></section></summary><div class=\"docblock\"><p>Calls the provided closure with a reference to the contained value (if <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>).</p>\n<h5 id=\"examples-12\"><a class=\"doc-anchor\" href=\"#examples-12\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: u8 = <span class=\"string\">\"4\"\n </span>.parse::<u8>()\n .inspect(|x| <span class=\"macro\">println!</span>(<span class=\"string\">\"original: {x}\"</span>))\n .map(|x| x.pow(<span class=\"number\">3</span>))\n .expect(<span class=\"string\">\"failed to parse number\"</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.inspect_err\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.76.0\">1.76.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#868\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.inspect_err\" class=\"fn\">inspect_err</a><F>(self, f: F) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&E</a>),</div></h4></section></summary><div class=\"docblock\"><p>Calls the provided closure with a reference to the contained error (if <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>).</p>\n<h5 id=\"examples-13\"><a class=\"doc-anchor\" href=\"#examples-13\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>std::{fs, io};\n\n<span class=\"kw\">fn </span>read() -> io::Result<String> {\n fs::read_to_string(<span class=\"string\">\"address.txt\"</span>)\n .inspect_err(|e| <span class=\"macro\">eprintln!</span>(<span class=\"string\">\"failed to read file: {e}\"</span>))\n}</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.as_deref\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.47.0\">1.47.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#894-896\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.as_deref\" class=\"fn\">as_deref</a>(&self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><&<T as <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a>>::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target\" title=\"type core::ops::deref::Deref::Target\">Target</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&E</a>><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a>,</div></h4></section></summary><div class=\"docblock\"><p>Converts from <code>Result<T, E></code> (or <code>&Result<T, E></code>) to <code>Result<&<T as Deref>::Target, &E></code>.</p>\n<p>Coerces the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> variant of the original <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\"><code>Result</code></a> via <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\"><code>Deref</code></a>\nand returns the new <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\"><code>Result</code></a>.</p>\n<h5 id=\"examples-14\"><a class=\"doc-anchor\" href=\"#examples-14\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><String, u32> = <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"hello\"</span>.to_string());\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>str, <span class=\"kw-2\">&</span>u32> = <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"hello\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.as_deref(), y);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><String, u32> = <span class=\"prelude-val\">Err</span>(<span class=\"number\">42</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>str, <span class=\"kw-2\">&</span>u32> = <span class=\"prelude-val\">Err</span>(<span class=\"kw-2\">&</span><span class=\"number\">42</span>);\n<span class=\"macro\">assert_eq!</span>(x.as_deref(), y);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.as_deref_mut\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.47.0\">1.47.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#921-923\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.as_deref_mut\" class=\"fn\">as_deref_mut</a>(&mut self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><&mut <T as <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html\" title=\"trait core::ops::deref::Deref\">Deref</a>>::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.Deref.html#associatedtype.Target\" title=\"type core::ops::deref::Deref::Target\">Target</a>, <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&mut E</a>><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\">DerefMut</a>,</div></h4></section></summary><div class=\"docblock\"><p>Converts from <code>Result<T, E></code> (or <code>&mut Result<T, E></code>) to <code>Result<&mut <T as DerefMut>::Target, &mut E></code>.</p>\n<p>Coerces the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> variant of the original <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\"><code>Result</code></a> via <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/deref/trait.DerefMut.html\" title=\"trait core::ops::deref::DerefMut\"><code>DerefMut</code></a>\nand returns the new <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\"><code>Result</code></a>.</p>\n<h5 id=\"examples-15\"><a class=\"doc-anchor\" href=\"#examples-15\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span><span class=\"kw-2\">mut </span>s = <span class=\"string\">\"HELLO\"</span>.to_string();\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>x: <span class=\"prelude-ty\">Result</span><String, u32> = <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"hello\"</span>.to_string());\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&mut </span>str, <span class=\"kw-2\">&mut </span>u32> = <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&mut </span>s);\n<span class=\"macro\">assert_eq!</span>(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>i = <span class=\"number\">42</span>;\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>x: <span class=\"prelude-ty\">Result</span><String, u32> = <span class=\"prelude-val\">Err</span>(<span class=\"number\">42</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&mut </span>str, <span class=\"kw-2\">&mut </span>u32> = <span class=\"prelude-val\">Err</span>(<span class=\"kw-2\">&mut </span>i);\n<span class=\"macro\">assert_eq!</span>(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.iter\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#947\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.iter\" class=\"fn\">iter</a>(&self) -> <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/result/struct.Iter.html\" title=\"struct core::result::Iter\">Iter</a><'_, T></h4></section></summary><div class=\"docblock\"><p>Returns an iterator over the possibly contained value.</p>\n<p>The iterator yields one value if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Result::Ok</code></a>, otherwise none.</p>\n<h5 id=\"examples-16\"><a class=\"doc-anchor\" href=\"#examples-16\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">7</span>);\n<span class=\"macro\">assert_eq!</span>(x.iter().next(), <span class=\"prelude-val\">Some</span>(<span class=\"kw-2\">&</span><span class=\"number\">7</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"nothing!\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.iter().next(), <span class=\"prelude-val\">None</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.iter_mut\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#970\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.iter_mut\" class=\"fn\">iter_mut</a>(&mut self) -> <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/result/struct.IterMut.html\" title=\"struct core::result::IterMut\">IterMut</a><'_, T></h4></section></summary><div class=\"docblock\"><p>Returns a mutable iterator over the possibly contained value.</p>\n<p>The iterator yields one value if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Result::Ok</code></a>, otherwise none.</p>\n<h5 id=\"examples-17\"><a class=\"doc-anchor\" href=\"#examples-17\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span><span class=\"kw-2\">mut </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">7</span>);\n<span class=\"kw\">match </span>x.iter_mut().next() {\n <span class=\"prelude-val\">Some</span>(v) => <span class=\"kw-2\">*</span>v = <span class=\"number\">40</span>,\n <span class=\"prelude-val\">None </span>=> {},\n}\n<span class=\"macro\">assert_eq!</span>(x, <span class=\"prelude-val\">Ok</span>(<span class=\"number\">40</span>));\n\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"nothing!\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.iter_mut().next(), <span class=\"prelude-val\">None</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.expect\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.4.0\">1.4.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1024-1026\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.expect\" class=\"fn\">expect</a>(self, msg: &<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.str.html\">str</a>) -> T<div class=\"where\">where\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>,</div></h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value, consuming the <code>self</code> value.</p>\n<p>Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>\ncase explicitly, or call <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap_or\" title=\"method core::result::Result::unwrap_or\"><code>unwrap_or</code></a>, <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap_or_else\" title=\"method core::result::Result::unwrap_or_else\"><code>unwrap_or_else</code></a>, or\n<a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap_or_default\" title=\"method core::result::Result::unwrap_or_default\"><code>unwrap_or_default</code></a>.</p>\n<h5 id=\"panics\"><a class=\"doc-anchor\" href=\"#panics\">§</a>Panics</h5>\n<p>Panics if the value is an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>, with a panic message including the\npassed message, and the content of the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>.</p>\n<h5 id=\"examples-18\"><a class=\"doc-anchor\" href=\"#examples-18\">§</a>Examples</h5>\n<div class=\"example-wrap should_panic\"><a href=\"#\" class=\"tooltip\" title=\"This example panics\">ⓘ</a><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"emergency failure\"</span>);\nx.expect(<span class=\"string\">\"Testing expect\"</span>); <span class=\"comment\">// panics with `Testing expect: emergency failure`</span></code></pre></div>\n<h5 id=\"recommended-message-style\"><a class=\"doc-anchor\" href=\"#recommended-message-style\">§</a>Recommended Message Style</h5>\n<p>We recommend that <code>expect</code> messages are used to describe the reason you\n<em>expect</em> the <code>Result</code> should be <code>Ok</code>.</p>\n\n<div class=\"example-wrap should_panic\"><a href=\"#\" class=\"tooltip\" title=\"This example panics\">ⓘ</a><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>path = std::env::var(<span class=\"string\">\"IMPORTANT_PATH\"</span>)\n .expect(<span class=\"string\">\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\"</span>);</code></pre></div>\n<p><strong>Hint</strong>: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.</p>\n<p>For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on <a href=\"../../std/error/index.html#common-message-styles\">“Common Message\nStyles”</a> in the\n<a href=\"../../std/error/index.html\"><code>std::error</code></a> module docs.</p>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unwrap\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1067-1069\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.unwrap\" class=\"fn\">unwrap</a>(self) -> T<div class=\"where\">where\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>,</div></h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value, consuming the <code>self</code> value.</p>\n<p>Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>\ncase explicitly, or call <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap_or\" title=\"method core::result::Result::unwrap_or\"><code>unwrap_or</code></a>, <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap_or_else\" title=\"method core::result::Result::unwrap_or_else\"><code>unwrap_or_else</code></a>, or\n<a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap_or_default\" title=\"method core::result::Result::unwrap_or_default\"><code>unwrap_or_default</code></a>.</p>\n<h5 id=\"panics-1\"><a class=\"doc-anchor\" href=\"#panics-1\">§</a>Panics</h5>\n<p>Panics if the value is an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>, with a panic message provided by the\n<a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>’s value.</p>\n<h5 id=\"examples-19\"><a class=\"doc-anchor\" href=\"#examples-19\">§</a>Examples</h5>\n<p>Basic usage:</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(x.unwrap(), <span class=\"number\">2</span>);</code></pre></div>\n\n<div class=\"example-wrap should_panic\"><a href=\"#\" class=\"tooltip\" title=\"This example panics\">ⓘ</a><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"emergency failure\"</span>);\nx.unwrap(); <span class=\"comment\">// panics with `emergency failure`</span></code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unwrap_or_default\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.16.0\">1.16.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1104-1106\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.unwrap_or_default\" class=\"fn\">unwrap_or_default</a>(self) -> T<div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a>,</div></h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value or a default</p>\n<p>Consumes the <code>self</code> argument then, if <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>, returns the contained\nvalue, otherwise if <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>, returns the default value for that\ntype.</p>\n<h5 id=\"examples-20\"><a class=\"doc-anchor\" href=\"#examples-20\">§</a>Examples</h5>\n<p>Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). <a href=\"https://doc.rust-lang.org/1.77.0/std/primitive.str.html#method.parse\" title=\"method str::parse\"><code>parse</code></a> converts\na string to any other type that implements <a href=\"https://doc.rust-lang.org/1.77.0/core/str/traits/trait.FromStr.html\" title=\"trait core::str::traits::FromStr\"><code>FromStr</code></a>, returning an\n<a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> on error.</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>good_year_from_input = <span class=\"string\">\"1909\"</span>;\n<span class=\"kw\">let </span>bad_year_from_input = <span class=\"string\">\"190blarg\"</span>;\n<span class=\"kw\">let </span>good_year = good_year_from_input.parse().unwrap_or_default();\n<span class=\"kw\">let </span>bad_year = bad_year_from_input.parse().unwrap_or_default();\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"number\">1909</span>, good_year);\n<span class=\"macro\">assert_eq!</span>(<span class=\"number\">0</span>, bad_year);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.expect_err\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.17.0\">1.17.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1131-1133\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.expect_err\" class=\"fn\">expect_err</a>(self, msg: &<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.str.html\">str</a>) -> E<div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>,</div></h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value, consuming the <code>self</code> value.</p>\n<h5 id=\"panics-2\"><a class=\"doc-anchor\" href=\"#panics-2\">§</a>Panics</h5>\n<p>Panics if the value is an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>, with a panic message including the\npassed message, and the content of the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>.</p>\n<h5 id=\"examples-21\"><a class=\"doc-anchor\" href=\"#examples-21\">§</a>Examples</h5>\n<div class=\"example-wrap should_panic\"><a href=\"#\" class=\"tooltip\" title=\"This example panics\">ⓘ</a><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">10</span>);\nx.expect_err(<span class=\"string\">\"Testing expect_err\"</span>); <span class=\"comment\">// panics with `Testing expect_err: 10`</span></code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unwrap_err\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1162-1164\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.unwrap_err\" class=\"fn\">unwrap_err</a>(self) -> E<div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>,</div></h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value, consuming the <code>self</code> value.</p>\n<h5 id=\"panics-3\"><a class=\"doc-anchor\" href=\"#panics-3\">§</a>Panics</h5>\n<p>Panics if the value is an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>, with a custom panic message provided\nby the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>’s value.</p>\n<h5 id=\"examples-22\"><a class=\"doc-anchor\" href=\"#examples-22\">§</a>Examples</h5>\n<div class=\"example-wrap should_panic\"><a href=\"#\" class=\"tooltip\" title=\"This example panics\">ⓘ</a><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\nx.unwrap_err(); <span class=\"comment\">// panics with `2`</span></code></pre></div>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"emergency failure\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.unwrap_err(), <span class=\"string\">\"emergency failure\"</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.into_ok\" class=\"method\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1197-1199\">source</a><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.into_ok\" class=\"fn\">into_ok</a>(self) -> T<div class=\"where\">where\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html\" title=\"trait core::convert::Into\">Into</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.never.html\">!</a>>,</div></h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>unwrap_infallible</code>)</span></div></span></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value, but never panics.</p>\n<p>Unlike <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap\" title=\"method core::result::Result::unwrap\"><code>unwrap</code></a>, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of <code>unwrap</code> as a maintainability safeguard that will fail\nto compile if the error type of the <code>Result</code> is later changed\nto an error that can actually occur.</p>\n<h5 id=\"examples-23\"><a class=\"doc-anchor\" href=\"#examples-23\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">fn </span>only_good_news() -> <span class=\"prelude-ty\">Result</span><String, !> {\n <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"this is fine\"</span>.into())\n}\n\n<span class=\"kw\">let </span>s: String = only_good_news().into_ok();\n<span class=\"macro\">println!</span>(<span class=\"string\">\"{s}\"</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.into_err\" class=\"method\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1232-1234\">source</a><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.into_err\" class=\"fn\">into_err</a>(self) -> E<div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.Into.html\" title=\"trait core::convert::Into\">Into</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.never.html\">!</a>>,</div></h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>unwrap_infallible</code>)</span></div></span></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value, but never panics.</p>\n<p>Unlike <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap_err\" title=\"method core::result::Result::unwrap_err\"><code>unwrap_err</code></a>, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of <code>unwrap_err</code> as a maintainability safeguard that will fail\nto compile if the ok type of the <code>Result</code> is later changed\nto a type that can actually occur.</p>\n<h5 id=\"examples-24\"><a class=\"doc-anchor\" href=\"#examples-24\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code>\n<span class=\"kw\">fn </span>only_bad_news() -> <span class=\"prelude-ty\">Result</span><!, String> {\n <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Oops, it failed\"</span>.into())\n}\n\n<span class=\"kw\">let </span>error: String = only_bad_news().into_err();\n<span class=\"macro\">println!</span>(<span class=\"string\">\"{error}\"</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.and\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1275\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.and\" class=\"fn\">and</a><U>(self, res: <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E>) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E></h4></section></summary><div class=\"docblock\"><p>Returns <code>res</code> if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>, otherwise returns the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value of <code>self</code>.</p>\n<p>Arguments passed to <code>and</code> are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.and_then\" title=\"method core::result::Result::and_then\"><code>and_then</code></a>, which is\nlazily evaluated.</p>\n<h5 id=\"examples-25\"><a class=\"doc-anchor\" href=\"#examples-25\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>str, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"late error\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.and(y), <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"late error\"</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"early error\"</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>str, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"foo\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.and(y), <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"early error\"</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"not a 2\"</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>str, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"late error\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.and(y), <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"not a 2\"</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>str, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"different result type\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.and(y), <span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"different result type\"</span>));</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.and_then\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1314\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.and_then\" class=\"fn\">and_then</a><U, F>(self, op: F) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E><div class=\"where\">where\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(T) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E>,</div></h4></section></summary><div class=\"docblock\"><p>Calls <code>op</code> if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>, otherwise returns the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value of <code>self</code>.</p>\n<p>This function can be used for control flow based on <code>Result</code> values.</p>\n<h5 id=\"examples-26\"><a class=\"doc-anchor\" href=\"#examples-26\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">fn </span>sq_then_to_string(x: u32) -> <span class=\"prelude-ty\">Result</span><String, <span class=\"kw-2\">&</span><span class=\"lifetime\">'static </span>str> {\n x.checked_mul(x).map(|sq| sq.to_string()).ok_or(<span class=\"string\">\"overflowed\"</span>)\n}\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>).and_then(sq_then_to_string), <span class=\"prelude-val\">Ok</span>(<span class=\"number\">4</span>.to_string()));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"number\">1_000_000</span>).and_then(sq_then_to_string), <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"overflowed\"</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Err</span>(<span class=\"string\">\"not a number\"</span>).and_then(sq_then_to_string), <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"not a number\"</span>));</code></pre></div>\n<p>Often used to chain fallible operations that may return <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>.</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">use </span>std::{io::ErrorKind, path::Path};\n\n<span class=\"comment\">// Note: on Windows \"/\" maps to \"C:\\\"\n</span><span class=\"kw\">let </span>root_modified_time = Path::new(<span class=\"string\">\"/\"</span>).metadata().and_then(|md| md.modified());\n<span class=\"macro\">assert!</span>(root_modified_time.is_ok());\n\n<span class=\"kw\">let </span>should_fail = Path::new(<span class=\"string\">\"/bad/path\"</span>).metadata().and_then(|md| md.modified());\n<span class=\"macro\">assert!</span>(should_fail.is_err());\n<span class=\"macro\">assert_eq!</span>(should_fail.unwrap_err().kind(), ErrorKind::NotFound);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.or\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1350\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.or\" class=\"fn\">or</a><F>(self, res: <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F>) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F></h4></section></summary><div class=\"docblock\"><p>Returns <code>res</code> if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>, otherwise returns the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value of <code>self</code>.</p>\n<p>Arguments passed to <code>or</code> are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.or_else\" title=\"method core::result::Result::or_else\"><code>or_else</code></a>, which is\nlazily evaluated.</p>\n<h5 id=\"examples-27\"><a class=\"doc-anchor\" href=\"#examples-27\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"late error\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.or(y), <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"early error\"</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(x.or(y), <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"not a 2\"</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"late error\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.or(y), <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"late error\"</span>));\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">100</span>);\n<span class=\"macro\">assert_eq!</span>(x.or(y), <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>));</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.or_else\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1375\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.or_else\" class=\"fn\">or_else</a><F, O>(self, op: O) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F><div class=\"where\">where\n O: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(E) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F>,</div></h4></section></summary><div class=\"docblock\"><p>Calls <code>op</code> if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>, otherwise returns the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value of <code>self</code>.</p>\n<p>This function can be used for control flow based on result values.</p>\n<h5 id=\"examples-28\"><a class=\"doc-anchor\" href=\"#examples-28\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">fn </span>sq(x: u32) -> <span class=\"prelude-ty\">Result</span><u32, u32> { <span class=\"prelude-val\">Ok</span>(x * x) }\n<span class=\"kw\">fn </span>err(x: u32) -> <span class=\"prelude-ty\">Result</span><u32, u32> { <span class=\"prelude-val\">Err</span>(x) }\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>).or_else(sq).or_else(sq), <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>).or_else(err).or_else(sq), <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Err</span>(<span class=\"number\">3</span>).or_else(sq).or_else(err), <span class=\"prelude-val\">Ok</span>(<span class=\"number\">9</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Err</span>(<span class=\"number\">3</span>).or_else(err).or_else(err), <span class=\"prelude-val\">Err</span>(<span class=\"number\">3</span>));</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unwrap_or\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1402\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.unwrap_or\" class=\"fn\">unwrap_or</a>(self, default: T) -> T</h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value or a provided default.</p>\n<p>Arguments passed to <code>unwrap_or</code> are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#method.unwrap_or_else\" title=\"method core::result::Result::unwrap_or_else\"><code>unwrap_or_else</code></a>,\nwhich is lazily evaluated.</p>\n<h5 id=\"examples-29\"><a class=\"doc-anchor\" href=\"#examples-29\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>default = <span class=\"number\">2</span>;\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">9</span>);\n<span class=\"macro\">assert_eq!</span>(x.unwrap_or(default), <span class=\"number\">9</span>);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"error\"</span>);\n<span class=\"macro\">assert_eq!</span>(x.unwrap_or(default), default);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unwrap_or_else\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1423\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.unwrap_or_else\" class=\"fn\">unwrap_or_else</a><F>(self, op: F) -> T<div class=\"where\">where\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/function/trait.FnOnce.html\" title=\"trait core::ops::function::FnOnce\">FnOnce</a>(E) -> T,</div></h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value or computes it from a closure.</p>\n<h5 id=\"examples-30\"><a class=\"doc-anchor\" href=\"#examples-30\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">fn </span>count(x: <span class=\"kw-2\">&</span>str) -> usize { x.len() }\n\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>).unwrap_or_else(count), <span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Err</span>(<span class=\"string\">\"foo\"</span>).unwrap_or_else(count), <span class=\"number\">3</span>);</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unwrap_unchecked\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.58.0\">1.58.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1453\">source</a></span><h4 class=\"code-header\">pub unsafe fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.unwrap_unchecked\" class=\"fn\">unwrap_unchecked</a>(self) -> T</h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> value, consuming the <code>self</code> value,\nwithout checking that the value is not an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>.</p>\n<h5 id=\"safety\"><a class=\"doc-anchor\" href=\"#safety\">§</a>Safety</h5>\n<p>Calling this method on an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> is <em><a href=\"https://doc.rust-lang.org/reference/behavior-considered-undefined.html\">undefined behavior</a></em>.</p>\n<h5 id=\"examples-31\"><a class=\"doc-anchor\" href=\"#examples-31\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"macro\">assert_eq!</span>(<span class=\"kw\">unsafe </span>{ x.unwrap_unchecked() }, <span class=\"number\">2</span>);</code></pre></div>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"emergency failure\"</span>);\n<span class=\"kw\">unsafe </span>{ x.unwrap_unchecked(); } <span class=\"comment\">// Undefined behavior!</span></code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.unwrap_err_unchecked\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.58.0\">1.58.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1485\">source</a></span><h4 class=\"code-header\">pub unsafe fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.unwrap_err_unchecked\" class=\"fn\">unwrap_err_unchecked</a>(self) -> E</h4></section></summary><div class=\"docblock\"><p>Returns the contained <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> value, consuming the <code>self</code> value,\nwithout checking that the value is not an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a>.</p>\n<h5 id=\"safety-1\"><a class=\"doc-anchor\" href=\"#safety-1\">§</a>Safety</h5>\n<p>Calling this method on an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Ok</code></a> is <em><a href=\"https://doc.rust-lang.org/reference/behavior-considered-undefined.html\">undefined behavior</a></em>.</p>\n<h5 id=\"examples-32\"><a class=\"doc-anchor\" href=\"#examples-32\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">2</span>);\n<span class=\"kw\">unsafe </span>{ x.unwrap_err_unchecked() }; <span class=\"comment\">// Undefined behavior!</span></code></pre></div>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"emergency failure\"</span>);\n<span class=\"macro\">assert_eq!</span>(<span class=\"kw\">unsafe </span>{ x.unwrap_err_unchecked() }, <span class=\"string\">\"emergency failure\"</span>);</code></pre></div>\n</div></details></div></details>",0,"ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Result%3C%26T,+E%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1495\">source</a><a href=\"#impl-Result%3C%26T,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&T</a>, E></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.copied\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0\">1.59.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1510-1512\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.copied\" class=\"fn\">copied</a>(self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>,</div></h4></section></summary><div class=\"docblock\"><p>Maps a <code>Result<&T, E></code> to a <code>Result<T, E></code> by copying the contents of the\n<code>Ok</code> part.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>val = <span class=\"number\">12</span>;\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>i32, i32> = <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&</span>val);\n<span class=\"macro\">assert_eq!</span>(x, <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&</span><span class=\"number\">12</span>));\n<span class=\"kw\">let </span>copied = x.copied();\n<span class=\"macro\">assert_eq!</span>(copied, <span class=\"prelude-val\">Ok</span>(<span class=\"number\">12</span>));</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cloned\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0\">1.59.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1531-1533\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.cloned\" class=\"fn\">cloned</a>(self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>,</div></h4></section></summary><div class=\"docblock\"><p>Maps a <code>Result<&T, E></code> to a <code>Result<T, E></code> by cloning the contents of the\n<code>Ok</code> part.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>val = <span class=\"number\">12</span>;\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span>i32, i32> = <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&</span>val);\n<span class=\"macro\">assert_eq!</span>(x, <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&</span><span class=\"number\">12</span>));\n<span class=\"kw\">let </span>cloned = x.cloned();\n<span class=\"macro\">assert_eq!</span>(cloned, <span class=\"prelude-val\">Ok</span>(<span class=\"number\">12</span>));</code></pre></div>\n</div></details></div></details>",0,"ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Result%3C%26mut+T,+E%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1539\">source</a><a href=\"#impl-Result%3C%26mut+T,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&mut T</a>, E></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.copied\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0\">1.59.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1554-1556\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.copied\" class=\"fn\">copied</a>(self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>,</div></h4></section></summary><div class=\"docblock\"><p>Maps a <code>Result<&mut T, E></code> to a <code>Result<T, E></code> by copying the contents of the\n<code>Ok</code> part.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span><span class=\"kw-2\">mut </span>val = <span class=\"number\">12</span>;\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&mut </span>i32, i32> = <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&mut </span>val);\n<span class=\"macro\">assert_eq!</span>(x, <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&mut </span><span class=\"number\">12</span>));\n<span class=\"kw\">let </span>copied = x.copied();\n<span class=\"macro\">assert_eq!</span>(copied, <span class=\"prelude-val\">Ok</span>(<span class=\"number\">12</span>));</code></pre></div>\n</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.cloned\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.59.0\">1.59.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1575-1577\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.cloned\" class=\"fn\">cloned</a>(self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>,</div></h4></section></summary><div class=\"docblock\"><p>Maps a <code>Result<&mut T, E></code> to a <code>Result<T, E></code> by cloning the contents of the\n<code>Ok</code> part.</p>\n<h5 id=\"examples-1\"><a class=\"doc-anchor\" href=\"#examples-1\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span><span class=\"kw-2\">mut </span>val = <span class=\"number\">12</span>;\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&mut </span>i32, i32> = <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&mut </span>val);\n<span class=\"macro\">assert_eq!</span>(x, <span class=\"prelude-val\">Ok</span>(<span class=\"kw-2\">&mut </span><span class=\"number\">12</span>));\n<span class=\"kw\">let </span>cloned = x.cloned();\n<span class=\"macro\">assert_eq!</span>(cloned, <span class=\"prelude-val\">Ok</span>(<span class=\"number\">12</span>));</code></pre></div>\n</div></details></div></details>",0,"ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Result%3COption%3CT%3E,+E%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1583\">source</a><a href=\"#impl-Result%3COption%3CT%3E,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a><T>, E></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.transpose\" class=\"method\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.33.0, const unstable\">1.33.0 (const: <a href=\"https://github.com/rust-lang/rust/issues/82814\" title=\"Tracking issue for const_result\">unstable</a>)</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1602\">source</a></span><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.transpose\" class=\"fn\">transpose</a>(self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E>></h4></section></summary><div class=\"docblock\"><p>Transposes a <code>Result</code> of an <code>Option</code> into an <code>Option</code> of a <code>Result</code>.</p>\n<p><code>Ok(None)</code> will be mapped to <code>None</code>.\n<code>Ok(Some(_))</code> and <code>Err(_)</code> will be mapped to <code>Some(Ok(_))</code> and <code>Some(Err(_))</code>.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#[derive(Debug, Eq, PartialEq)]\n</span><span class=\"kw\">struct </span>SomeErr;\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"prelude-ty\">Option</span><i32>, SomeErr> = <span class=\"prelude-val\">Ok</span>(<span class=\"prelude-val\">Some</span>(<span class=\"number\">5</span>));\n<span class=\"kw\">let </span>y: <span class=\"prelude-ty\">Option</span><<span class=\"prelude-ty\">Result</span><i32, SomeErr>> = <span class=\"prelude-val\">Some</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"number\">5</span>));\n<span class=\"macro\">assert_eq!</span>(x.transpose(), y);</code></pre></div>\n</div></details></div></details>",0,"ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Result%3CResult%3CT,+E%3E,+E%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1611\">source</a><a href=\"#impl-Result%3CResult%3CT,+E%3E,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E>, E></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.flatten\" class=\"method\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1638\">source</a><h4 class=\"code-header\">pub fn <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#tymethod.flatten\" class=\"fn\">flatten</a>(self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E></h4></section><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>result_flattening</code>)</span></div></span></summary><div class=\"docblock\"><p>Converts from <code>Result<Result<T, E>, E></code> to <code>Result<T, E></code></p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(result_flattening)]\n</span><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span><span class=\"lifetime\">'static </span>str, u32>, u32> = <span class=\"prelude-val\">Ok</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"hello\"</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"hello\"</span>), x.flatten());\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span><span class=\"lifetime\">'static </span>str, u32>, u32> = <span class=\"prelude-val\">Ok</span>(<span class=\"prelude-val\">Err</span>(<span class=\"number\">6</span>));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Err</span>(<span class=\"number\">6</span>), x.flatten());\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span><span class=\"lifetime\">'static </span>str, u32>, u32> = <span class=\"prelude-val\">Err</span>(<span class=\"number\">6</span>);\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Err</span>(<span class=\"number\">6</span>), x.flatten());</code></pre></div>\n<p>Flattening only removes one level of nesting at a time:</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"attr\">#![feature(result_flattening)]\n</span><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><<span class=\"prelude-ty\">Result</span><<span class=\"prelude-ty\">Result</span><<span class=\"kw-2\">&</span><span class=\"lifetime\">'static </span>str, u32>, u32>, u32> = <span class=\"prelude-val\">Ok</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"hello\"</span>)));\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"hello\"</span>)), x.flatten());\n<span class=\"macro\">assert_eq!</span>(<span class=\"prelude-val\">Ok</span>(<span class=\"string\">\"hello\"</span>), x.flatten().flatten());</code></pre></div>\n</div></details></div></details>",0,"ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Termination-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.61.0\">1.61.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/std/process.rs.html#2359\">source</a></span><a href=\"#impl-Termination-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/process/trait.Termination.html\" title=\"trait std::process::Termination\">Termination</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/std/process/trait.Termination.html\" title=\"trait std::process::Termination\">Termination</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.report\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/std/process.rs.html#2360\">source</a><a href=\"#method.report\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/std/process/trait.Termination.html#tymethod.report\" class=\"fn\">report</a>(self) -> <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/std/process/struct.ExitCode.html\" title=\"struct std::process::ExitCode\">ExitCode</a></h4></section></summary><div class='docblock'>Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.</div></details></div></details>","Termination","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-PartialOrd-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a></span><a href=\"#impl-PartialOrd-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.partial_cmp\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a><a href=\"#method.partial_cmp\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp\" class=\"fn\">partial_cmp</a>(&self, other: &<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E>) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/option/enum.Option.html\" title=\"enum core::option::Option\">Option</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html\" title=\"enum core::cmp::Ordering\">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.lt\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1127\">source</a></span><a href=\"#method.lt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt\" class=\"fn\">lt</a>(&self, other: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&Rhs</a>) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.lt\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.le\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1144\">source</a></span><a href=\"#method.le\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le\" class=\"fn\">le</a>(&self, other: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&Rhs</a>) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>\noperator. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.le\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.gt\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1160\">source</a></span><a href=\"#method.gt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt\" class=\"fn\">gt</a>(&self, other: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&Rhs</a>) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.gt\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ge\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#1177\">source</a></span><a href=\"#method.ge\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge\" class=\"fn\">ge</a>(&self, other: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&Rhs</a>) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>\noperator. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html#method.ge\">Read more</a></div></details></div></details>","PartialOrd","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromIterator%3CResult%3CA,+E%3E%3E-for-Result%3CV,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1885\">source</a></span><a href=\"#impl-FromIterator%3CResult%3CA,+E%3E%3E-for-Result%3CV,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<A, E, V> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><A, E>> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><V, E><div class=\"where\">where\n V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a><A>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_iter\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1929\">source</a><a href=\"#method.from_iter\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter\" class=\"fn\">from_iter</a><I>(iter: I) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><V, E><div class=\"where\">where\n I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a><Item = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><A, E>>,</div></h4></section></summary><div class=\"docblock\"><p>Takes each element in the <code>Iterator</code>: if it is an <code>Err</code>, no further\nelements are taken, and the <code>Err</code> is returned. Should no <code>Err</code> occur, a\ncontainer with the values of each <code>Result</code> is returned.</p>\n<p>Here is an example which increments every integer in a vector,\nchecking for overflow:</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>v = <span class=\"macro\">vec!</span>[<span class=\"number\">1</span>, <span class=\"number\">2</span>];\n<span class=\"kw\">let </span>res: <span class=\"prelude-ty\">Result</span><Vec<u32>, <span class=\"kw-2\">&</span><span class=\"lifetime\">'static </span>str> = v.iter().map(|x: <span class=\"kw-2\">&</span>u32|\n x.checked_add(<span class=\"number\">1</span>).ok_or(<span class=\"string\">\"Overflow!\"</span>)\n).collect();\n<span class=\"macro\">assert_eq!</span>(res, <span class=\"prelude-val\">Ok</span>(<span class=\"macro\">vec!</span>[<span class=\"number\">2</span>, <span class=\"number\">3</span>]));</code></pre></div>\n<p>Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>v = <span class=\"macro\">vec!</span>[<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">0</span>];\n<span class=\"kw\">let </span>res: <span class=\"prelude-ty\">Result</span><Vec<u32>, <span class=\"kw-2\">&</span><span class=\"lifetime\">'static </span>str> = v.iter().map(|x: <span class=\"kw-2\">&</span>u32|\n x.checked_sub(<span class=\"number\">1</span>).ok_or(<span class=\"string\">\"Underflow!\"</span>)\n).collect();\n<span class=\"macro\">assert_eq!</span>(res, <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Underflow!\"</span>));</code></pre></div>\n<p>Here is a variation on the previous example, showing that no\nfurther elements are taken from <code>iter</code> after the first <code>Err</code>.</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>v = <span class=\"macro\">vec!</span>[<span class=\"number\">3</span>, <span class=\"number\">2</span>, <span class=\"number\">1</span>, <span class=\"number\">10</span>];\n<span class=\"kw\">let </span><span class=\"kw-2\">mut </span>shared = <span class=\"number\">0</span>;\n<span class=\"kw\">let </span>res: <span class=\"prelude-ty\">Result</span><Vec<u32>, <span class=\"kw-2\">&</span><span class=\"lifetime\">'static </span>str> = v.iter().map(|x: <span class=\"kw-2\">&</span>u32| {\n shared += x;\n x.checked_sub(<span class=\"number\">2</span>).ok_or(<span class=\"string\">\"Underflow!\"</span>)\n}).collect();\n<span class=\"macro\">assert_eq!</span>(res, <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Underflow!\"</span>));\n<span class=\"macro\">assert_eq!</span>(shared, <span class=\"number\">6</span>);</code></pre></div>\n<p>Since the third element caused an underflow, no further elements were taken,\nso the final value of <code>shared</code> is 6 (= <code>3 + 2 + 1</code>), not 16.</p>\n</div></details></div></details>","FromIterator<Result<A, E>>","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Hash-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a></span><a href=\"#impl-Hash-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html\" title=\"trait core::hash::Hash\">Hash</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.hash\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a><a href=\"#method.hash\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash\" class=\"fn\">hash</a><__H>(&self, state: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&mut __H</a>)<div class=\"where\">where\n __H: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html\" title=\"trait core::hash::Hasher\">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html\" title=\"trait core::hash::Hasher\"><code>Hasher</code></a>. <a href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#tymethod.hash\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.hash_slice\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.3.0\">1.3.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/hash/mod.rs.html#238-240\">source</a></span><a href=\"#method.hash_slice\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#method.hash_slice\" class=\"fn\">hash_slice</a><H>(data: &<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.slice.html\">[Self]</a>, state: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&mut H</a>)<div class=\"where\">where\n H: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html\" title=\"trait core::hash::Hasher\">Hasher</a>,\n Self: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hasher.html\" title=\"trait core::hash::Hasher\"><code>Hasher</code></a>. <a href=\"https://doc.rust-lang.org/1.77.0/core/hash/trait.Hash.html#method.hash_slice\">Read more</a></div></details></div></details>","Hash","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Clone-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1669-1672\">source</a></span><a href=\"#impl-Clone-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.clone\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1675\">source</a><a href=\"#method.clone\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone\" class=\"fn\">clone</a>(&self) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#tymethod.clone\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.clone_from\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1683\">source</a><a href=\"#method.clone_from\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from\" class=\"fn\">clone_from</a>(&mut self, source: &<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href=\"https://doc.rust-lang.org/1.77.0/core/clone/trait.Clone.html#method.clone_from\">Read more</a></div></details></div></details>","Clone","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Residual%3CT%3E-for-Result%3CInfallible,+E%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1973\">source</a><a href=\"#impl-Residual%3CT%3E-for-Result%3CInfallible,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Residual.html\" title=\"trait core::ops::try_trait::Residual\">Residual</a><T> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html\" title=\"enum core::convert::Infallible\">Infallible</a>, E></h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.TryType\" class=\"associatedtype trait-impl\"><a href=\"#associatedtype.TryType\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Residual.html#associatedtype.TryType\" class=\"associatedtype\">TryType</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E></h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>try_trait_v2_residual</code>)</span></div></span><div class='docblock'>The “return” type of this meta-function.</div></details></div></details>","Residual<T>","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-IntoIterator-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1693\">source</a></span><a href=\"#impl-IntoIterator-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html\" title=\"trait core::iter::traits::collect::IntoIterator\">IntoIterator</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.into_iter\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1713\">source</a><a href=\"#method.into_iter\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter\" class=\"fn\">into_iter</a>(self) -> <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/result/struct.IntoIter.html\" title=\"struct core::result::IntoIter\">IntoIter</a><T></h4></section></summary><div class=\"docblock\"><p>Returns a consuming iterator over the possibly contained value.</p>\n<p>The iterator yields one value if the result is <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Ok\" title=\"variant core::result::Result::Ok\"><code>Result::Ok</code></a>, otherwise none.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Ok</span>(<span class=\"number\">5</span>);\n<span class=\"kw\">let </span>v: Vec<u32> = x.into_iter().collect();\n<span class=\"macro\">assert_eq!</span>(v, [<span class=\"number\">5</span>]);\n\n<span class=\"kw\">let </span>x: <span class=\"prelude-ty\">Result</span><u32, <span class=\"kw-2\">&</span>str> = <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"nothing!\"</span>);\n<span class=\"kw\">let </span>v: Vec<u32> = x.into_iter().collect();\n<span class=\"macro\">assert_eq!</span>(v, []);</code></pre></div>\n</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Item\" class=\"associatedtype trait-impl\"><a href=\"#associatedtype.Item\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = T</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.IntoIter\" class=\"associatedtype trait-impl\"><a href=\"#associatedtype.IntoIter\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter\" class=\"associatedtype\">IntoIter</a> = <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/result/struct.IntoIter.html\" title=\"struct core::result::IntoIter\">IntoIter</a><T></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details></div></details>","IntoIterator","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<section id=\"impl-StructuralPartialEq-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a></span><a href=\"#impl-StructuralPartialEq-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.StructuralPartialEq.html\" title=\"trait core::marker::StructuralPartialEq\">StructuralPartialEq</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E></h3></section>","StructuralPartialEq","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Debug-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a></span><a href=\"#impl-Debug-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html\" title=\"trait core::fmt::Debug\">Debug</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.fmt\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a><a href=\"#method.fmt\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt\" class=\"fn\">fmt</a>(&self, f: &mut <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/struct.Formatter.html\" title=\"struct core::fmt::Formatter\">Formatter</a><'_>) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.unit.html\">()</a>, <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/fmt/struct.Error.html\" title=\"struct core::fmt::Error\">Error</a>></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href=\"https://doc.rust-lang.org/1.77.0/core/fmt/trait.Debug.html#tymethod.fmt\">Read more</a></div></details></div></details>","Debug","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<section id=\"impl-Eq-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a></span><a href=\"#impl-Eq-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Eq.html\" title=\"trait core::cmp::Eq\">Eq</a>,</div></h3></section>","Eq","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Sum%3CResult%3CU,+E%3E%3E-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.16.0\">1.16.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/iter/traits/accum.rs.html#153-155\">source</a></span><a href=\"#impl-Sum%3CResult%3CU,+E%3E%3E-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, U, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/accum/trait.Sum.html\" title=\"trait core::iter::traits::accum::Sum\">Sum</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E>> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/accum/trait.Sum.html\" title=\"trait core::iter::traits::accum::Sum\">Sum</a><U>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.sum\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/iter/traits/accum.rs.html#175-177\">source</a><a href=\"#method.sum\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/accum/trait.Sum.html#tymethod.sum\" class=\"fn\">sum</a><I>(iter: I) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a><Item = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E>>,</div></h4></section></summary><div class=\"docblock\"><p>Takes each element in the <a href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"><code>Iterator</code></a>: if it is an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>, no further\nelements are taken, and the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> is returned. Should no <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>\noccur, the sum of all elements is returned.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<p>This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>f = |<span class=\"kw-2\">&</span>x: <span class=\"kw-2\">&</span>i32| <span class=\"kw\">if </span>x < <span class=\"number\">0 </span>{ <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Negative element found\"</span>) } <span class=\"kw\">else </span>{ <span class=\"prelude-val\">Ok</span>(x) };\n<span class=\"kw\">let </span>v = <span class=\"macro\">vec!</span>[<span class=\"number\">1</span>, <span class=\"number\">2</span>];\n<span class=\"kw\">let </span>res: <span class=\"prelude-ty\">Result</span><i32, <span class=\"kw\">_</span>> = v.iter().map(f).sum();\n<span class=\"macro\">assert_eq!</span>(res, <span class=\"prelude-val\">Ok</span>(<span class=\"number\">3</span>));\n<span class=\"kw\">let </span>v = <span class=\"macro\">vec!</span>[<span class=\"number\">1</span>, -<span class=\"number\">2</span>];\n<span class=\"kw\">let </span>res: <span class=\"prelude-ty\">Result</span><i32, <span class=\"kw\">_</span>> = v.iter().map(f).sum();\n<span class=\"macro\">assert_eq!</span>(res, <span class=\"prelude-val\">Err</span>(<span class=\"string\">\"Negative element found\"</span>));</code></pre></div>\n</div></details></div></details>","Sum<Result<U, E>>","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Ord-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a></span><a href=\"#impl-Ord-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.cmp\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a><a href=\"#method.cmp\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp\" class=\"fn\">cmp</a>(&self, other: &<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E>) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html\" title=\"enum core::cmp::Ordering\">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/enum.Ordering.html\" title=\"enum core::cmp::Ordering\"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#tymethod.cmp\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.max\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.21.0\">1.21.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#830-832\">source</a></span><a href=\"#method.max\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max\" class=\"fn\">max</a>(self, other: Self) -> Self<div class=\"where\">where\n Self: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.max\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.min\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.21.0\">1.21.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#850-852\">source</a></span><a href=\"#method.min\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min\" class=\"fn\">min</a>(self, other: Self) -> Self<div class=\"where\">where\n Self: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.min\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.clamp\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.50.0\">1.50.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#875-878\">source</a></span><a href=\"#method.clamp\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp\" class=\"fn\">clamp</a>(self, min: Self, max: Self) -> Self<div class=\"where\">where\n Self: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialOrd.html\" title=\"trait core::cmp::PartialOrd\">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.Ord.html#method.clamp\">Read more</a></div></details></div></details>","Ord","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<section id=\"impl-Copy-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a></span><a href=\"#impl-Copy-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>,</div></h3></section>","Copy","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-PartialEq-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a></span><a href=\"#impl-PartialEq-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>,\n E: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.eq\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#498\">source</a><a href=\"#method.eq\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#tymethod.eq\" class=\"fn\">eq</a>(&self, other: &<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E>) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used\nby <code>==</code>.</div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.ne\" class=\"method trait-impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.0.0\">1.0.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/cmp.rs.html#242\">source</a></span><a href=\"#method.ne\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/cmp/trait.PartialEq.html#method.ne\" class=\"fn\">ne</a>(&self, other: <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.reference.html\">&Rhs</a>) -> <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.77.0/std/primitive.bool.html\">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.</div></details></div></details>","PartialEq","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromResidual%3CResult%3CInfallible,+E%3E%3E-for-Result%3CT,+F%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1954\">source</a><a href=\"#impl-FromResidual%3CResult%3CInfallible,+E%3E%3E-for-Result%3CT,+F%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E, F> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.FromResidual.html\" title=\"trait core::ops::try_trait::FromResidual\">FromResidual</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html\" title=\"enum core::convert::Infallible\">Infallible</a>, E>> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F><div class=\"where\">where\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><E>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_residual\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1957\">source</a><a href=\"#method.from_residual\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.FromResidual.html#tymethod.from_residual\" class=\"fn\">from_residual</a>(residual: <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html\" title=\"enum core::convert::Infallible\">Infallible</a>, E>) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F></h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>try_trait_v2</code>)</span></div></span><div class='docblock'>Constructs the type from a compatible <code>Residual</code> type. <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.FromResidual.html#tymethod.from_residual\">Read more</a></div></details></div></details>","FromResidual<Result<Infallible, E>>","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-FromResidual%3CYeet%3CE%3E%3E-for-Result%3CT,+F%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1965\">source</a><a href=\"#impl-FromResidual%3CYeet%3CE%3E%3E-for-Result%3CT,+F%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E, F> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.FromResidual.html\" title=\"trait core::ops::try_trait::FromResidual\">FromResidual</a><<a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/struct.Yeet.html\" title=\"struct core::ops::try_trait::Yeet\">Yeet</a><E>> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F><div class=\"where\">where\n F: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/trait.From.html\" title=\"trait core::convert::From\">From</a><E>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_residual\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1967\">source</a><a href=\"#method.from_residual\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.FromResidual.html#tymethod.from_residual\" class=\"fn\">from_residual</a>(_: <a class=\"struct\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/struct.Yeet.html\" title=\"struct core::ops::try_trait::Yeet\">Yeet</a><E>) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, F></h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>try_trait_v2</code>)</span></div></span><div class='docblock'>Constructs the type from a compatible <code>Residual</code> type. <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.FromResidual.html#tymethod.from_residual\">Read more</a></div></details></div></details>","FromResidual<Yeet<E>>","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Product%3CResult%3CU,+E%3E%3E-for-Result%3CT,+E%3E\" class=\"impl\"><span class=\"rightside\"><span class=\"since\" title=\"Stable since Rust version 1.16.0\">1.16.0</span> · <a class=\"src\" href=\"https://doc.rust-lang.org/1.77.0/src/core/iter/traits/accum.rs.html#184-186\">source</a></span><a href=\"#impl-Product%3CResult%3CU,+E%3E%3E-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, U, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/accum/trait.Product.html\" title=\"trait core::iter::traits::accum::Product\">Product</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E>> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/accum/trait.Product.html\" title=\"trait core::iter::traits::accum::Product\">Product</a><U>,</div></h3></section></summary><div class=\"impl-items\"><details class=\"toggle method-toggle\" open><summary><section id=\"method.product\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/iter/traits/accum.rs.html#205-207\">source</a><a href=\"#method.product\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/accum/trait.Product.html#tymethod.product\" class=\"fn\">product</a><I>(iter: I) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E><div class=\"where\">where\n I: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a><Item = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><U, E>>,</div></h4></section></summary><div class=\"docblock\"><p>Takes each element in the <a href=\"https://doc.rust-lang.org/1.77.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"><code>Iterator</code></a>: if it is an <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>, no further\nelements are taken, and the <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a> is returned. Should no <a href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html#variant.Err\" title=\"variant core::result::Result::Err\"><code>Err</code></a>\noccur, the product of all elements is returned.</p>\n<h5 id=\"examples\"><a class=\"doc-anchor\" href=\"#examples\">§</a>Examples</h5>\n<p>This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns <code>Err</code>:</p>\n\n<div class=\"example-wrap\"><pre class=\"rust rust-example-rendered\"><code><span class=\"kw\">let </span>nums = <span class=\"macro\">vec!</span>[<span class=\"string\">\"5\"</span>, <span class=\"string\">\"10\"</span>, <span class=\"string\">\"1\"</span>, <span class=\"string\">\"2\"</span>];\n<span class=\"kw\">let </span>total: <span class=\"prelude-ty\">Result</span><usize, <span class=\"kw\">_</span>> = nums.iter().map(|w| w.parse::<usize>()).product();\n<span class=\"macro\">assert_eq!</span>(total, <span class=\"prelude-val\">Ok</span>(<span class=\"number\">100</span>));\n<span class=\"kw\">let </span>nums = <span class=\"macro\">vec!</span>[<span class=\"string\">\"5\"</span>, <span class=\"string\">\"10\"</span>, <span class=\"string\">\"one\"</span>, <span class=\"string\">\"2\"</span>];\n<span class=\"kw\">let </span>total: <span class=\"prelude-ty\">Result</span><usize, <span class=\"kw\">_</span>> = nums.iter().map(|w| w.parse::<usize>()).product();\n<span class=\"macro\">assert!</span>(total.is_err());</code></pre></div>\n</div></details></div></details>","Product<Result<U, E>>","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"],["<details class=\"toggle implementors-toggle\" open><summary><section id=\"impl-Try-for-Result%3CT,+E%3E\" class=\"impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1935\">source</a><a href=\"#impl-Try-for-Result%3CT,+E%3E\" class=\"anchor\">§</a><h3 class=\"code-header\">impl<T, E> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html\" title=\"trait core::ops::try_trait::Try\">Try</a> for <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E></h3></section></summary><div class=\"impl-items\"><details class=\"toggle\" open><summary><section id=\"associatedtype.Output\" class=\"associatedtype trait-impl\"><a href=\"#associatedtype.Output\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#associatedtype.Output\" class=\"associatedtype\">Output</a> = T</h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>try_trait_v2</code>)</span></div></span><div class='docblock'>The type of the value produced by <code>?</code> when <em>not</em> short-circuiting.</div></details><details class=\"toggle\" open><summary><section id=\"associatedtype.Residual\" class=\"associatedtype trait-impl\"><a href=\"#associatedtype.Residual\" class=\"anchor\">§</a><h4 class=\"code-header\">type <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#associatedtype.Residual\" class=\"associatedtype\">Residual</a> = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/convert/enum.Infallible.html\" title=\"enum core::convert::Infallible\">Infallible</a>, E></h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>try_trait_v2</code>)</span></div></span><div class='docblock'>The type of the value passed to <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.FromResidual.html#tymethod.from_residual\" title=\"associated function core::ops::try_trait::FromResidual::from_residual\"><code>FromResidual::from_residual</code></a>\nas part of <code>?</code> when short-circuiting. <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#associatedtype.Residual\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.from_output\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1940\">source</a><a href=\"#method.from_output\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#tymethod.from_output\" class=\"fn\">from_output</a>(output: <<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E> as <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html\" title=\"trait core::ops::try_trait::Try\">Try</a>>::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#associatedtype.Output\" title=\"type core::ops::try_trait::Try::Output\">Output</a>) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E></h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>try_trait_v2</code>)</span></div></span><div class='docblock'>Constructs the type from its <code>Output</code> type. <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#tymethod.from_output\">Read more</a></div></details><details class=\"toggle method-toggle\" open><summary><section id=\"method.branch\" class=\"method trait-impl\"><a class=\"src rightside\" href=\"https://doc.rust-lang.org/1.77.0/src/core/result.rs.html#1945\">source</a><a href=\"#method.branch\" class=\"anchor\">§</a><h4 class=\"code-header\">fn <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#tymethod.branch\" class=\"fn\">branch</a>(\n self\n) -> <a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/control_flow/enum.ControlFlow.html\" title=\"enum core::ops::control_flow::ControlFlow\">ControlFlow</a><<<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E> as <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html\" title=\"trait core::ops::try_trait::Try\">Try</a>>::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#associatedtype.Residual\" title=\"type core::ops::try_trait::Try::Residual\">Residual</a>, <<a class=\"enum\" href=\"https://doc.rust-lang.org/1.77.0/core/result/enum.Result.html\" title=\"enum core::result::Result\">Result</a><T, E> as <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html\" title=\"trait core::ops::try_trait::Try\">Try</a>>::<a class=\"associatedtype\" href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#associatedtype.Output\" title=\"type core::ops::try_trait::Try::Output\">Output</a>></h4></section></summary><span class=\"item-info\"><div class=\"stab unstable\"><span class=\"emoji\">🔬</span><span>This is a nightly-only experimental API. (<code>try_trait_v2</code>)</span></div></span><div class='docblock'>Used in <code>?</code> to decide whether the operator should produce a value\n(because this returned <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/control_flow/enum.ControlFlow.html#variant.Continue\" title=\"variant core::ops::control_flow::ControlFlow::Continue\"><code>ControlFlow::Continue</code></a>)\nor propagate a value back to the caller\n(because this returned <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/control_flow/enum.ControlFlow.html#variant.Break\" title=\"variant core::ops::control_flow::ControlFlow::Break\"><code>ControlFlow::Break</code></a>). <a href=\"https://doc.rust-lang.org/1.77.0/core/ops/try_trait/trait.Try.html#tymethod.branch\">Read more</a></div></details></div></details>","Try","ba2::fo4::Result","ba2::tes3::Result","ba2::tes4::Result"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file