Deploying to gh-pages from @ 09fbbe186c 🚀

This commit is contained in:
Aravinth Manivannan 2021-04-11 17:26:05 +00:00
parent 396b42042a
commit 2f7d6218ec
15 changed files with 189 additions and 184 deletions

View file

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate cache_buster</p><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate cache_buster</p><div class="block version"><p>Version 0.1.1</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">List of all items</span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span>
</span>
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="filemap/struct.Files.html">filemap::Files</a></li><li><a href="processor/struct.Buster.html">processor::Buster</a></li><li><a href="processor/struct.BusterBuilder.html">processor::BusterBuilder</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="processor/enum.BusterBuilderError.html">processor::BusterBuilderError</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="cache_buster"></div>
</h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="filemap/struct.Files.html">filemap::Files</a></li><li><a href="processor/struct.Buster.html">processor::Buster</a></li><li><a href="processor/struct.BusterBuilder.html">processor::BusterBuilder</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="processor/enum.BusterBuilderError.html">processor::BusterBuilderError</a></li></ul><h3 id="Constants">Constants</h3><ul class="constants docblock"><li><a href="constant.ENV_VAR_NAME.html">ENV_VAR_NAME</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="cache_buster"></div>
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View file

@ -0,0 +1,6 @@
<!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 `ENV_VAR_NAME` constant in crate `cache_buster`."><meta name="keywords" content="rust, rustlang, rust-lang, ENV_VAR_NAME"><title>cache_buster::ENV_VAR_NAME - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">cache_buster</a></p><div id="sidebar-vars" data-name="ENV_VAR_NAME" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">cache_buster</a>::<wbr><a class="constant" href="">ENV_VAR_NAME</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/cache_buster/lib.rs.html#40" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const ENV_VAR_NAME: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;CACHE_BUSTER_FILE_MAP&quot;;</pre><div class="docblock"><p>env var to which filemap is written during compilation</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="cache_buster"></div>
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View file

@ -1,14 +1,14 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `filemap` mod in crate `cache_buster`."><meta name="keywords" content="rust, rustlang, rust-lang, filemap"><title>cache_buster::filemap - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module filemap</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">cache_buster</a></p><div id="sidebar-vars" data-name="filemap" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">cache_buster</a>::<wbr><a class="mod" href="">filemap</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/filemap.rs.html#7-215" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Module describing runtime compoenet for fetching modified filenames</p>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">cache_buster</a>::<wbr><a class="mod" href="">filemap</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/filemap.rs.html#7-155" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Module describing runtime compoenet for fetching modified filenames</p>
<p>Add the following tou your program to load the filemap during compiletime:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">cache_buster</span>::<span class="ident">Files</span>;
<span class="kw">fn</span> <span class="ident">main</span>(){
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">load</span>();
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">new</span>();
}</pre></div>
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Files.html" title="cache_buster::filemap::Files struct">Files</a></td><td class="docblock-short"><p>Filemap struct</p>

View file

