added cargo doc
This commit is contained in:
parent
1fc53d2ffb
commit
1273065096
61 changed files with 2747 additions and 22 deletions
0
doc/.lock
Normal file
0
doc/.lock
Normal file
1
doc/crates.js
Normal file
1
doc/crates.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.ALL_CRATES = ["sk_extract"];
|
||||
1
doc/help.html
Normal file
1
doc/help.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!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>Rustdoc 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="./static.files/storage-62ce34ea385b278a.js"></script><script defer src="./static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="./static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="./static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="./static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="./sk_extract/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="./sk_extract/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="./help.html">?</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>
|
||||
5
doc/search-index.js
Normal file
5
doc/search-index.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
var searchIndex = JSON.parse('{\
|
||||
"sk_extract":{"doc":"","t":"AFFFFFFFFFF","n":["extractors","extract_7z","extract_bz2","extract_gz","extract_lzma","extract_rar","extract_tar","extract_tbz2","extract_tgz","extract_txz","extract_zip"],"q":[[0,"sk_extract"],[1,"sk_extract::extractors"]],"d":["","Extracts files from a 7Z archive.","Extracts files from a BZ2 (bzip2) compressed archive.","Extracts files from a GZ (gzip) compressed archive.","Extracts files from an LZMA compressed archive.","Extracts files from a RAR archive.","Extracts files from a TAR archive.","Extracts files from a TBZ2 (tar.bz2) compressed archive.","Extracts files from a TGZ (tar.gz) compressed archive.","Extracts files from a TXZ (tar.xz) compressed archive.","Extracts files from a ZIP archive."],"i":[0,0,0,0,0,0,0,0,0,0,0],"f":[0,[[1,1],[[3,[2]]]],[[1,1],[[3,[2]]]],[[1,1],[[3,[2]]]],[[1,1],[[3,[2]]]],[[1,1],[[3,[[5,[4]]]]]],[[1,1],[[3,[2]]]],[[1,1],[[3,[2]]]],[[1,1],[[3,[2]]]],[[1,1],[[3,[2]]]],[[1,1],[[3,[2]]]]],"c":[],"p":[[3,"Path"],[3,"Error"],[4,"Result"],[8,"Error"],[3,"Box"]]}\
|
||||
}');
|
||||
if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)};
|
||||
if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};
|
||||
1
doc/settings.html
Normal file
1
doc/settings.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!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>Rustdoc 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="./static.files/storage-62ce34ea385b278a.js"></script><script defer src="./static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="./static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="./static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="./static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="./sk_extract/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="./sk_extract/index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="./help.html">?</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><link rel="stylesheet" href="./static.files/settings-8c76f75bfb6bd192.css"><script defer src="./static.files/settings-de11bff964e9d4e5.js"></script><link rel="preload" href="./static.files/light-0f8c037637f9eb3e.css" as="style"><link rel="preload" href="./static.files/dark-1097f8e92a01e3cf.css" as="style"><link rel="preload" href="./static.files/ayu-614652228113ac93.css" as="style"></section></div></main></body></html>
|
||||
1
doc/sk_extract/all.html
Normal file
1
doc/sk_extract/all.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../static.files/storage-62ce34ea385b278a.js"></script><script defer src="../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../sk_extract/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../sk_extract/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate sk_extract</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../help.html">?</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="functions">Functions</h3><ul class="all-items"><li><a href="extractors/fn.extract_7z.html">extractors::extract_7z</a></li><li><a href="extractors/fn.extract_bz2.html">extractors::extract_bz2</a></li><li><a href="extractors/fn.extract_gz.html">extractors::extract_gz</a></li><li><a href="extractors/fn.extract_lzma.html">extractors::extract_lzma</a></li><li><a href="extractors/fn.extract_rar.html">extractors::extract_rar</a></li><li><a href="extractors/fn.extract_tar.html">extractors::extract_tar</a></li><li><a href="extractors/fn.extract_tbz2.html">extractors::extract_tbz2</a></li><li><a href="extractors/fn.extract_tgz.html">extractors::extract_tgz</a></li><li><a href="extractors/fn.extract_txz.html">extractors::extract_txz</a></li><li><a href="extractors/fn.extract_zip.html">extractors::extract_zip</a></li></ul></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_7z.html
Normal file
16
doc/sk_extract/extractors/fn.extract_7z.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a 7Z archive."><title>extract_7z in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_7z</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="srclink" href="../../src/sk_extract/extractors.rs.html#251-254">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_7z(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a 7Z archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the 7Z file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_7z(Path::new(<span class="string">"src/test_data/test.7z"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_bz2.html
Normal file
16
doc/sk_extract/extractors/fn.extract_bz2.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a BZ2 (bzip2) compressed archive."><title>extract_bz2 in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_bz2</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="srclink" href="../../src/sk_extract/extractors.rs.html#214-231">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_bz2(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a BZ2 (bzip2) compressed archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the BZ2 compressed file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_bz2(Path::new(<span class="string">"src/test_data/test.bz2"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_gz.html
Normal file
16
doc/sk_extract/extractors/fn.extract_gz.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a GZ (gzip) compressed archive."><title>extract_gz in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_gz</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="srclink" href="../../src/sk_extract/extractors.rs.html#185-194">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_gz(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a GZ (gzip) compressed archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the GZ compressed file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_gz(Path::new(<span class="string">"src/test_data/test.gz"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_lzma.html
Normal file
16
doc/sk_extract/extractors/fn.extract_lzma.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from an LZMA compressed archive."><title>extract_lzma in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_lzma</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="srclink" href="../../src/sk_extract/extractors.rs.html#157-165">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_lzma(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from an LZMA compressed archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the LZMA compressed file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_lzma(Path::new(<span class="string">"src/test_data/test.lzma"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_rar.html
Normal file
16
doc/sk_extract/extractors/fn.extract_rar.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a RAR archive."><title>extract_rar in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_rar</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="srclink" href="../../src/sk_extract/extractors.rs.html#84-97">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_rar(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.71.1/core/error/trait.Error.html" title="trait core::error::Error">Error</a>>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a RAR archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the RAR file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_rar(Path::new(<span class="string">"src/test_data/test.rar"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_tar.html
Normal file
16
doc/sk_extract/extractors/fn.extract_tar.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a TAR archive."><title>extract_tar in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_tar</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="srclink" href="../../src/sk_extract/extractors.rs.html#117-137">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_tar(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a TAR archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the TAR file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_tar(Path::new(<span class="string">"src/test_data/test.tar"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_tbz2.html
Normal file
16
doc/sk_extract/extractors/fn.extract_tbz2.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a TBZ2 (tar.bz2) compressed archive."><title>extract_tbz2 in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_tbz2</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="srclink" href="../../src/sk_extract/extractors.rs.html#274-292">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_tbz2(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a TBZ2 (tar.bz2) compressed archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the TBZ2 compressed file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_tbz2(Path::new(<span class="string">"src/test_data/test.tbz2"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_tgz.html
Normal file
16
doc/sk_extract/extractors/fn.extract_tgz.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a TGZ (tar.gz) compressed archive."><title>extract_tgz in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_tgz</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="srclink" href="../../src/sk_extract/extractors.rs.html#313-330">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_tgz(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a TGZ (tar.gz) compressed archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the TGZ compressed file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_tgz(Path::new(<span class="string">"src/test_data/test.tgz"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_txz.html
Normal file
16
doc/sk_extract/extractors/fn.extract_txz.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a TXZ (tar.xz) compressed archive."><title>extract_txz in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_txz</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="srclink" href="../../src/sk_extract/extractors.rs.html#350-368">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_txz(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a TXZ (tar.xz) compressed archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the TXZ compressed file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_txz(Path::new(<span class="string">"src/test_data/test.txz"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
16
doc/sk_extract/extractors/fn.extract_zip.html
Normal file
16
doc/sk_extract/extractors/fn.extract_zip.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!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="Extracts files from a ZIP archive."><title>extract_zip in sk_extract::extractors - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In sk_extract::extractors</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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">sk_extract</a>::<wbr><a href="index.html">extractors</a>::<wbr><a class="fn" href="#">extract_zip</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="srclink" href="../../src/sk_extract/extractors.rs.html#25-64">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn extract_zip(
|
||||
input_path: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
|
||||
output_directory: &<a class="struct" href="https://doc.rust-lang.org/1.71.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.71.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.71.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.71.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extracts files from a ZIP archive.</p>
|
||||
<h2 id="arguments"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li><code>input_path</code> - The path to the ZIP file to extract.</li>
|
||||
<li><code>output_directory</code> - The destination directory for extracted files.</li>
|
||||
</ul>
|
||||
<h2 id="returns"><a href="#returns">Returns</a></h2>
|
||||
<p>Returns <code>Ok(())</code> on success, or an <code>Error</code> if extraction fails.</p>
|
||||
<h2 id="examples"><a href="#examples">Examples</a></h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">let </span>result = extract_zip(Path::new(<span class="string">"src/test_data/test.zip"</span>), Path::new(<span class="string">"output_directory"</span>));
|
||||
<span class="macro">assert!</span>(result.is_ok());</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
1
doc/sk_extract/extractors/index.html
Normal file
1
doc/sk_extract/extractors/index.html
Normal file
File diff suppressed because one or more lines are too long
1
doc/sk_extract/extractors/sidebar-items.js
Normal file
1
doc/sk_extract/extractors/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["extract_7z","extract_bz2","extract_gz","extract_lzma","extract_rar","extract_tar","extract_tbz2","extract_tgz","extract_txz","extract_zip"]};
|
||||
1
doc/sk_extract/index.html
Normal file
1
doc/sk_extract/index.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<!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 `sk_extract` crate."><title>sk_extract - 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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../static.files/storage-62ce34ea385b278a.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.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">☰</button><a class="logo-container" href="../sk_extract/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../sk_extract/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate sk_extract</a></h2><div class="sidebar-elems"><ul class="block"><li class="version">Version 0.9.0</li><li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#modules">Modules</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../help.html">?</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="#">sk_extract</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="srclink" href="../src/sk_extract/lib.rs.html#2-423">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="extractors/index.html" title="mod sk_extract::extractors">extractors</a></div></li></ul></section></div></main></body></html>
|
||||
1
doc/sk_extract/sidebar-items.js
Normal file
1
doc/sk_extract/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"mod":["extractors"]};
|
||||
4
doc/source-files.js
Normal file
4
doc/source-files.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var sourcesIndex = JSON.parse('{\
|
||||
"sk_extract":["",[],["extractors.rs","lib.rs"]]\
|
||||
}');
|
||||
createSourceSidebar();
|
||||
737
doc/src/sk_extract/extractors.rs.html
Normal file
737
doc/src/sk_extract/extractors.rs.html
Normal file
|
|
@ -0,0 +1,737 @@
|
|||
<!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/extractors.rs`."><title>extractors.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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="../../static.files/source-script-11255107d0a65077.js"></script><script defer src="../../source-files.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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 source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><nav class="sub"><a class="sub-logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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>
|
||||
</pre></div><pre class="rust"><code><span class="kw">use </span>std::{fs::{<span class="self">self</span>, File}, error::Error, io::{<span class="self">self</span>, ErrorKind, Write, Read}, path::Path,};
|
||||
<span class="kw">use </span>lzma::reader::LzmaReader;
|
||||
<span class="kw">use </span>flate2::read::GzDecoder;
|
||||
<span class="kw">use </span>bzip2::read::BzDecoder;
|
||||
<span class="kw">use </span>unrar::Archive;
|
||||
|
||||
<span class="doccomment">/// Extracts files from a ZIP archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the ZIP file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_zip(Path::new("src/test_data/test.zip"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_zip(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
<span class="kw">let </span>file = fs::File::open(input_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>archive = zip::ZipArchive::new(file)<span class="question-mark">?</span>;
|
||||
<span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..archive.len() {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>file = archive.by_index(i)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>outpath = <span class="kw">match </span>file.enclosed_name() {
|
||||
<span class="prelude-val">Some</span>(path) => path.to_owned(),
|
||||
<span class="prelude-val">None </span>=> <span class="kw">continue</span>,
|
||||
};
|
||||
<span class="kw">let </span>full_outpath = output_directory.join(<span class="kw-2">&</span>outpath);
|
||||
{
|
||||
<span class="kw">let </span>comment = file.comment();
|
||||
<span class="kw">if </span>!comment.is_empty() {
|
||||
<span class="macro">println!</span>(<span class="string">"File {} comment: {}"</span>, i, comment);
|
||||
}
|
||||
}
|
||||
<span class="kw">if </span>(<span class="kw-2">*</span>file.name()).ends_with(<span class="string">'/'</span>) {
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_outpath).unwrap();
|
||||
} <span class="kw">else </span>{
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(p) = full_outpath.parent() {
|
||||
<span class="kw">if </span>!p.exists() {
|
||||
fs::create_dir_all(p).unwrap();
|
||||
}
|
||||
}
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>outfile = fs::File::create(<span class="kw-2">&</span>full_outpath).unwrap();
|
||||
io::copy(<span class="kw-2">&mut </span>file, <span class="kw-2">&mut </span>outfile).unwrap();
|
||||
}
|
||||
<span class="comment">// Get and Set permissions
|
||||
</span><span class="attr">#[cfg(unix)]
|
||||
</span>{
|
||||
<span class="kw">use </span>std::os::unix::fs::PermissionsExt;
|
||||
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(mode) = file.unix_mode() {
|
||||
fs::set_permissions(<span class="kw-2">&</span>full_outpath, fs::Permissions::from_mode(mode)).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Extracts files from a RAR archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the RAR file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_rar(Path::new("src/test_data/test.rar"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_rar(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), Box<<span class="kw">dyn </span>Error>> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>archive = Archive::new(input_path)
|
||||
.open_for_processing()
|
||||
.unwrap();
|
||||
<span class="kw">while let </span><span class="prelude-val">Some</span>(header) = archive.read_header()<span class="question-mark">? </span>{
|
||||
<span class="kw">let </span>output_path = output_directory.join(<span class="kw-2">&</span>header.entry().filename);
|
||||
archive = <span class="kw">if </span>header.entry().is_file() {
|
||||
header.extract_to(<span class="kw-2">&</span>output_path)<span class="question-mark">?
|
||||
</span>} <span class="kw">else </span>{
|
||||
header.skip()<span class="question-mark">?
|
||||
</span>};
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Extracts files from a TAR archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the TAR file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_tar(Path::new("src/test_data/test.tar"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_tar(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
<span class="kw">let </span>tar_file = fs::File::open(input_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>a = tar::Archive::new(tar_file);
|
||||
|
||||
<span class="kw">for </span>i <span class="kw">in </span>a.entries()<span class="question-mark">? </span>{
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>i = i<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>entry_path = i.header().path()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>full_path = output_directory.join(entry_path);
|
||||
|
||||
<span class="kw">if </span>i.header().entry_type().is_dir() {
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_path)<span class="question-mark">?</span>;
|
||||
} <span class="kw">else </span>{
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_path.parent().unwrap())<span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>file = fs::File::create(<span class="kw-2">&</span>full_path)<span class="question-mark">?</span>;
|
||||
io::copy(<span class="kw-2">&mut </span>i, <span class="kw-2">&mut </span>file)<span class="question-mark">?</span>;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Extracts files from an LZMA compressed archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the LZMA compressed file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_lzma(Path::new("src/test_data/test.lzma"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_lzma(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
<span class="kw">let </span>input_file = File::open(input_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>decompressor = LzmaReader::new_decompressor(input_file)
|
||||
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>output_file_path = output_directory.join(input_path.file_stem().unwrap());
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>output_file = File::create(<span class="kw-2">&</span>output_file_path)<span class="question-mark">?</span>;
|
||||
io::copy(<span class="kw-2">&mut </span>decompressor, <span class="kw-2">&mut </span>output_file)<span class="question-mark">?</span>;
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Extracts files from a GZ (gzip) compressed archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the GZ compressed file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_gz(Path::new("src/test_data/test.gz"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_gz(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
<span class="kw">let </span>input_file = File::open(input_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>decompressor = GzDecoder::new(input_file);
|
||||
<span class="kw">let </span>output_file_path = output_directory.join(input_path.file_stem().unwrap());
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>output_file = File::create(<span class="kw-2">&</span>output_file_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">match </span>io::copy(<span class="kw-2">&mut </span>decompressor, <span class="kw-2">&mut </span>output_file) {
|
||||
<span class="prelude-val">Ok</span>(<span class="kw">_</span>) => <span class="prelude-val">Ok</span>(()),
|
||||
<span class="prelude-val">Err</span>(err) => <span class="prelude-val">Err</span>(io::Error::new(ErrorKind::Other, err.to_string())),
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Extracts files from a BZ2 (bzip2) compressed archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the BZ2 compressed file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_bz2(Path::new("src/test_data/test.bz2"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_bz2(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
<span class="kw">let </span>input_file = File::open(input_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>bz2_reader = BzDecoder::new(input_file);
|
||||
<span class="kw">let </span>output_file_path = output_directory.join(input_path.file_stem().unwrap());
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>output_file = File::create(<span class="kw-2">&</span>output_file_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buffer = Vec::new();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>decompressor = io::BufReader::new(bz2_reader);
|
||||
<span class="kw">loop </span>{
|
||||
<span class="kw">let </span>bytes_read = decompressor.read_to_end(<span class="kw-2">&mut </span>buffer)<span class="question-mark">?</span>;
|
||||
<span class="kw">if </span>bytes_read == <span class="number">0 </span>{
|
||||
<span class="kw">break</span>; <span class="comment">// End of file
|
||||
</span>}
|
||||
output_file.write_all(<span class="kw-2">&</span>buffer[..bytes_read])<span class="question-mark">?</span>;
|
||||
buffer.clear();
|
||||
}
|
||||
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Extracts files from a 7Z archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the 7Z file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_7z(Path::new("src/test_data/test.7z"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_7z(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
sevenz_rust::decompress_file(input_path, output_directory).expect(<span class="string">"complete"</span>);
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Extracts files from a TBZ2 (tar.bz2) compressed archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the TBZ2 compressed file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_tbz2(Path::new("src/test_data/test.tbz2"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_tbz2(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
<span class="kw">let </span>input_file = File::open(input_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>bz2_reader = BzDecoder::new(input_file);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>archive = tar::Archive::new(bz2_reader);
|
||||
<span class="kw">for </span>entry <span class="kw">in </span>archive.entries()<span class="question-mark">? </span>{
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>entry = entry<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>entry_path = entry.path()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>full_path = output_directory.join(entry_path);
|
||||
<span class="kw">if </span>entry.header().entry_type().is_dir() {
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_path)<span class="question-mark">?</span>;
|
||||
} <span class="kw">else </span>{
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_path.parent().unwrap())<span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>file = fs::File::create(<span class="kw-2">&</span>full_path)<span class="question-mark">?</span>;
|
||||
io::copy(<span class="kw-2">&mut </span>entry, <span class="kw-2">&mut </span>file)<span class="question-mark">?</span>;
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
|
||||
<span class="doccomment">/// Extracts files from a TGZ (tar.gz) compressed archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the TGZ compressed file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_tgz(Path::new("src/test_data/test.tgz"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_tgz(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
<span class="kw">let </span>input_file = File::open(input_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>decompressor = GzDecoder::new(input_file);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>archive = tar::Archive::new(<span class="kw-2">&mut </span>decompressor);
|
||||
<span class="kw">for </span>entry <span class="kw">in </span>archive.entries()<span class="question-mark">? </span>{
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>entry = entry<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>entry_path = entry.path()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>full_path = output_directory.join(entry_path);
|
||||
<span class="kw">if </span>entry.header().entry_type().is_dir() {
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_path)<span class="question-mark">?</span>;
|
||||
} <span class="kw">else </span>{
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_path.parent().unwrap())<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>file = fs::File::create(<span class="kw-2">&</span>full_path)<span class="question-mark">?</span>;
|
||||
io::copy(<span class="kw-2">&mut </span>entry, <span class="kw-2">&mut </span>file)<span class="question-mark">?</span>;
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Extracts files from a TXZ (tar.xz) compressed archive.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `input_path` - The path to the TXZ compressed file to extract.
|
||||
/// * `output_directory` - The destination directory for extracted files.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns `Ok(())` on success, or an `Error` if extraction fails.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::Path;
|
||||
/// let result = extract_txz(Path::new("src/test_data/test.txz"), Path::new("output_directory"));
|
||||
/// assert!(result.is_ok());
|
||||
/// ```
|
||||
</span><span class="kw">pub fn </span>extract_txz(input_path: <span class="kw-2">&</span>Path, output_directory: <span class="kw-2">&</span>Path) -> <span class="prelude-ty">Result</span><(), io::Error> {
|
||||
<span class="kw">let </span>input_file = File::open(input_path)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>decompressor = LzmaReader::new_decompressor(input_file)
|
||||
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>archive = tar::Archive::new(<span class="kw-2">&mut </span>decompressor);
|
||||
<span class="kw">for </span>entry <span class="kw">in </span>archive.entries()<span class="question-mark">? </span>{
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>entry = entry<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>entry_path = entry.path()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>full_path = output_directory.join(entry_path);
|
||||
<span class="kw">if </span>entry.header().entry_type().is_dir() {
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_path)<span class="question-mark">?</span>;
|
||||
} <span class="kw">else </span>{
|
||||
fs::create_dir_all(<span class="kw-2">&</span>full_path.parent().unwrap())<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>file = fs::File::create(<span class="kw-2">&</span>full_path)<span class="question-mark">?</span>;
|
||||
io::copy(<span class="kw-2">&mut </span>entry, <span class="kw-2">&mut </span>file)<span class="question-mark">?</span>;
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
</code></pre></div></section></main></body></html>
|
||||
847
doc/src/sk_extract/lib.rs.html
Normal file
847
doc/src/sk_extract/lib.rs.html
Normal file
|
|
@ -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/lib/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/SourceSerif4-Bold-a2c9cd1067f8b328.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-f3501f0f5ae15dfb.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="sk_extract" data-themes="" data-resource-suffix="" data-rustdoc-version="1.71.1 (eb26296b5 2023-08-03) (built from a source tarball)" data-search-js="search-4926e5fc22a5646a.js" data-settings-js="settings-de11bff964e9d4e5.js" data-settings-css="settings-8c76f75bfb6bd192.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="../../static.files/source-script-11255107d0a65077.js"></script><script defer src="../../source-files.js"></script><script defer src="../../static.files/main-f0540c1d82cde29b.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.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 source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"></nav><main><nav class="sub"><a class="sub-logo-container" href="../../sk_extract/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><form class="search-form"><span></span><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" title="help" tabindex="-1"><a href="../../help.html">?</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>
|
||||
</pre></div><pre class="rust"><code>
|
||||
<span class="kw">pub mod </span>extractors;
|
||||
|
||||
<span class="attr">#[cfg(test)]
|
||||
</span><span class="kw">mod </span>tests {
|
||||
<span class="kw">use </span>std::{io,os::unix::fs::PermissionsExt};
|
||||
<span class="kw">use </span>serial_test::serial;
|
||||
<span class="kw">use super</span>::<span class="kw-2">*</span>;
|
||||
<span class="kw">use </span>std::fs;
|
||||
<span class="kw">use </span>std::path::PathBuf;
|
||||
<span class="kw">use </span>std::path::Path;
|
||||
<span class="kw">use </span>std::io::Read;
|
||||
<span class="kw">use </span>extractors::{
|
||||
extract_zip,
|
||||
extract_rar,
|
||||
extract_tar,
|
||||
extract_tbz2,
|
||||
extract_tgz,
|
||||
extract_txz,
|
||||
extract_7z,
|
||||
<span class="comment">// extract_arj,
|
||||
// extract_cab,
|
||||
// extract_chm,
|
||||
// extract_deb,
|
||||
// extract_dmg,
|
||||
// extract_iso,
|
||||
// extract_lzh,
|
||||
// extract_msi,
|
||||
// extract_rpm,
|
||||
// extract_udf,
|
||||
// extract_wim,
|
||||
// extract_xar,
|
||||
// extract_exe
|
||||
</span>};
|
||||
|
||||
<span class="attr">#[test]
|
||||
#[serial]
|
||||
</span><span class="kw">fn </span>test_extract_zip() {
|
||||
<span class="kw">let </span>input_path = Path::new(<span class="string">"src/test_data/test.zip"</span>);
|
||||
<span class="kw">let </span>output_directory = create_temp_dir();
|
||||
|
||||
<span class="comment">// Extract the zip file
|
||||
</span><span class="kw">let </span>result = extract_zip(input_path, <span class="kw-2">&</span>output_directory);
|
||||
<span class="macro">assert!</span>(result.is_ok());
|
||||
|
||||
<span class="comment">// Check checksums and assert equality
|
||||
</span><span class="kw">let </span>checksum_01 = verify_checksum(<span class="string">"test_dir/checksum_01"</span>, <span class="string">"test_dir/testfile_01"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_01, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_02 = verify_checksum(<span class="string">"test_dir/checksum_02"</span>, <span class="string">"test_dir/testfile_02"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_02, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_03 = verify_checksum(<span class="string">"test_dir/checksum_03"</span>, <span class="string">"test_dir/testfile_03"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_03, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="comment">// Check Permissions match original 644 compression perms
|
||||
</span><span class="kw">let </span>tf1_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf2_perms = check_permissions(<span class="string">"test_dir/testfile_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf3_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf3_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum1_perms = check_permissions(<span class="string">"test_dir/checksum_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum2_perms = check_permissions(<span class="string">"test_dir/checksum_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum3_perms = check_permissions(<span class="string">"test_dir/checksum_03"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum3_perms.is_ok());
|
||||
|
||||
<span class="comment">// Delete the test directory at the end of the test
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Err</span>(err) = fs::remove_dir_all(<span class="kw-2">&</span>output_directory) {
|
||||
<span class="macro">eprintln!</span>(<span class="string">"Failed to delete test directory: {:?}"</span>, err);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attr">#[test]
|
||||
#[serial]
|
||||
</span><span class="kw">fn </span>test_extract_rar() {
|
||||
<span class="kw">let </span>input_path = Path::new(<span class="string">"src/test_data/test.rar"</span>);
|
||||
<span class="kw">let </span>output_directory = create_temp_dir();
|
||||
<span class="kw">let </span>result = extract_rar(input_path, <span class="kw-2">&</span>output_directory);
|
||||
<span class="macro">assert!</span>(result.is_ok());
|
||||
|
||||
<span class="comment">// Check checksums and assert equality
|
||||
</span><span class="kw">let </span>checksum_01 = verify_checksum(<span class="string">"test_dir/checksum_01"</span>, <span class="string">"test_dir/testfile_01"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_01, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_02 = verify_checksum(<span class="string">"test_dir/checksum_02"</span>, <span class="string">"test_dir/testfile_02"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_02, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_03 = verify_checksum(<span class="string">"test_dir/checksum_03"</span>, <span class="string">"test_dir/testfile_03"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_03, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="comment">// Check Permissions match original 644 compression perms
|
||||
</span><span class="kw">let </span>tf1_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf2_perms = check_permissions(<span class="string">"test_dir/testfile_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf3_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf3_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum1_perms = check_permissions(<span class="string">"test_dir/checksum_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum2_perms = check_permissions(<span class="string">"test_dir/checksum_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum3_perms = check_permissions(<span class="string">"test_dir/checksum_03"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum3_perms.is_ok());
|
||||
|
||||
<span class="comment">// Delete the test directory at the end of the test
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Err</span>(err) = fs::remove_dir_all(<span class="kw-2">&</span>output_directory) {
|
||||
<span class="macro">eprintln!</span>(<span class="string">"Failed to delete test directory: {:?}"</span>, err);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attr">#[test]
|
||||
#[serial]
|
||||
</span><span class="kw">fn </span>test_extract_tar() {
|
||||
<span class="kw">let </span>input_path = Path::new(<span class="string">"src/test_data/test.tar"</span>);
|
||||
<span class="kw">let </span>output_directory = create_temp_dir();
|
||||
<span class="kw">let </span>result = extract_tar(input_path, <span class="kw-2">&</span>output_directory);
|
||||
<span class="macro">assert!</span>(result.is_ok());
|
||||
|
||||
<span class="comment">// Check checksums and assert equality
|
||||
</span><span class="kw">let </span>checksum_01 = verify_checksum(<span class="string">"test_dir/checksum_01"</span>, <span class="string">"test_dir/testfile_01"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_01, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_02 = verify_checksum(<span class="string">"test_dir/checksum_02"</span>, <span class="string">"test_dir/testfile_02"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_02, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_03 = verify_checksum(<span class="string">"test_dir/checksum_03"</span>, <span class="string">"test_dir/testfile_03"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_03, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="comment">// Check Permissions match original 644 compression perms
|
||||
</span><span class="kw">let </span>tf1_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf2_perms = check_permissions(<span class="string">"test_dir/testfile_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf3_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf3_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum1_perms = check_permissions(<span class="string">"test_dir/checksum_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum2_perms = check_permissions(<span class="string">"test_dir/checksum_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum3_perms = check_permissions(<span class="string">"test_dir/checksum_03"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum3_perms.is_ok());
|
||||
|
||||
<span class="comment">// Delete the test directory at the end of the test
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Err</span>(err) = fs::remove_dir_all(<span class="kw-2">&</span>output_directory) {
|
||||
<span class="macro">eprintln!</span>(<span class="string">"Failed to delete test directory: {:?}"</span>, err);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attr">#[test]
|
||||
#[serial]
|
||||
</span><span class="kw">fn </span>test_extract_7z() {
|
||||
<span class="kw">let </span>input_path = Path::new(<span class="string">"src/test_data/test.7z"</span>);
|
||||
<span class="kw">let </span>output_directory = create_temp_dir();
|
||||
<span class="kw">let </span>result = extract_7z(input_path, <span class="kw-2">&</span>output_directory);
|
||||
<span class="macro">assert!</span>(result.is_ok());
|
||||
|
||||
<span class="comment">// Check checksums and assert equality
|
||||
</span><span class="kw">let </span>checksum_01 = verify_checksum(<span class="string">"test_dir/checksum_01"</span>, <span class="string">"test_dir/testfile_01"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_01, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_02 = verify_checksum(<span class="string">"test_dir/checksum_02"</span>, <span class="string">"test_dir/testfile_02"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_02, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_03 = verify_checksum(<span class="string">"test_dir/checksum_03"</span>, <span class="string">"test_dir/testfile_03"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_03, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="comment">// Check Permissions match original 644 compression perms
|
||||
</span><span class="kw">let </span>tf1_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf2_perms = check_permissions(<span class="string">"test_dir/testfile_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf3_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf3_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum1_perms = check_permissions(<span class="string">"test_dir/checksum_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum2_perms = check_permissions(<span class="string">"test_dir/checksum_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum3_perms = check_permissions(<span class="string">"test_dir/checksum_03"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum3_perms.is_ok());
|
||||
|
||||
<span class="comment">// Delete the test directory at the end of the test
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Err</span>(err) = fs::remove_dir_all(<span class="kw-2">&</span>output_directory) {
|
||||
<span class="macro">eprintln!</span>(<span class="string">"Failed to delete test directory: {:?}"</span>, err);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attr">#[test]
|
||||
#[serial]
|
||||
</span><span class="kw">fn </span>test_extract_tbz2() {
|
||||
<span class="kw">let </span>input_path = Path::new(<span class="string">"src/test_data/test.tbz2"</span>);
|
||||
<span class="kw">let </span>output_directory = create_temp_dir();
|
||||
|
||||
<span class="kw">let </span>result = extract_tbz2(input_path, <span class="kw-2">&</span>output_directory);
|
||||
<span class="macro">assert!</span>(result.is_ok());
|
||||
|
||||
<span class="comment">// Check checksums and assert equality
|
||||
</span><span class="kw">let </span>checksum_01 = verify_checksum(<span class="string">"test_dir/checksum_01"</span>, <span class="string">"test_dir/testfile_01"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_01, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_02 = verify_checksum(<span class="string">"test_dir/checksum_02"</span>, <span class="string">"test_dir/testfile_02"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_02, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_03 = verify_checksum(<span class="string">"test_dir/checksum_03"</span>, <span class="string">"test_dir/testfile_03"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_03, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="comment">// Check Permissions match original 644 compression perms
|
||||
</span><span class="kw">let </span>tf1_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf2_perms = check_permissions(<span class="string">"test_dir/testfile_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf3_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf3_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum1_perms = check_permissions(<span class="string">"test_dir/checksum_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum2_perms = check_permissions(<span class="string">"test_dir/checksum_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum3_perms = check_permissions(<span class="string">"test_dir/checksum_03"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum3_perms.is_ok());
|
||||
|
||||
<span class="comment">// Delete the test directory at the end of the test
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Err</span>(err) = fs::remove_dir_all(<span class="kw-2">&</span>output_directory) {
|
||||
<span class="macro">eprintln!</span>(<span class="string">"Failed to delete test directory: {:?}"</span>, err);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attr">#[test]
|
||||
#[serial]
|
||||
</span><span class="kw">fn </span>test_extract_tgz() {
|
||||
<span class="kw">let </span>input_path = Path::new(<span class="string">"src/test_data/test.tgz"</span>);
|
||||
<span class="kw">let </span>output_directory = create_temp_dir();
|
||||
<span class="kw">let </span>result = extract_tgz(input_path, <span class="kw-2">&</span>output_directory);
|
||||
<span class="macro">assert!</span>(result.is_ok());
|
||||
|
||||
<span class="comment">// Check checksums and assert equality
|
||||
</span><span class="kw">let </span>checksum_01 = verify_checksum(<span class="string">"test_dir/checksum_01"</span>, <span class="string">"test_dir/testfile_01"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_01, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_02 = verify_checksum(<span class="string">"test_dir/checksum_02"</span>, <span class="string">"test_dir/testfile_02"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_02, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_03 = verify_checksum(<span class="string">"test_dir/checksum_03"</span>, <span class="string">"test_dir/testfile_03"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_03, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="comment">// Check Permissions match original 644 compression perms
|
||||
</span><span class="kw">let </span>tf1_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf2_perms = check_permissions(<span class="string">"test_dir/testfile_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf3_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf3_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum1_perms = check_permissions(<span class="string">"test_dir/checksum_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum2_perms = check_permissions(<span class="string">"test_dir/checksum_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum3_perms = check_permissions(<span class="string">"test_dir/checksum_03"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum3_perms.is_ok());
|
||||
|
||||
<span class="comment">// Delete the test directory at the end of the test
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Err</span>(err) = fs::remove_dir_all(<span class="kw-2">&</span>output_directory) {
|
||||
<span class="macro">eprintln!</span>(<span class="string">"Failed to delete test directory: {:?}"</span>, err);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="attr">#[test]
|
||||
#[serial]
|
||||
</span><span class="kw">fn </span>test_extract_txz() {
|
||||
<span class="kw">let </span>input_path = Path::new(<span class="string">"src/test_data/test.txz"</span>);
|
||||
<span class="kw">let </span>output_directory = create_temp_dir();
|
||||
<span class="kw">let </span>result = extract_txz(input_path, <span class="kw-2">&</span>output_directory);
|
||||
<span class="macro">assert!</span>(result.is_ok());
|
||||
|
||||
<span class="comment">// Check checksums and assert equality
|
||||
</span><span class="kw">let </span>checksum_01 = verify_checksum(<span class="string">"test_dir/checksum_01"</span>, <span class="string">"test_dir/testfile_01"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_01, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_02 = verify_checksum(<span class="string">"test_dir/checksum_02"</span>, <span class="string">"test_dir/testfile_02"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_02, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="kw">let </span>checksum_03 = verify_checksum(<span class="string">"test_dir/checksum_03"</span>, <span class="string">"test_dir/testfile_03"</span>).unwrap();
|
||||
<span class="macro">assert_eq!</span>(checksum_03, <span class="bool-val">true</span>);
|
||||
|
||||
<span class="comment">// Check Permissions match original 644 compression perms
|
||||
</span><span class="kw">let </span>tf1_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf2_perms = check_permissions(<span class="string">"test_dir/testfile_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>tf3_perms = check_permissions(<span class="string">"test_dir/testfile_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(tf3_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum1_perms = check_permissions(<span class="string">"test_dir/checksum_01"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum1_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum2_perms = check_permissions(<span class="string">"test_dir/checksum_02"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum2_perms.is_ok());
|
||||
|
||||
<span class="kw">let </span>csum3_perms = check_permissions(<span class="string">"test_dir/checksum_03"</span>,<span class="number">644</span>);
|
||||
<span class="macro">assert!</span>(csum3_perms.is_ok());
|
||||
|
||||
<span class="comment">// Delete the test directory at the end of the test
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Err</span>(err) = fs::remove_dir_all(<span class="kw-2">&</span>output_directory) {
|
||||
<span class="macro">eprintln!</span>(<span class="string">"Failed to delete test directory: {:?}"</span>, err);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>verify_checksum(checksum_path: <span class="kw-2">&</span>str, testfile_path: <span class="kw-2">&</span>str) -> <span class="prelude-ty">Result</span><bool, std::io::Error> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>checksum_file = fs::File::open(checksum_path).expect(<span class="string">"Failed to open checksum file"</span>);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>checksum_data = String::new();
|
||||
checksum_file
|
||||
.read_to_string(<span class="kw-2">&mut </span>checksum_data)
|
||||
.expect(<span class="string">"Failed to read checksum data"</span>);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>checksum_data_uppercase = checksum_data.to_uppercase();
|
||||
|
||||
<span class="kw">if </span>checksum_data_uppercase.len() >= <span class="number">2 </span>{
|
||||
checksum_data_uppercase.truncate(checksum_data_uppercase.len() - <span class="number">1</span>);
|
||||
} <span class="kw">else </span>{
|
||||
<span class="macro">eprintln!</span>(<span class="string">"String is too short to remove characters"</span>);
|
||||
}
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>testfile = fs::File::open(testfile_path).expect(<span class="string">"Failed to open test file"</span>);
|
||||
<span class="kw">let </span>testfile_buffer = io::BufReader::new(<span class="kw-2">&mut </span>testfile);
|
||||
<span class="kw">let </span>calculated_checksum = data_encoding::HEXUPPER.encode(sha256_digest(testfile_buffer)<span class="question-mark">?</span>.as_ref());
|
||||
<span class="kw">let </span>tf_path = Path::new(testfile_path);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>checksum_with_filename = String::new(); <span class="comment">// Initialize the variable
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Some</span>(testfile_name) = tf_path.file_name() {
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(testfile_name_str) = testfile_name.to_str() {
|
||||
checksum_with_filename = <span class="macro">format!</span>(<span class="string">"{} {}"</span>, calculated_checksum, testfile_name_str.to_uppercase());
|
||||
}
|
||||
} <span class="kw">else </span>{
|
||||
<span class="macro">eprintln!</span>(<span class="string">"Invalid path or no file name found."</span>);
|
||||
}
|
||||
|
||||
<span class="prelude-val">Ok</span>(checksum_with_filename == checksum_data_uppercase)
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>create_temp_dir() -> PathBuf {
|
||||
<span class="comment">// Specify the absolute path for the permanent directory
|
||||
</span><span class="kw">let </span>temp_dir = Path::new(<span class="string">"test_dir"</span>);
|
||||
|
||||
<span class="comment">// Create the directory if it doesn't exist
|
||||
</span><span class="kw">if </span>!temp_dir.exists() {
|
||||
fs::create_dir_all(<span class="kw-2">&</span>temp_dir).expect(<span class="string">"Failed to create temp directory"</span>);
|
||||
}
|
||||
temp_dir.to_path_buf()
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>sha256_digest<R: io::Read>(<span class="kw-2">mut </span>reader: R) -> <span class="prelude-ty">Result</span><ring::digest::Digest, std::io::Error> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>context = ring::digest::Context::new(<span class="kw-2">&</span>ring::digest::SHA256);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>buffer = [<span class="number">0</span>; <span class="number">1024</span>];
|
||||
|
||||
<span class="kw">loop </span>{
|
||||
<span class="kw">let </span>count = reader.read(<span class="kw-2">&mut </span>buffer)<span class="question-mark">?</span>;
|
||||
<span class="kw">if </span>count == <span class="number">0 </span>{
|
||||
<span class="kw">break</span>;
|
||||
}
|
||||
context.update(<span class="kw-2">&</span>buffer[..count]);
|
||||
}
|
||||
|
||||
<span class="prelude-val">Ok</span>(context.finish())
|
||||
}
|
||||
<span class="kw">fn </span>mode_to_chmod(mode: u32) -> u32 {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>flags:u32 = <span class="number">0</span>;
|
||||
|
||||
<span class="comment">// Owner permissions
|
||||
</span><span class="kw">if </span>(mode & <span class="number">0o400</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">400 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
<span class="kw">if </span>(mode & <span class="number">0o200</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">200 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
<span class="kw">if </span>(mode & <span class="number">0o100</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">100 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
|
||||
<span class="comment">// Group permissions
|
||||
</span><span class="kw">if </span>(mode & <span class="number">0o40</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">40 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
<span class="kw">if </span>(mode & <span class="number">0o20</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">20 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
<span class="kw">if </span>(mode & <span class="number">0o10</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">10 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
|
||||
<span class="comment">// Others permissions
|
||||
</span><span class="kw">if </span>(mode & <span class="number">0o4</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">4 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
<span class="kw">if </span>(mode & <span class="number">0o2</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">2 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
<span class="kw">if </span>(mode & <span class="number">0o1</span>) != <span class="number">0 </span>{ flags = flags+<span class="number">1 </span>} <span class="kw">else </span>{ flags = flags+<span class="number">0 </span>};
|
||||
|
||||
flags
|
||||
}
|
||||
<span class="kw">fn </span>check_permissions(filepath: <span class="kw-2">&</span>str, perms: u32) -> <span class="prelude-ty">Result</span><bool, std::io::Error> {
|
||||
<span class="kw">let </span>file = fs::File::open(filepath)<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>metadata = file.metadata()<span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>permissions = metadata.permissions();
|
||||
<span class="kw">let </span>mode = permissions.mode();
|
||||
<span class="kw">let </span>chmod = mode_to_chmod(mode);
|
||||
<span class="prelude-val">Ok</span>(chmod == perms)
|
||||
}
|
||||
}
|
||||
</code></pre></div></section></main></body></html>
|
||||
50
doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt
Normal file
50
doc/static.files/COPYRIGHT-23e9bde6c69aea69.txt
Normal file
|
|
@ -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
|
||||
98
doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt
Normal file
98
doc/static.files/FiraSans-LICENSE-db4b642586e02d97.txt
Normal file
|
|
@ -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
|
||||
BIN
doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2
Normal file
BIN
doc/static.files/FiraSans-Medium-8f9a781e4970d388.woff2
Normal file
Binary file not shown.
BIN
doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2
Normal file
BIN
doc/static.files/FiraSans-Regular-018c141bf0843ffd.woff2
Normal file
Binary file not shown.
201
doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt
Normal file
201
doc/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt
Normal file
|
|
@ -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.
|
||||
23
doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt
Normal file
23
doc/static.files/LICENSE-MIT-65090b722b3f6c56.txt
Normal file
|
|
@ -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.
|
||||
BIN
doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2
Normal file
BIN
doc/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2
Normal file
Binary file not shown.
103
doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt
Normal file
103
doc/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt
Normal file
|
|
@ -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
|
||||
BIN
doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2
Normal file
BIN
doc/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2
Normal file
Binary file not shown.
97
doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt
Normal file
97
doc/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt
Normal file
|
|
@ -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
|
||||
Binary file not shown.
Binary file not shown.
BIN
doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2
Normal file
BIN
doc/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2
Normal file
Binary file not shown.
BIN
doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2
Normal file
BIN
doc/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2
Normal file
Binary file not shown.
98
doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md
Normal file
98
doc/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md
Normal file
|
|
@ -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 -->
|
||||
BIN
doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2
Normal file
BIN
doc/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2
Normal file
Binary file not shown.
1
doc/static.files/ayu-614652228113ac93.css
Normal file
1
doc/static.files/ayu-614652228113ac93.css
Normal file
File diff suppressed because one or more lines are too long
1
doc/static.files/clipboard-7571035ce49a181d.svg
Normal file
1
doc/static.files/clipboard-7571035ce49a181d.svg
Normal file
|
|
@ -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>
|
||||
|
After Width: | Height: | Size: 576 B |
1
doc/static.files/dark-1097f8e92a01e3cf.css
Normal file
1
doc/static.files/dark-1097f8e92a01e3cf.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#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;--source-sidebar-background-selected:#333;--source-sidebar-background-hover:#444;--table-alt-row-background-color:#2A2A2A;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}
|
||||
BIN
doc/static.files/favicon-16x16-8b506e7a72182f1c.png
Normal file
BIN
doc/static.files/favicon-16x16-8b506e7a72182f1c.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 715 B |
24
doc/static.files/favicon-2c020d218678b618.svg
Normal file
24
doc/static.files/favicon-2c020d218678b618.svg
Normal file
|
|
@ -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>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
BIN
doc/static.files/favicon-32x32-422f7d1d52889060.png
Normal file
BIN
doc/static.files/favicon-32x32-422f7d1d52889060.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
1
doc/static.files/light-0f8c037637f9eb3e.css
Normal file
1
doc/static.files/light-0f8c037637f9eb3e.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#F5F5F5;--sidebar-background-color-hover:#E0E0E0;--code-block-background-color:#F5F5F5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#ffffff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:#4e8bca;--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;--source-sidebar-background-selected:#fff;--source-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);}
|
||||
7
doc/static.files/main-f0540c1d82cde29b.js
Normal file
7
doc/static.files/main-f0540c1d82cde29b.js
Normal file
File diff suppressed because one or more lines are too long
2
doc/static.files/normalize-76eba96aa4d2e634.css
Normal file
2
doc/static.files/normalize-76eba96aa4d2e634.css
Normal file
|
|
@ -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}
|
||||
1
doc/static.files/noscript-13285aec31fa243e.css
Normal file
1
doc/static.files/noscript-13285aec31fa243e.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
#main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.source .sidebar{display:none;}.notable-traits{display:none;}
|
||||
61
doc/static.files/rust-logo-151179464ae7ed46.svg
Normal file
61
doc/static.files/rust-logo-151179464ae7ed46.svg
Normal file
|
|
@ -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>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
8
doc/static.files/rustdoc-f3501f0f5ae15dfb.css
Normal file
8
doc/static.files/rustdoc-f3501f0f5ae15dfb.css
Normal file
File diff suppressed because one or more lines are too long
1
doc/static.files/scrape-examples-ef1e698c1d417c0c.js
Normal file
1
doc/static.files/scrape-examples-ef1e698c1d417c0c.js
Normal file
|
|
@ -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})})})()
|
||||
1
doc/static.files/search-4926e5fc22a5646a.js
Normal file
1
doc/static.files/search-4926e5fc22a5646a.js
Normal file
File diff suppressed because one or more lines are too long
3
doc/static.files/settings-8c76f75bfb6bd192.css
Normal file
3
doc/static.files/settings-8c76f75bfb6bd192.css
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,<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;}
|
||||
17
doc/static.files/settings-de11bff964e9d4e5.js
Normal file
17
doc/static.files/settings-de11bff964e9d4e5.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\
|
||||
<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":"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=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=function(event){if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})()
|
||||
1
doc/static.files/source-script-11255107d0a65077.js
Normal file
1
doc/static.files/source-script-11255107d0a65077.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
"use strict";(function(){const rootPath=document.getElementById("rustdoc-vars").attributes["data-root-path"].value;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}function toggleSidebar(){const child=this.parentNode.children[0];if(child.innerText===">"){addClass(document.documentElement,"source-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"source-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to<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 handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})()
|
||||
1
doc/static.files/storage-62ce34ea385b278a.js
Normal file
1
doc/static.files/storage-62ce34ea385b278a.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.getElementById("rustdoc-vars");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}let newHref;if(newThemeName==="light"||newThemeName==="dark"||newThemeName==="ayu"){newHref=getVar("static-root-path")+getVar("theme-"+newThemeName+"-css")}else{newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css"}if(!window.currentTheme){document.write(`<link rel="stylesheet" id="themeStyle" href="${newHref}">`);window.currentTheme=document.getElementById("themeStyle")}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"source-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}})
|
||||
1
doc/static.files/wheel-7b819b6101059cd0.svg
Normal file
1
doc/static.files/wheel-7b819b6101059cd0.svg
Normal file
|
|
@ -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>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
Loading…
Add table
Add a link
Reference in a new issue