@ -1,24 +1,15 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Files` struct in crate `cache_buster`."><meta name="keywords" content="rust, rustlang, rust-lang, Files"><title>cache_buster::filemap::Files - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Files</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.map">map</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.add">add</a><a href="#method.get">get</a><a href="#method.get_full_path">get_full_path</a><a href="#method.load">load</a><a href="#method.new">new</a><a href="#method.to_env">to_env</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CFiles%3E">PartialEq&lt;Files&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">cache_buster</a>::<wbr><a href="index.html">filemap</a></p><div id="sidebar-vars" data-name="Files" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">cache_buster</a>::<wbr><a href="index.html">filemap</a>::<wbr><a class="struct" href="">Files</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/filemap.rs.html#30-34" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Files {
pub map: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
// some fields omitted
}</pre></div><div class="docblock"><p>Filemap struct</p>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Files</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.get">get</a><a href="#method.get_full_path">get_full_path</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CFiles%3E">PartialEq&lt;Files&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">cache_buster</a>::<wbr><a href="index.html">filemap</a></p><div id="sidebar-vars" data-name="Files" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">cache_buster</a>::<wbr><a href="index.html">filemap</a>::<wbr><a class="struct" href="">Files</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/filemap.rs.html#30-34" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Files { /* fields omitted */ }</pre></div><div class="docblock"><p>Filemap struct</p>
<p>maps original names to generated names</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</code></span><div class="docblock"><p>filemap&lt;original-path, modified-path&gt;</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#36-98" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(base_dir: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; Self</code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#38-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Initialize map</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#36-64" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; Self</code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#38-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Load filemap in main program. Should be called from main program</p>
</div><h4 id="method.get" class="method"><code>pub fn <a href="#method.get" class="fnname">get</a>&lt;'a&gt;(&amp;'a self, path: &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;</code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#49-55" title="goto source code">[src]</a></h4><div class="docblock"><p>Get relative file path</p>
<p>If the modified filename path is <code>./prod/test.randomhash.svg</code>, it will
output <code>/test.randomhash.svg</code>. For full path, see <a href="../../cache_buster/filemap/struct.Files.html#method.get_full_path" title="Self::get_full_path">get_full_path</a>.</p>
</div><h4 id="method.get_full_path" class="method"><code>pub fn <a href="#method.get_full_path" class="fnname">get_full_path</a>&lt;'a&gt;(&amp;'a self, path: &amp;'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#61-63" title="goto source code">[src]</a></h4><div class="docblock"><p>Get file path</p>
<p>If the modified filename path is <code>./prod/test.randomhash.svg</code>, it will
output <code>/prod/test.randomhash.svg</code>. For relative path, see <a href="../../cache_buster/filemap/struct.Files.html#method.get" title="Self::get">get</a>.</p>
</div><h4 id="method.add" class="method"><code>pub fn <a href="#method.add" class="fnname">add</a>(&amp;mut self, k: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, v: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;</code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#66-73" title="goto source code">[src]</a></h4><div class="docblock"><p>Create file map: map original path to modified paths</p>
</div><h4 id="method.to_env" class="method"><code>pub fn <a href="#method.to_env" class="fnname">to_env</a>(&amp;self)</code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#77-89" title="goto source code">[src]</a></h4><div class="docblock"><p>This crate uses compile-time environment variables to transfer
data to the main program. This funtction sets that variable</p>
</div><h4 id="method.load" class="method"><code>pub fn <a href="#method.load" class="fnname">load</a>() -&gt; Self</code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#92-97" title="goto source code">[src]</a></h4><div class="docblock"><p>Load filemap in main program. Should be called from main program</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#29" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#29" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#29" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/cache_buster/filemap.rs.html#29" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `cache_buster` crate."><meta name="keywords" content="rust, rustlang, rust-lang, cache_buster"><title>cache_buster - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate cache_buster</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all cache_buster's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="cache_buster" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">cache_buster</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/cache_buster/lib.rs.html#7-37" title="goto source code">[src]</a></span></h1><div class="docblock">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate cache_buster</p><div class="block version"><p>Version 0.1.1</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all cache_buster's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#constants">Constants</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="cache_buster" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">cache_buster</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/cache_buster/lib.rs.html#7-40" title="goto source code">[src]</a></span></h1><div class="docblock">
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">cache_buster</span>::<span class="ident">BusterBuilder</span>;
@ -30,5 +30,7 @@
<table><tr><td><code>pub use processor::<a class="struct" href="../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a>;</code></td></tr><tr><td><code>pub use filemap::<a class="struct" href="../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>;</code></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="filemap/index.html" title="cache_buster::filemap mod">filemap</a></td><td class="docblock-short"><p>Module describing runtime compoenet for fetching modified filenames</p>
</td></tr><tr class="module-item"><td><a class="mod" href="processor/index.html" title="cache_buster::processor mod">processor</a></td><td class="docblock-short"><p>Module describing file processor that changes filenames to setup cache-busting</p>
</td></tr></table><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
<table><tr class="module-item"><td><a class="constant" href="constant.ENV_VAR_NAME.html" title="cache_buster::ENV_VAR_NAME constant">ENV_VAR_NAME</a></td><td class="docblock-short"><p>env var to which filemap is written during compilation</p>
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="cache_buster"></div>
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BusterBuilderError` enum in crate `cache_buster`."><meta name="keywords" content="rust, rustlang, rust-lang, BusterBuilderError"><title>cache_buster::processor::BusterBuilderError - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Enum BusterBuilderError</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.UninitializedField">UninitializedField</a><a href="#variant.ValidationError">ValidationError</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Error">Error</a><a href="#impl-From%3CString%3E">From&lt;String&gt;</a><a href="#impl-From%3CUninitializedFieldError%3E">From&lt;UninitializedFieldError&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a></p><div id="sidebar-vars" data-name="BusterBuilderError" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a>::<wbr><a class="enum" href="">BusterBuilderError</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum"><span class="docblock attributes top-attr">#[non_exhaustive]</span>pub enum BusterBuilderError {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a>::<wbr><a class="enum" href="">BusterBuilderError</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum"><span class="docblock attributes top-attr">#[non_exhaustive]</span>pub enum BusterBuilderError {
UninitializedField(&amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>),
ValidationError(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>),
}</pre></div><div class="docblock"><p>Error type for BusterBuilder</p>
@ -9,14 +9,14 @@
Variants (Non-exhaustive)<a href="#variants" class="anchor"></a></h2>
<div class="docblock non-exhaustive non-exhaustive-enum">Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.</div><div id="variant.UninitializedField" class="variant small-section-header"><a href="#variant.UninitializedField" class="anchor field"></a><code>UninitializedField(&amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code></div><div class="docblock"><p>Uninitialized field</p>
</div><div id="variant.ValidationError" class="variant small-section-header"><a href="#variant.ValidationError" class="anchor field"></a><code>ValidationError(<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</code></div><div class="docblock"><p>Custom validation error</p>
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Error" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Error" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.source" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source" class="fnname">source</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)&gt;</code><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#98" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source">Read more</a></p>
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Display" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Display" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Error" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Error" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.source" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source" class="fnname">source</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)&gt;</code><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#98" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source">Read more</a></p>
</div><h4 id="method.backtrace" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.backtrace" class="fnname">backtrace</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="https://doc.rust-lang.org/nightly/std/backtrace/struct.Backtrace.html" title="struct std::backtrace::Backtrace">Backtrace</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#126" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>backtrace</code>)</div></div><div class='docblock hidden'><p>Returns a stack backtrace, if available, of where this error occurred. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.backtrace">Read more</a></p>
</div><h4 id="method.description" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description" class="fnname">description</a>(&amp;self) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#138" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.42.0: <p>use the Display impl or to_string()</p>
</div></div><div class='docblock hidden'> <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description">Read more</a></div><h4 id="method.cause" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause" class="fnname">cause</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>&gt;</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#148" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.33.0: <p>replaced by Error::source, which can support downcasting</p>
</div></div></div><h3 id="impl-From%3CString%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-From%3CString%3E" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(s: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-From%3CUninitializedFieldError%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;UninitializedFieldError&gt; for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-From%3CUninitializedFieldError%3E" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(s: UninitializedFieldError) -&gt; Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div><h3 id="impl-From%3CString%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-From%3CString%3E" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(s: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-From%3CUninitializedFieldError%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;UninitializedFieldError&gt; for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-From%3CUninitializedFieldError%3E" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(s: UninitializedFieldError) -&gt; Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `processor` mod in crate `cache_buster`."><meta name="keywords" content="rust, rustlang, rust-lang, processor"><title>cache_buster::processor - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module processor</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class="location"><a href="../index.html">cache_buster</a></p><div id="sidebar-vars" data-name="processor" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">cache_buster</a>::<wbr><a class="mod" href="">processor</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#8-298" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Module describing file processor that changes filenames to setup cache-busting</p>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">cache_buster</a>::<wbr><a class="mod" href="">processor</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#8-358" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Module describing file processor that changes filenames to setup cache-busting</p>
<p>Run the following during build using <code>build.rs</code>:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
@ -29,7 +29,7 @@
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
}</pre></div>
<p>There's a runtime component to this library which will let you read modified
filenames from within your program. See <a href="../../cache_buster/filemap/struct.Files.html" title="Files">Files</a></p>
filenames from within your program. See [Files]</p>
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Buster.html" title="cache_buster::processor::Buster struct">Buster</a></td><td class="docblock-short"><p>Configuration for setting up cache-busting</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.BusterBuilder.html" title="cache_buster::processor::BusterBuilder struct">BusterBuilder</a></td><td class="docblock-short"><p>Builder for <a href="struct.Buster.html"><code>Buster</code></a>.</p>

View file

@ -1,18 +1,18 @@
<!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 `Buster` struct in crate `cache_buster`."><meta name="keywords" content="rust, rustlang, rust-lang, Buster"><title>cache_buster::processor::Buster - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Buster</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.process">process</a><a href="#method.try_process">try_process</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a></p><div id="sidebar-vars" data-name="Buster" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a>::<wbr><a class="struct" href="">Buster</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#52-65" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Buster { /* fields omitted */ }</pre></div><div class="docblock"><p>Configuration for setting up cache-busting</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#67-230" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.try_process" class="method"><code>pub fn <a href="#method.try_process" class="fnname">try_process</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#96-131" title="goto source code">[src]</a></h4><div class="docblock"><p>Processes files.</p>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a>::<wbr><a class="struct" href="">Buster</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#54-67" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Buster { /* fields omitted */ }</pre></div><div class="docblock"><p>Configuration for setting up cache-busting</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#69-233" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.try_process" class="method"><code>pub fn <a href="#method.try_process" class="fnname">try_process</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#98-133" title="goto source code">[src]</a></h4><div class="docblock"><p>Processes files.</p>
<p>If MIME types are uncommon, then use this funtion
as it won't panic when a weird MIM is encountered.</p>
<p>Otherwise, use <a href="../../cache_buster/processor/struct.Buster.html#method.process" title="Self::process">process</a></p>
<p>Note: it omits processing uncommon MIME types</p>
</div><h4 id="method.process" class="method"><code>pub fn <a href="#method.process" class="fnname">process</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#137-179" title="goto source code">[src]</a></h4><div class="docblock"><p>Processes files.</p>
</div><h4 id="method.process" class="method"><code>pub fn <a href="#method.process" class="fnname">process</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#139-182" title="goto source code">[src]</a></h4><div class="docblock"><p>Processes files.</p>
<p>If MIME types are common, then use this funtion
as it will panic when a weird MIM is encountered.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

View file

@ -1,18 +1,18 @@
<!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 `BusterBuilder` struct in crate `cache_buster`."><meta name="keywords" content="rust, rustlang, rust-lang, BusterBuilder"><title>cache_buster::processor::BusterBuilder - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct BusterBuilder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.build">build</a><a href="#method.copy">copy</a><a href="#method.follow_links">follow_links</a><a href="#method.mime_types">mime_types</a><a href="#method.result">result</a><a href="#method.source">source</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a></p><div id="sidebar-vars" data-name="BusterBuilder" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a>::<wbr><a class="struct" href="">BusterBuilder</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct BusterBuilder { /* fields omitted */ }</pre></div><div class="docblock"><p>Builder for <a href="struct.Buster.html"><code>Buster</code></a>.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.source" class="method"><code>pub fn <a href="#method.source" class="fnname">source</a>&lt;VALUE:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(&amp;mut self, value: VALUE) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class="docblock"><p>source directory</p>
</div><h4 id="method.mime_types" class="method"><code>pub fn <a href="#method.mime_types" class="fnname">mime_types</a>(&amp;mut self, value: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://docs.rs/mime/0.3.16/mime/struct.Mime.html" title="struct mime::Mime">Mime</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class="docblock"><p>mime_types for hashing</p>
</div><h4 id="method.result" class="method"><code>pub fn <a href="#method.result" class="fnname">result</a>&lt;VALUE:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(&amp;mut self, value: VALUE) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class="docblock"><p>directory for writing results</p>
</div><h4 id="method.copy" class="method"><code>pub fn <a href="#method.copy" class="fnname">copy</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class="docblock"><p>copy other non-hashed files from source dire to result dir?</p>
</div><h4 id="method.follow_links" class="method"><code>pub fn <a href="#method.follow_links" class="fnname">follow_links</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class="docblock"><p>follow symlinks?</p>
</div><h4 id="method.build" class="method"><code>pub fn <a href="#method.build" class="fnname">build</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a>, <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a>&gt;</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class="docblock"><p>Builds a new <code>Buster</code>.</p>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">cache_buster</a>::<wbr><a href="index.html">processor</a>::<wbr><a class="struct" href="">BusterBuilder</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct BusterBuilder { /* fields omitted */ }</pre></div><div class="docblock"><p>Builder for <a href="struct.Buster.html"><code>Buster</code></a>.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.source" class="method"><code>pub fn <a href="#method.source" class="fnname">source</a>&lt;VALUE:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(&amp;mut self, value: VALUE) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class="docblock"><p>source directory</p>
</div><h4 id="method.mime_types" class="method"><code>pub fn <a href="#method.mime_types" class="fnname">mime_types</a>(&amp;mut self, value: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://docs.rs/mime/0.3.16/mime/struct.Mime.html" title="struct mime::Mime">Mime</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class="docblock"><p>mime_types for hashing</p>
</div><h4 id="method.result" class="method"><code>pub fn <a href="#method.result" class="fnname">result</a>&lt;VALUE:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(&amp;mut self, value: VALUE) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class="docblock"><p>directory for writing results</p>
</div><h4 id="method.copy" class="method"><code>pub fn <a href="#method.copy" class="fnname">copy</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class="docblock"><p>copy other non-hashed files from source dire to result dir?</p>
</div><h4 id="method.follow_links" class="method"><code>pub fn <a href="#method.follow_links" class="fnname">follow_links</a>(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class="docblock"><p>follow symlinks?</p>
</div><h4 id="method.build" class="method"><code>pub fn <a href="#method.build" class="fnname">build</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../cache_buster/processor/struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a>, <a class="enum" href="../../cache_buster/processor/enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a>&gt;</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class="docblock"><p>Builds a new <code>Buster</code>.</p>
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
<p>If a required field has not been initialized.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -&gt; Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3 id="impl-Default" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-Default" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.default" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -&gt; Self</code><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../cache_buster/processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../src/cache_buster/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

View file

@ -1 +1 @@
initSidebarItems({"mod":[["filemap","Module describing runtime compoenet for fetching modified filenames"],["processor","Module describing file processor that changes filenames to setup cache-busting"]]});
initSidebarItems({"constant":[["ENV_VAR_NAME","env var to which filemap is written during compilation"]],"mod":[["filemap","Module describing runtime compoenet for fetching modified filenames"],["processor","Module describing file processor that changes filenames to setup cache-busting"]]});

View file

@ -1,5 +1,5 @@
var searchIndex = JSON.parse('{\
"actix_example":{"doc":"","i":[[5,"main","actix_example","",null,[[]]],[5,"get_full_path_runner","","",null,[[["files",3],["str",15]],["bool",15]]]],"p":[]},\
"cache_buster":{"doc":"","i":[[0,"processor","cache_buster","Module describing file processor that changes filenames …",null,null],[3,"Buster","cache_buster::processor","Configuration for setting up cache-busting",null,null],[3,"BusterBuilder","","Builder for <code>Buster</code>.",null,null],[11,"source","","source directory",0,[[["string",3],["into",8]]]],[11,"mime_types","","mime_types for hashing",0,[[["vec",3],["mime",3]]]],[11,"result","","directory for writing results",0,[[["string",3],["into",8]]]],[11,"copy","","copy other non-hashed files from source dire to result …",0,[[["bool",15]]]],[11,"follow_links","","follow symlinks?",0,[[["bool",15]]]],[11,"build","","Builds a new <code>Buster</code>.",0,[[],[["busterbuildererror",4],["result",4],["buster",3]]]],[4,"BusterBuilderError","","Error type for BusterBuilder",null,null],[13,"UninitializedField","","Uninitialized field",1,null],[13,"ValidationError","","Custom validation error",1,null],[11,"try_process","","Processes files.",2,[[],[["result",4],["files",3],["error",3]]]],[11,"process","","Processes files.",2,[[],[["result",4],["files",3],["error",3]]]],[0,"filemap","cache_buster","Module describing runtime compoenet for fetching modified …",null,null],[3,"Files","cache_buster::filemap","Filemap struct",null,null],[12,"map","","filemap<original-path, modified-path>",3,null],[11,"new","","Initialize map",3,[[["str",15]]]],[11,"get","","Get relative file path",3,[[["str",15]],[["option",4],["str",15]]]],[11,"get_full_path","","Get file path",3,[[["str",15]],[["string",3],["option",4]]]],[11,"add","","Create file map: map original path to modified paths",3,[[["string",3]],[["result",4],["str",15]]]],[11,"to_env","","This crate uses compile-time environment variables to …",3,[[]]],[11,"load","","Load filemap in main program. Should be called from main …",3,[[]]],[11,"from","cache_buster::processor","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_string","","",1,[[],["string",3]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"from","cache_buster::filemap","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"from","cache_buster::processor","",1,[[["uninitializedfielderror",3]]]],[11,"from","","",1,[[["string",3]]]],[11,"clone","","",2,[[],["buster",3]]],[11,"clone","","",0,[[],["busterbuilder",3]]],[11,"clone","cache_buster::filemap","",3,[[],["files",3]]],[11,"default","cache_buster::processor","",0,[[]]],[11,"eq","cache_buster::filemap","",3,[[["files",3]],["bool",15]]],[11,"ne","","",3,[[["files",3]],["bool",15]]],[11,"fmt","cache_buster::processor","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","cache_buster::filemap","",3,[[["formatter",3]],["result",6]]],[11,"fmt","cache_buster::processor","",1,[[["formatter",3]],["result",6]]],[11,"serialize","cache_buster::filemap","",3,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]]],"p":[[3,"BusterBuilder"],[4,"BusterBuilderError"],[3,"Buster"],[3,"Files"]]}\
"cache_buster":{"doc":"","i":[[0,"processor","cache_buster","Module describing file processor that changes filenames …",null,null],[3,"Buster","cache_buster::processor","Configuration for setting up cache-busting",null,null],[3,"BusterBuilder","","Builder for <code>Buster</code>.",null,null],[11,"source","","source directory",0,[[["string",3],["into",8]]]],[11,"mime_types","","mime_types for hashing",0,[[["mime",3],["vec",3]]]],[11,"result","","directory for writing results",0,[[["string",3],["into",8]]]],[11,"copy","","copy other non-hashed files from source dire to result …",0,[[["bool",15]]]],[11,"follow_links","","follow symlinks?",0,[[["bool",15]]]],[11,"build","","Builds a new <code>Buster</code>.",0,[[],[["busterbuildererror",4],["buster",3],["result",4]]]],[4,"BusterBuilderError","","Error type for BusterBuilder",null,null],[13,"UninitializedField","","Uninitialized field",1,null],[13,"ValidationError","","Custom validation error",1,null],[11,"try_process","","Processes files.",2,[[],[["result",4],["error",3]]]],[11,"process","","Processes files.",2,[[],[["result",4],["error",3]]]],[0,"filemap","cache_buster","Module describing runtime compoenet for fetching modified …",null,null],[3,"Files","cache_buster::filemap","Filemap struct",null,null],[11,"new","","Load filemap in main program. Should be called from main …",3,[[]]],[11,"get","","Get relative file path",3,[[["str",15]],[["option",4],["str",15]]]],[11,"get_full_path","","Get file path",3,[[["str",15]],[["option",4],["string",3]]]],[17,"ENV_VAR_NAME","cache_buster","env var to which filemap is written during compilation",null,null],[11,"from","cache_buster::processor","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_string","","",1,[[],["string",3]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"from","cache_buster::filemap","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"from","cache_buster::processor","",1,[[["uninitializedfielderror",3]]]],[11,"from","","",1,[[["string",3]]]],[11,"clone","","",2,[[],["buster",3]]],[11,"clone","","",0,[[],["busterbuilder",3]]],[11,"clone","cache_buster::filemap","",3,[[],["files",3]]],[11,"default","cache_buster::processor","",0,[[]]],[11,"eq","cache_buster::filemap","",3,[[["files",3]],["bool",15]]],[11,"ne","","",3,[[["files",3]],["bool",15]]],[11,"fmt","cache_buster::processor","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","cache_buster::filemap","",3,[[["formatter",3]],["result",6]]],[11,"fmt","cache_buster::processor","",1,[[["formatter",3]],["result",6]]],[11,"serialize","cache_buster::filemap","",3,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]]],"p":[[3,"BusterBuilder"],[4,"BusterBuilderError"],[3,"Buster"],[3,"Files"]]}\
}');
addSearchOptions(searchIndex);initSearch(searchIndex);

View file

@ -32,7 +32,7 @@
<span class="kw">use</span> <span class="ident">cache_buster</span>::<span class="ident">Files</span>;
<span class="kw">fn</span> <span class="ident">main</span>() {
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">load</span>();
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">new</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">get_full_path_runner</span>(<span class="string">&quot;../dist/log-out.svg&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">files</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">get_full_path_runner</span>(

View file

@ -156,66 +156,6 @@
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">/*
* Copyright (C) 2021 Aravinth Manivannan &lt;realaravinth@batsense.net&gt;
@ -231,7 +171,7 @@
<span class="doccomment">//! use cache_buster::Files;</span>
<span class="doccomment">//!</span>
<span class="doccomment">//! fn main(){</span>
<span class="doccomment">//! let files = Files::load();</span>
<span class="doccomment">//! let files = Files::new();</span>
<span class="doccomment">//! }</span>
<span class="doccomment">//! ```</span>
@ -248,17 +188,17 @@
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Clone</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Files</span> {
<span class="doccomment">/// filemap&lt;original-path, modified-path&gt;</span>
<span class="kw">pub</span> <span class="ident">map</span>: <span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">String</span>, <span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">map</span>: <span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">String</span>, <span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">base_dir</span>: <span class="ident">String</span>,
}
<span class="kw">impl</span> <span class="ident">Files</span> {
<span class="doccomment">/// Initialize map</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">base_dir</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="ident">Files</span> {
<span class="ident">map</span>: <span class="ident">HashMap</span>::<span class="ident">default</span>(),
<span class="ident">base_dir</span>: <span class="ident">base_dir</span>.<span class="ident">into</span>(),
}
<span class="doccomment">/// Load filemap in main program. Should be called from main program</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="kw">let</span> <span class="ident">env</span> <span class="op">=</span> <span class="ident">env</span>::<span class="ident">var</span>(<span class="ident">ENV_VAR_NAME</span>)
.<span class="ident">expect</span>(<span class="string">&quot;unable to read env var, might be a bug in lib. Please report on GitHub&quot;</span>);
<span class="kw">let</span> <span class="ident">res</span>: <span class="ident">Files</span> <span class="op">=</span> <span class="ident">serde_json</span>::<span class="ident">from_str</span>(<span class="kw-2">&amp;</span><span class="ident">env</span>).<span class="ident">unwrap</span>();
<span class="ident">res</span>
}
<span class="doccomment">/// Get relative file path</span>
@ -280,40 +220,6 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_full_path</span><span class="op">&lt;</span><span class="lifetime">&#39;a</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="self">self</span>, <span class="ident">path</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="lifetime">&#39;a</span> <span class="ident">String</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">map</span>.<span class="ident">get</span>(<span class="ident">path</span>)
}
<span class="doccomment">/// Create file map: map original path to modified paths</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">add</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">k</span>: <span class="ident">String</span>, <span class="ident">v</span>: <span class="ident">String</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">map</span>.<span class="ident">contains_key</span>(<span class="kw-2">&amp;</span><span class="ident">k</span>) {
<span class="prelude-val">Err</span>(<span class="string">&quot;key exists&quot;</span>)
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">map</span>.<span class="ident">insert</span>(<span class="ident">k</span>, <span class="ident">v</span>);
<span class="prelude-val">Ok</span>(())
}
}
<span class="doccomment">/// This crate uses compile-time environment variables to transfer</span>
<span class="doccomment">/// data to the main program. This funtction sets that variable</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">to_env</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) {
<span class="macro">println</span><span class="macro">!</span>(
<span class="string">&quot;cargo:rustc-env={}={}&quot;</span>,
<span class="ident">ENV_VAR_NAME</span>,
<span class="ident">serde_json</span>::<span class="ident">to_string</span>(<span class="kw-2">&amp;</span><span class="self">self</span>).<span class="ident">unwrap</span>()
);
<span class="comment">// needed for testing load()</span>
<span class="comment">// if the above statement fails(println), then something&#39;s broken</span>
<span class="comment">// with the rust compiler. So not really worried about that.</span>
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
<span class="ident">env</span>::<span class="ident">set_var</span>(<span class="ident">ENV_VAR_NAME</span>, <span class="ident">serde_json</span>::<span class="ident">to_string</span>(<span class="kw-2">&amp;</span><span class="self">self</span>).<span class="ident">unwrap</span>());
}
<span class="doccomment">/// Load filemap in main program. Should be called from main program</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">load</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="kw">let</span> <span class="ident">env</span> <span class="op">=</span> <span class="ident">env</span>::<span class="ident">var</span>(<span class="ident">ENV_VAR_NAME</span>)
.<span class="ident">expect</span>(<span class="string">&quot;unable to read env var, might be a bug in lib. Please report on GitHub&quot;</span>);
<span class="kw">let</span> <span class="ident">res</span>: <span class="ident">Files</span> <span class="op">=</span> <span class="ident">serde_json</span>::<span class="ident">from_str</span>(<span class="kw-2">&amp;</span><span class="ident">env</span>).<span class="ident">unwrap</span>();
<span class="ident">res</span>
}
}
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
@ -342,8 +248,9 @@
.<span class="ident">build</span>()
.<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">new</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">get_full_path_runner</span>(<span class="string">&quot;./dist/log-out.svg&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">files</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">get_full_path_runner</span>(
<span class="string">&quot;./dist/a/b/c/d/s/d/svg/credit-card.svg&quot;</span>,
@ -366,35 +273,6 @@
}
}
<span class="attribute">#[<span class="ident">test</span>]</span>
<span class="kw">fn</span> <span class="ident">load_works</span>() {
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">mime</span>::<span class="ident">IMAGE_PNG</span>,
<span class="ident">mime</span>::<span class="ident">IMAGE_SVG</span>,
<span class="ident">mime</span>::<span class="ident">IMAGE_JPEG</span>,
<span class="ident">mime</span>::<span class="ident">IMAGE_GIF</span>,
];
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder</span>::<span class="ident">default</span>()
.<span class="ident">source</span>(<span class="string">&quot;./dist&quot;</span>)
.<span class="ident">result</span>(<span class="string">&quot;/tmp/prod3&quot;</span>)
.<span class="ident">mime_types</span>(<span class="ident">types</span>)
.<span class="ident">copy</span>(<span class="bool-val">true</span>)
.<span class="ident">follow_links</span>(<span class="bool-val">true</span>)
.<span class="ident">build</span>()
.<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
<span class="ident">files</span>.<span class="ident">to_env</span>();
<span class="kw">let</span> <span class="ident">x</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">load</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">files</span>, <span class="ident">x</span>);
<span class="ident">cleanup</span>(<span class="kw-2">&amp;</span><span class="ident">config</span>);
}
<span class="attribute">#[<span class="ident">test</span>]</span>
<span class="kw">fn</span> <span class="ident">get_works</span>() {
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
@ -413,7 +291,9 @@
.<span class="ident">build</span>()
.<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">new</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">get_runner</span>(<span class="string">&quot;./dist/log-out.svg&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">files</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">get_runner</span>(<span class="string">&quot;./dist/a/b/c/d/s/d/svg/credit-card.svg&quot;</span>, <span class="kw-2">&amp;</span><span class="ident">files</span>));

View file

@ -38,6 +38,9 @@
<span id="35">35</span>
<span id="36">36</span>
<span id="37">37</span>
<span id="38">38</span>
<span id="39">39</span>
<span id="40">40</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">/*
* Copyright (C) 2021 Aravinth Manivannan &lt;realaravinth@batsense.net&gt;
@ -76,6 +79,9 @@
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">processor</span>::<span class="ident">BusterBuilder</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">filemap</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">filemap</span>::<span class="ident">Files</span>;
<span class="doccomment">/// env var to which filemap is written during compilation</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">ENV_VAR_NAME</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;CACHE_BUSTER_FILE_MAP&quot;</span>;
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="cache_buster"></div>
<script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>

View file

@ -299,6 +299,66 @@
<span id="296">296</span>
<span id="297">297</span>
<span id="298">298</span>
<span id="299">299</span>
<span id="300">300</span>
<span id="301">301</span>
<span id="302">302</span>
<span id="303">303</span>
<span id="304">304</span>
<span id="305">305</span>
<span id="306">306</span>
<span id="307">307</span>
<span id="308">308</span>
<span id="309">309</span>
<span id="310">310</span>
<span id="311">311</span>
<span id="312">312</span>
<span id="313">313</span>
<span id="314">314</span>
<span id="315">315</span>
<span id="316">316</span>
<span id="317">317</span>
<span id="318">318</span>
<span id="319">319</span>
<span id="320">320</span>
<span id="321">321</span>
<span id="322">322</span>
<span id="323">323</span>
<span id="324">324</span>
<span id="325">325</span>
<span id="326">326</span>
<span id="327">327</span>
<span id="328">328</span>
<span id="329">329</span>
<span id="330">330</span>
<span id="331">331</span>
<span id="332">332</span>
<span id="333">333</span>
<span id="334">334</span>
<span id="335">335</span>
<span id="336">336</span>
<span id="337">337</span>
<span id="338">338</span>
<span id="339">339</span>
<span id="340">340</span>
<span id="341">341</span>
<span id="342">342</span>
<span id="343">343</span>
<span id="344">344</span>
<span id="345">345</span>
<span id="346">346</span>
<span id="347">347</span>
<span id="348">348</span>
<span id="349">349</span>
<span id="350">350</span>
<span id="351">351</span>
<span id="352">352</span>
<span id="353">353</span>
<span id="354">354</span>
<span id="355">355</span>
<span id="356">356</span>
<span id="357">357</span>
<span id="358">358</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">/*
* Copyright (C) 2021 Aravinth Manivannan &lt;realaravinth@batsense.net&gt;
@ -340,14 +400,16 @@
<span class="doccomment">//! There&#39;s a runtime component to this library which will let you read modified</span>
<span class="doccomment">//! filenames from within your program. See [Files]</span>
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Error</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;
<span class="kw">use</span> <span class="ident">std</span>::{<span class="ident">fs</span>, <span class="ident">path</span>::<span class="ident">PathBuf</span>};
<span class="kw">use</span> <span class="ident">derive_builder</span>::<span class="ident">Builder</span>;
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
<span class="kw">use</span> <span class="ident">walkdir</span>::<span class="ident">WalkDir</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">Files</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">ENV_VAR_NAME</span>;
<span class="doccomment">/// Configuration for setting up cache-busting</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Builder</span>)]</span>
@ -395,7 +457,7 @@
<span class="doccomment">/// Otherwise, use [process][Self::process]</span>
<span class="doccomment">///</span>
<span class="doccomment">/// Note: it omits processing uncommon MIME types</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">try_process</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Files</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">try_process</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">init</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">file_map</span>: <span class="ident">Files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">new</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">result</span>);
<span class="kw">for</span> <span class="ident">entry</span> <span class="kw">in</span> <span class="ident">WalkDir</span>::<span class="ident">new</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">source</span>)
@ -428,15 +490,15 @@
}
}
}
<span class="prelude-val">Ok</span>(<span class="ident">file_map</span>)
<span class="ident">file_map</span>.<span class="ident">to_env</span>();
<span class="prelude-val">Ok</span>(())
}
<span class="doccomment">/// Processes files.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// If MIME types are common, then use this funtion</span>
<span class="doccomment">/// as it will panic when a weird MIM is encountered.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">process</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Files</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">process</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="comment">// panics when mimetypes are detected. This way you&#39;ll know which files are ignored</span>
<span class="comment">// from processing</span>
@ -477,7 +539,8 @@
}
}
<span class="prelude-val">Ok</span>(<span class="ident">file_map</span>)
<span class="ident">file_map</span>.<span class="ident">to_env</span>();
<span class="prelude-val">Ok</span>(())
}
<span class="comment">// helper fn to read file to string</span>
@ -531,6 +594,61 @@
}
}
<span class="doccomment">/// Filemap struct</span>
<span class="doccomment">///</span>
<span class="doccomment">/// maps original names to generated names</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Clone</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>)]</span>
<span class="kw">struct</span> <span class="ident">Files</span> {
<span class="doccomment">/// filemap&lt;original-path, modified-path&gt;</span>
<span class="kw">pub</span> <span class="ident">map</span>: <span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">String</span>, <span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">base_dir</span>: <span class="ident">String</span>,
}
<span class="kw">impl</span> <span class="ident">Files</span> {
<span class="doccomment">/// Initialize map</span>
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">base_dir</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="ident">Files</span> {
<span class="ident">map</span>: <span class="ident">HashMap</span>::<span class="ident">default</span>(),
<span class="ident">base_dir</span>: <span class="ident">base_dir</span>.<span class="ident">into</span>(),
}
}
<span class="doccomment">/// Create file map: map original path to modified paths</span>
<span class="kw">fn</span> <span class="ident">add</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">k</span>: <span class="ident">String</span>, <span class="ident">v</span>: <span class="ident">String</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">map</span>.<span class="ident">contains_key</span>(<span class="kw-2">&amp;</span><span class="ident">k</span>) {
<span class="prelude-val">Err</span>(<span class="string">&quot;key exists&quot;</span>)
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">map</span>.<span class="ident">insert</span>(<span class="ident">k</span>, <span class="ident">v</span>);
<span class="prelude-val">Ok</span>(())
}
}
<span class="doccomment">/// This crate uses compile-time environment variables to transfer</span>
<span class="doccomment">/// data to the main program. This funtction sets that variable</span>
<span class="kw">fn</span> <span class="ident">to_env</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) {
<span class="macro">println</span><span class="macro">!</span>(
<span class="string">&quot;cargo:rustc-env={}={}&quot;</span>,
<span class="ident">ENV_VAR_NAME</span>,
<span class="ident">serde_json</span>::<span class="ident">to_string</span>(<span class="kw-2">&amp;</span><span class="self">self</span>).<span class="ident">unwrap</span>()
);
<span class="comment">// needed for testing load()</span>
<span class="comment">// if the above statement fails(println), then something&#39;s broken</span>
<span class="comment">// with the rust compiler. So not really worried about that.</span>
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
<span class="ident">std</span>::<span class="ident">env</span>::<span class="ident">set_var</span>(<span class="ident">ENV_VAR_NAME</span>, <span class="ident">serde_json</span>::<span class="ident">to_string</span>(<span class="kw-2">&amp;</span><span class="self">self</span>).<span class="ident">unwrap</span>());
}
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
<span class="doccomment">/// Load filemap in main program. Should be called from main program</span>
<span class="kw">fn</span> <span class="ident">load</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="kw">let</span> <span class="ident">env</span> <span class="op">=</span> <span class="ident">std</span>::<span class="ident">env</span>::<span class="ident">var</span>(<span class="ident">ENV_VAR_NAME</span>)
.<span class="ident">expect</span>(<span class="string">&quot;unable to read env var, might be a bug in lib. Please report on GitHub&quot;</span>);
<span class="kw">let</span> <span class="ident">res</span>: <span class="ident">Files</span> <span class="op">=</span> <span class="ident">serde_json</span>::<span class="ident">from_str</span>(<span class="kw-2">&amp;</span><span class="ident">env</span>).<span class="ident">unwrap</span>();
<span class="ident">res</span>
}
}
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">tests</span> {
<span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>;
@ -553,7 +671,8 @@
.<span class="ident">build</span>()
.<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">load</span>();
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v</span>) <span class="kw">in</span> <span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">drain</span>() {
<span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="kw-2">&amp;</span><span class="ident">k</span>);
@ -582,7 +701,8 @@
.<span class="ident">build</span>()
.<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">config</span>.<span class="ident">try_process</span>().<span class="ident">unwrap</span>();
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files</span>::<span class="ident">load</span>();
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v</span>) <span class="kw">in</span> <span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">drain</span>() {
<span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="kw-2">&amp;</span><span class="ident">k</span>);