Deploying to gh-pages from @ 209682b33c
🚀
This commit is contained in:
parent
91e52587f0
commit
149281df5d
13 changed files with 128 additions and 156 deletions
|
@ -7,10 +7,10 @@
|
|||
<li>create filemap</li>
|
||||
</ol>
|
||||
</div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.__private_field" class="structfield small-section-header"><a href="#structfield.__private_field" class="anchor field"></a><code>__private_field: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span><h2 id="deref-methods" class="small-section-header">Methods from <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>><a href="#deref-methods" class="anchor"></a></h2><div class="impl-items"><h4 id="method.get" class="method"><code>pub fn <a href="#method.get" class="fnname">get</a>(&'a self, path: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code><a href="#method.get" class="anchor"></a><a class="srclink" href="../src/cache_buster/filemap.rs.html#45" title="goto source code">[src]</a></h4><div class="docblock"><p>Get relative file path</p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.__private_field" class="structfield small-section-header"><a href="#structfield.__private_field" class="anchor field"></a><code>__private_field: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span><h2 id="deref-methods" class="small-section-header">Methods from <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="struct" href="../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>><a href="#deref-methods" class="anchor"></a></h2><div class="impl-items"><h4 id="method.get" class="method"><code>pub fn <a href="#method.get" class="fnname">get</a>(&'a self, path: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code><a href="#method.get" class="anchor"></a><a class="srclink" href="../src/cache_buster/filemap.rs.html#43" 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>(&'a self, path: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a href="#method.get_full_path" class="anchor"></a><a class="srclink" href="../src/cache_buster/filemap.rs.html#58" title="goto source code">[src]</a></h4><div class="docblock"><p>Get file path</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>(&'a self, path: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a href="#method.get_full_path" class="anchor"></a><a class="srclink" href="../src/cache_buster/filemap.rs.html#56" 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></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Deref" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.FILES.html" title="struct actix_web::FILES">FILES</a></code><a href="#impl-Deref" class="anchor"></a><a class="srclink" href="../src/actix_web/main.rs.html#18-25" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="associatedtype.Target" class="type trait-impl"><code>type <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" class="type">Target</a> = <a class="struct" href="../cache_buster/filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#associatedtype.Target" class="anchor"></a></h4><div class='docblock'><p>The resulting type after dereferencing.</p>
|
||||
|
|
|
@ -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="file to which filemap is written during compilation include this to `.gitignore`"><meta name="keywords" content="rust, rustlang, rust-lang, CACHE_BUSTER_DATA_FILE"><title>CACHE_BUSTER_DATA_FILE in 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><script src="../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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="CACHE_BUSTER_DATA_FILE" 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" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" height="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="">CACHE_BUSTER_DATA_FILE</a><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../src/cache_buster/lib.rs.html#76" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const CACHE_BUSTER_DATA_FILE: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "./src/cache_buster_data.json";</pre><div class="docblock"><p>file to which filemap is written during compilation
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="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="">CACHE_BUSTER_DATA_FILE</a><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../src/cache_buster/lib.rs.html#72" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const CACHE_BUSTER_DATA_FILE: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "./src/cache_buster_data.json";</pre><div class="docblock"><p>file to which filemap is written during compilation
|
||||
include this to <code>.gitignore</code></p>
|
||||
</div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="cache_buster" data-search-index-js="../search-index.js" data-search-js="../search.js"></div>
|
||||
<script src="../main.js"></script></body></html>
|
|
@ -1,16 +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="Module describing runtime compoenet for fetching modified filenames"><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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/filemap.rs.html#7-167" 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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/filemap.rs.html#7-165" 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::Files</span>;
|
||||
<span class="kw">use</span> <span class="ident">cache_buster::CACHE_BUSTER_DATA_FILE</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::new</span>(<span class="ident">CACHE_BUSTER_DATA_FILE</span>);
|
||||
}</pre></div>
|
||||
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::new</span>(<span class="ident">CACHE_BUSTER_DATA_FILE</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>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="cache_buster" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<!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="Filemap struct"><meta name="keywords" content="rust, rustlang, rust-lang, Files"><title>Files in 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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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<'de></a><a href="#impl-PartialEq%3CFiles%3E">PartialEq<Files></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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/filemap.rs.html#28-32" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Files { /* fields omitted */ }</pre></div><div class="docblock"><p>Filemap struct</p>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/filemap.rs.html#26-30" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><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="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="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#34-61" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(map: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#36-39" 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><'a>(&'a self, path: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code><a href="#method.get" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#45-52" title="goto source code">[src]</a></h4><div class="docblock"><p>Get relative file path</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="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#32-59" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(map: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><a href="#method.new" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#34-37" 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><'a>(&'a self, path: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code><a href="#method.get" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#43-50" 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="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><'a>(&'a self, path: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a href="#method.get_full_path" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#58-60" title="goto source code">[src]</a></h4><div class="docblock"><p>Get file path</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><'a>(&'a self, path: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a href="#method.get_full_path" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#56-58" 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="struct.Files.html#method.get" title="Self::get">get</a>.</p>
|
||||
</div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><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="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#27" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" 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></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><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="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#25" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" 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 trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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="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#27" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.deserialize" class="method hidden trait-impl"><code>fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a href="#method.deserialize" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-PartialEq%3CFiles%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>> for <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-PartialEq%3CFiles%3E" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.eq" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><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="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#25" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.deserialize" class="method hidden trait-impl"><code>fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="type" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><a href="#method.deserialize" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-PartialEq%3CFiles%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>> for <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-PartialEq%3CFiles%3E" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.eq" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.eq" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.ne" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.serialize" class="method hidden trait-impl"><code>fn <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a href="#method.serialize" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
</div></div></details><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#27" title="goto source code">[src]</a></h3></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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Send" class="anchor"></a></h3><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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Sync" class="anchor"></a></h3><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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Unpin" class="anchor"></a></h3><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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <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> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><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><h4 id="method.ne" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &<a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a href="#method.ne" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.serialize" class="method hidden trait-impl"><code>fn <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a><__S>(&self, __serializer: __S) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><__S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>> <span class="where fmt-newline">where<br> __S: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>, </span></code><a href="#method.serialize" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.126/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
|
||||
</div></div></details><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/cache_buster/filemap.rs.html#25" title="goto source code">[src]</a></h3></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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Send" class="anchor"></a></h3><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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Sync" class="anchor"></a></h3><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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-Unpin" class="anchor"></a></h3><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="struct.Files.html" title="struct cache_buster::filemap::Files">Files</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <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> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" 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>
|
||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-548" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a href="#method.from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
|
|
|
@ -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="What is cache busting?"><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><script src="../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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.2.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><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><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" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../src/cache_buster/lib.rs.html#7-76" title="goto source code">[src]</a></span></h1><div class="docblock"><h1 id="what-is-cache-busting" class="section-header"><a href="#what-is-cache-busting">What is cache busting?</a></h1>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../src/cache_buster/lib.rs.html#7-72" title="goto source code">[src]</a></span></h1><div class="docblock"><h1 id="what-is-cache-busting" class="section-header"><a href="#what-is-cache-busting">What is cache busting?</a></h1>
|
||||
<p>To optimise network load time, browsers cache static files. Caching
|
||||
greatly improves performance but how do you inform browsers to
|
||||
invalidate cache when your files have changed?</p>
|
||||
|
@ -21,17 +21,16 @@ a file that it doesn’t have. Pretty neat, isn’t it?</p>
|
|||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
<span class="kw">use</span> <span class="ident">cache_buster::BusterBuilder</span>;
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">main</span>() {
|
||||
<span class="comment">// note: add error checking yourself.</span>
|
||||
<span class="comment">// println!("cargo:rustc-env=GIT_process={}", git_process);</span>
|
||||
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
<span class="comment">// note: add error checking yourself.</span>
|
||||
<span class="comment">// println!("cargo:rustc-env=GIT_process={}", git_process);</span>
|
||||
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
<span class="ident">mime::IMAGE_PNG</span>,
|
||||
<span class="ident">mime::IMAGE_SVG</span>,
|
||||
<span class="ident">mime::IMAGE_JPEG</span>,
|
||||
<span class="ident">mime::IMAGE_GIF</span>,
|
||||
];
|
||||
];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder::default</span>()
|
||||
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder::default</span>()
|
||||
.<span class="ident">source</span>(<span class="string">"./dist"</span>)
|
||||
.<span class="ident">result</span>(<span class="string">"./prod"</span>)
|
||||
.<span class="ident">mime_types</span>(<span class="ident">types</span>)
|
||||
|
@ -40,8 +39,7 @@ a file that it doesn’t have. Pretty neat, isn’t it?</p>
|
|||
.<span class="ident">build</span>()
|
||||
.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
|
||||
}</pre></div>
|
||||
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();</pre></div>
|
||||
<ul>
|
||||
<li><code>main.rs</code>:</li>
|
||||
</ul>
|
||||
|
@ -52,11 +50,9 @@ a file that it doesn’t have. Pretty neat, isn’t it?</p>
|
|||
<span class="kw">use</span> <span class="ident">cache_buster::Files</span>;
|
||||
<span class="kw">use</span> <span class="ident">cache_buster::CACHE_BUSTER_DATA_FILE</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::new</span>(<span class="ident">CACHE_BUSTER_DATA_FILE</span>);
|
||||
<span class="comment">// the path to the file before setting up for cache busting</span>
|
||||
<span class="ident">files</span>.<span class="ident">get</span>(<span class="string">"./dist/github.svg"</span>);
|
||||
}</pre></div>
|
||||
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::new</span>(<span class="ident">CACHE_BUSTER_DATA_FILE</span>);
|
||||
<span class="comment">// the path to the file before setting up for cache busting</span>
|
||||
<span class="ident">files</span>.<span class="ident">get</span>(<span class="string">"./dist/github.svg"</span>);</pre></div>
|
||||
</div><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<table><tr class="import-item"><td><code>pub use processor::<a class="struct" href="processor/struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a>;</code></td><td class="docblock-short"></td></tr><tr class="import-item"><td><code>pub use filemap::<a class="struct" href="filemap/struct.Files.html" title="struct cache_buster::filemap::Files">Files</a>;</code></td><td class="docblock-short"></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>
|
||||
|
|
|
@ -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="Error type for BusterBuilder"><meta name="keywords" content="rust, rustlang, rust-lang, BusterBuilderError"><title>BusterBuilderError in 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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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<String></a><a href="#impl-From%3CUninitializedFieldError%3E">From<UninitializedFieldError></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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</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"><pre class="rust enum">#[non_exhaustive]
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</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"><pre class="rust enum">#[non_exhaustive]
|
||||
pub enum BusterBuilderError {
|
||||
UninitializedField(&'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>),
|
||||
|
@ -10,14 +10,14 @@ pub enum BusterBuilderError {
|
|||
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(&'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"><details class="rustdoc-toggle implementors-toggle" open><summary><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="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></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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="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></summary><div class="impl-items"><h4 id="method.fmt-1" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt-1" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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="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></summary><div class="impl-items"><h4 id="method.source" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source" class="fnname">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)></code><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span><a href="#method.source" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#106" 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"><details class="rustdoc-toggle implementors-toggle" open><summary><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="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></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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="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></summary><div class="impl-items"><h4 id="method.fmt-1" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt-1" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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="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></summary><div class="impl-items"><h4 id="method.source" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source" class="fnname">source</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)></code><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span><a href="#method.source" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#106" 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 trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.backtrace" class="fnname">backtrace</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="https://doc.rust-lang.org/nightly/std/backtrace/struct.Backtrace.html" title="struct std::backtrace::Backtrace">Backtrace</a>></code><a href="#method.backtrace" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#134" 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 trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description" class="fnname">description</a>(&self) -> &<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 href="#method.description" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#146" 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 trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause" class="fnname">cause</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>></code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.cause" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#156" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="enum" href="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></summary><div class="impl-items"><h4 id="method.from-1" class="method hidden trait-impl"><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>) -> Self</code><a href="#method.from-1" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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><UninitializedFieldError> for <a class="enum" href="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></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(s: UninitializedFieldError) -> Self</code><a href="#method.from" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="enum" href="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></summary><div class="impl-items"><h4 id="method.from-1" class="method hidden trait-impl"><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>) -> Self</code><a href="#method.from-1" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><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><UninitializedFieldError> for <a class="enum" href="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></summary><div class="impl-items"><h4 id="method.from" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(s: UninitializedFieldError) -> Self</code><a href="#method.from" class="anchor"></a><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></details></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="enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><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="enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Send" class="anchor"></a></h3><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="enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Sync" class="anchor"></a></h3><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="enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-Unpin" class="anchor"></a></h3><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="enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <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> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" 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>
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Module describing file processor that changes filenames to setup cache-busting"><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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#8-405" 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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#8-401" 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">
|
||||
<span class="kw">use</span> <span class="ident">cache_buster::BusterBuilder</span>;
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">main</span>() {
|
||||
<span class="comment">// note: add error checking yourself.</span>
|
||||
<span class="comment">// println!("cargo:rustc-env=GIT_process={}", git_process);</span>
|
||||
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
<span class="comment">// note: add error checking yourself.</span>
|
||||
<span class="comment">// println!("cargo:rustc-env=GIT_process={}", git_process);</span>
|
||||
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
<span class="ident">mime::IMAGE_PNG</span>,
|
||||
<span class="ident">mime::IMAGE_SVG</span>,
|
||||
<span class="ident">mime::IMAGE_JPEG</span>,
|
||||
<span class="ident">mime::IMAGE_GIF</span>,
|
||||
];
|
||||
];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder::default</span>()
|
||||
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder::default</span>()
|
||||
.<span class="ident">source</span>(<span class="string">"./dist"</span>)
|
||||
.<span class="ident">result</span>(<span class="string">"./prod"</span>)
|
||||
.<span class="ident">mime_types</span>(<span class="ident">types</span>)
|
||||
|
@ -26,8 +25,7 @@
|
|||
.<span class="ident">build</span>()
|
||||
.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
|
||||
}</pre></div>
|
||||
<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 [Files]</p>
|
||||
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<!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="Configuration for setting up cache-busting"><meta name="keywords" content="rust, rustlang, rust-lang, Buster"><title>Buster in 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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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></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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#55-76" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Buster<'a> { /* 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><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#94-226" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.process" class="method"><code>pub fn <a href="#method.process" class="fnname">process</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<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>></code><a href="#method.process" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#118-161" 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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#53-74" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct">pub struct Buster<'a> { /* 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><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#92-222" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.process" class="method"><code>pub fn <a href="#method.process" class="fnname">process</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<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>></code><a href="#method.process" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#116-159" title="goto source code">[src]</a></h4><div class="docblock"><p>Processes files.</p>
|
||||
<p>Panics when a weird MIME is encountered.</p>
|
||||
</div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'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></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#method.clone" class="anchor"></a><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></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'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></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#method.clone" class="anchor"></a><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><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'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></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Debug" class="impl"><code class="in-band">impl<'a> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'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></summary><div class="impl-items"><h4 id="method.fmt" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a href="#method.fmt" class="anchor"></a><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></details></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> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#impl-Send" class="anchor"></a></h3><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#impl-Sync" class="anchor"></a></h3><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#impl-Unpin" class="anchor"></a></h3><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <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="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <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> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" 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>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Builder for `Buster`."><meta name="keywords" content="rust, rustlang, rust-lang, BusterBuilder"><title>BusterBuilder in 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><script src="../../crates.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 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</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.no_hash">no_hash</a><a href="#method.prefix">prefix</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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><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" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</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"><pre class="rust struct">pub struct BusterBuilder<'a> { /* 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><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'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></summary><div class="impl-items"><h4 id="method.source" class="method"><code>pub fn <a href="#method.source" class="fnname">source</a><VALUE: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(&mut self, value: VALUE) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.source" class="anchor"></a><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>(&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><<a class="struct" href="https://docs.rs/mime/0.3.16/mime/struct.Mime.html" title="struct mime::Mime">Mime</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.mime_types" class="anchor"></a><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><VALUE: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(&mut self, value: VALUE) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.result" class="anchor"></a><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.prefix" class="method"><code>pub fn <a href="#method.prefix" class="fnname">prefix</a><VALUE: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(&mut self, value: VALUE) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.prefix" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class="docblock"><p>route prefixes</p>
|
||||
</div><h4 id="method.copy" class="method"><code>pub fn <a href="#method.copy" class="fnname">copy</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.copy" class="anchor"></a><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>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.follow_links" class="anchor"></a><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.no_hash" class="method"><code>pub fn <a href="#method.no_hash" class="fnname">no_hash</a>(&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><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.no_hash" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#53" title="goto source code">[src]</a></h4><div class="docblock"><p>exclude these files for hashing.
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="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><button id="copy-path" onclick="copy_path(this)">⎘</button></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">−</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"><pre class="rust struct">pub struct BusterBuilder<'a> { /* 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><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl" class="impl"><code class="in-band">impl<'a> <a class="struct" href="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'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></summary><div class="impl-items"><h4 id="method.source" class="method"><code>pub fn <a href="#method.source" class="fnname">source</a><VALUE: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(&mut self, value: VALUE) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.source" class="anchor"></a><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>(&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><<a class="struct" href="https://docs.rs/mime/0.3.16/mime/struct.Mime.html" title="struct mime::Mime">Mime</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.mime_types" class="anchor"></a><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><VALUE: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(&mut self, value: VALUE) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.result" class="anchor"></a><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.prefix" class="method"><code>pub fn <a href="#method.prefix" class="fnname">prefix</a><VALUE: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>>(&mut self, value: VALUE) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.prefix" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class="docblock"><p>route prefixes</p>
|
||||
</div><h4 id="method.copy" class="method"><code>pub fn <a href="#method.copy" class="fnname">copy</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.copy" class="anchor"></a><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>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.follow_links" class="anchor"></a><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.no_hash" class="method"><code>pub fn <a href="#method.no_hash" class="fnname">no_hash</a>(&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><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self</code><a href="#method.no_hash" class="anchor"></a><a class="srclink" href="../../src/cache_buster/processor.rs.html#51" title="goto source code">[src]</a></h4><div class="docblock"><p>exclude these files for hashing.
|
||||
They will be copied over without including a hash in the filename
|
||||
Path should be relative to [self.source]</p>
|
||||
</div><h4 id="method.build" class="method"><code>pub fn <a href="#method.build" class="fnname">build</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a>, <a class="enum" href="enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a>></code><a href="#method.build" class="anchor"></a><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>
|
||||
</div><h4 id="method.build" class="method"><code>pub fn <a href="#method.build" class="fnname">build</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Buster.html" title="struct cache_buster::processor::Buster">Buster</a><'a>, <a class="enum" href="enum.BusterBuilderError.html" title="enum cache_buster::processor::BusterBuilderError">BusterBuilderError</a>></code><a href="#method.build" class="anchor"></a><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>
|
||||
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
|
||||
<p>If a required field has not been initialized.</p>
|
||||
</div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'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></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'a></code><a href="#method.clone" class="anchor"></a><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></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Clone" class="impl"><code class="in-band">impl<'a> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'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></summary><div class="impl-items"><h4 id="method.clone" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'a></code><a href="#method.clone" class="anchor"></a><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><h4 id="method.clone_from" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Default" class="impl"><code class="in-band">impl<'a> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'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></summary><div class="impl-items"><h4 id="method.default" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> Self</code><a href="#method.default" class="anchor"></a><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 “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Default" class="impl"><code class="in-band">impl<'a> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'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></summary><div class="impl-items"><h4 id="method.default" class="method hidden trait-impl"><code>fn <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> Self</code><a href="#method.default" class="anchor"></a><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 “default value” for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></div></details></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> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><h3 id="impl-Send" class="impl"><code class="in-band">impl<'a> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'a></code><a href="#impl-Send" class="anchor"></a></h3><h3 id="impl-Sync" class="impl"><code class="in-band">impl<'a> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'a></code><a href="#impl-Sync" class="anchor"></a></h3><h3 id="impl-Unpin" class="impl"><code class="in-band">impl<'a> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'a></code><a href="#impl-Unpin" class="anchor"></a></h3><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl<'a> <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="struct.BusterBuilder.html" title="struct cache_buster::processor::BusterBuilder">BusterBuilder</a><'a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <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> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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></summary><div class="impl-items"><h4 id="method.type_id" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a href="#method.type_id" class="anchor"></a><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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#208-213" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a href="#method.borrow" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" 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></details><details class="rustdoc-toggle implementors-toggle" open><summary><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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#216-220" title="goto source code">[src]</a></h3></summary><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden trait-impl"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#method.borrow_mut" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" 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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var searchIndex = JSON.parse('{\
|
||||
"actix_web":{"doc":"","t":[3,17,3,3,3,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,11,11,11,11,11,11,11,11,11,11,11,5,5,0,11,11,11,11,11,11,11,11,11,11,11,11,11,5,11,11,11,3,5,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5],"n":["Asset","CACHE_AGE","FILES","Favicons","INDEX","__private_field","__private_field","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","deref","deref","favicons","from","from","from","from","from","from","from","get","get","get","get","handle_assets","handle_favicons","index","initialize","initialize","into","into","into","into","into","into","into","iter","iter","iter","iter","main","register","register","register","serve_index","services","static_files","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","vzip","get_index"],"q":["actix_web","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web::index"],"d":["Embed files. Or not. You can also read files dynamically","Set a riddicolusly high cache age","create filemap","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,0,0,1,2,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,0,1,2,3,4,5,6,7,3,3,6,6,0,0,0,1,2,1,2,3,4,5,6,7,3,3,6,6,0,4,5,7,0,0,0,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,0],"f":[null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["files",3]],[[],["string",3]],null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["str",15]],[["option",4],["cow",4]]],[[["str",15]],[["option",4],["cow",4]]],[[["str",15]],[["option",4],["cow",4]]],[[["str",15]],[["option",4],["cow",4]]],[[["str",15]],["httpresponse",3]],[[["str",15]],["httpresponse",3]],null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["filenames",4]],[[],["filenames",4]],[[]],[[],["result",6]],[[["appservice",3]]],[[["appservice",3]]],[[["appservice",3]]],null,[[["serviceconfig",3]]],null,[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["string",3]]],"p":[[3,"FILES"],[3,"INDEX"],[3,"Asset"],[3,"static_files"],[3,"serve_index"],[3,"Favicons"],[3,"favicons"]]},\
|
||||
"cache_buster":{"doc":"What is cache busting?","t":[17,0,0,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,4,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["CACHE_BUSTER_DATA_FILE","filemap","processor","Files","borrow","borrow_mut","clone","clone_into","deserialize","eq","fmt","from","get","get_full_path","into","ne","new","serialize","to_owned","try_from","try_into","type_id","Buster","BusterBuilder","BusterBuilderError","UninitializedField","ValidationError","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","build","clone","clone","clone_into","clone_into","copy","default","fmt","fmt","fmt","follow_links","from","from","from","from","from","into","into","into","mime_types","no_hash","prefix","process","result","source","to_owned","to_owned","to_string","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id"],"q":["cache_buster","","","cache_buster::filemap","","","","","","","","","","","","","","","","","","","cache_buster::processor","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["file to which filemap is written during compilation …","Module describing runtime compoenet for fetching modified …","Module describing file processor that changes filenames …","Filemap struct","","","","","","","","","Get relative file path","Get file path","","","Load filemap in main program. Should be called from main …","","","","","","Configuration for setting up cache-busting","Builder for <code>Buster</code>.","Error type for BusterBuilder","Uninitialized field","Custom validation error","","","","","","","Builds a new <code>Buster</code>.","","","","","copy other non-hashed files from source dire to result …","","","","","follow symlinks?","","","","","","","","","mime_types for hashing","exclude these files for hashing. They will be copied over …","route prefixes","Processes files.","directory for writing results","source directory","","","","","","","","","","","",""],"i":[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,2,2,3,2,4,3,2,4,3,3,4,3,4,3,3,2,2,4,3,3,2,2,2,4,3,2,4,3,3,3,4,3,3,3,4,2,3,2,4,3,2,4,3,2,4],"f":[null,null,null,null,[[]],[[]],[[],["files",3]],[[]],[[],["result",4]],[[["files",3]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[["str",15]],[["str",15],["option",4]]],[[["str",15]],[["option",4],["string",3]]],[[]],[[["files",3]],["bool",15]],[[["str",15]]],[[],["result",4]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[],[["result",4],["buster",3],["busterbuildererror",4]]],[[],["busterbuilder",3]],[[],["buster",3]],[[]],[[]],[[["bool",15]]],[[]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["bool",15]]],[[]],[[["uninitializedfielderror",3]]],[[]],[[["string",3]]],[[]],[[]],[[]],[[]],[[["mime",3],["vec",3]]],[[["vec",3],["str",15]]],[[["into",8],["string",3]]],[[],[["result",4],["error",3]]],[[["into",8],["string",3]]],[[["into",8],["string",3]]],[[]],[[]],[[],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[3,"Files"],[4,"BusterBuilderError"],[3,"BusterBuilder"],[3,"Buster"]]}\
|
||||
"cache_buster":{"doc":"What is cache busting?","t":[17,0,0,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,4,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["CACHE_BUSTER_DATA_FILE","filemap","processor","Files","borrow","borrow_mut","clone","clone_into","deserialize","eq","fmt","from","get","get_full_path","into","ne","new","serialize","to_owned","try_from","try_into","type_id","Buster","BusterBuilder","BusterBuilderError","UninitializedField","ValidationError","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","build","clone","clone","clone_into","clone_into","copy","default","fmt","fmt","fmt","follow_links","from","from","from","from","from","into","into","into","mime_types","no_hash","prefix","process","result","source","to_owned","to_owned","to_string","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id"],"q":["cache_buster","","","cache_buster::filemap","","","","","","","","","","","","","","","","","","","cache_buster::processor","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["file to which filemap is written during compilation …","Module describing runtime compoenet for fetching modified …","Module describing file processor that changes filenames …","Filemap struct","","","","","","","","","Get relative file path","Get file path","","","Load filemap in main program. Should be called from main …","","","","","","Configuration for setting up cache-busting","Builder for <code>Buster</code>.","Error type for BusterBuilder","Uninitialized field","Custom validation error","","","","","","","Builds a new <code>Buster</code>.","","","","","copy other non-hashed files from source dire to result …","","","","","follow symlinks?","","","","","","","","","mime_types for hashing","exclude these files for hashing. They will be copied over …","route prefixes","Processes files.","directory for writing results","source directory","","","","","","","","","","","",""],"i":[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,2,2,3,2,4,3,2,4,3,3,4,3,4,3,3,2,2,4,3,3,2,2,2,4,3,2,4,3,3,3,4,3,3,3,4,2,3,2,4,3,2,4,3,2,4],"f":[null,null,null,null,[[]],[[]],[[],["files",3]],[[]],[[],["result",4]],[[["files",3]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[["str",15]],[["option",4],["str",15]]],[[["str",15]],[["option",4],["string",3]]],[[]],[[["files",3]],["bool",15]],[[["str",15]]],[[],["result",4]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[],[["busterbuildererror",4],["result",4],["buster",3]]],[[],["busterbuilder",3]],[[],["buster",3]],[[]],[[]],[[["bool",15]]],[[]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["bool",15]]],[[]],[[["uninitializedfielderror",3]]],[[]],[[["string",3]]],[[]],[[]],[[]],[[]],[[["vec",3],["mime",3]]],[[["vec",3],["str",15]]],[[["into",8],["string",3]]],[[],[["result",4],["error",3]]],[[["into",8],["string",3]]],[[["into",8],["string",3]]],[[]],[[]],[[],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[3,"Files"],[4,"BusterBuilderError"],[3,"BusterBuilder"],[3,"Buster"]]}\
|
||||
}');
|
||||
if (window.initSearch) {window.initSearch(searchIndex)};
|
|
@ -166,8 +166,6 @@
|
|||
<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>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="comment">/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
|
@ -183,9 +181,7 @@
|
|||
<span class="doccomment">//! use cache_buster::Files;</span>
|
||||
<span class="doccomment">//! use cache_buster::CACHE_BUSTER_DATA_FILE;</span>
|
||||
<span class="doccomment">//!</span>
|
||||
<span class="doccomment">//! fn main(){</span>
|
||||
<span class="doccomment">//! let files = Files::new(CACHE_BUSTER_DATA_FILE);</span>
|
||||
<span class="doccomment">//! }</span>
|
||||
<span class="doccomment">//! ```</span>
|
||||
|
||||
<span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
|
||||
|
|
|
@ -73,10 +73,6 @@
|
|||
<span id="70">70</span>
|
||||
<span id="71">71</span>
|
||||
<span id="72">72</span>
|
||||
<span id="73">73</span>
|
||||
<span id="74">74</span>
|
||||
<span id="75">75</span>
|
||||
<span id="76">76</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="comment">/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
|
@ -107,7 +103,6 @@
|
|||
<span class="doccomment">//! ```no_run</span>
|
||||
<span class="doccomment">//! use cache_buster::BusterBuilder;</span>
|
||||
<span class="doccomment">//!</span>
|
||||
<span class="doccomment">//! fn main() {</span>
|
||||
<span class="doccomment">//! // note: add error checking yourself.</span>
|
||||
<span class="doccomment">//! // println!("cargo:rustc-env=GIT_process={}", git_process);</span>
|
||||
<span class="doccomment">//! let types = vec![</span>
|
||||
|
@ -127,7 +122,6 @@
|
|||
<span class="doccomment">//! .unwrap();</span>
|
||||
<span class="doccomment">//!</span>
|
||||
<span class="doccomment">//! config.process().unwrap();</span>
|
||||
<span class="doccomment">//! }</span>
|
||||
<span class="doccomment">//! ```</span>
|
||||
<span class="doccomment">//! - `main.rs`:</span>
|
||||
<span class="doccomment">//!</span>
|
||||
|
@ -139,11 +133,9 @@
|
|||
<span class="doccomment">//! use cache_buster::Files;</span>
|
||||
<span class="doccomment">//! use cache_buster::CACHE_BUSTER_DATA_FILE;</span>
|
||||
<span class="doccomment">//!</span>
|
||||
<span class="doccomment">//! fn main(){</span>
|
||||
<span class="doccomment">//! let files = Files::new(CACHE_BUSTER_DATA_FILE);</span>
|
||||
<span class="doccomment">//! // the path to the file before setting up for cache busting</span>
|
||||
<span class="doccomment">//! files.get("./dist/github.svg");</span>
|
||||
<span class="doccomment">//! }</span>
|
||||
<span class="doccomment">//! ```</span>
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">processor</span>;
|
||||
|
|
|
@ -402,10 +402,6 @@
|
|||
<span id="399">399</span>
|
||||
<span id="400">400</span>
|
||||
<span id="401">401</span>
|
||||
<span id="402">402</span>
|
||||
<span id="403">403</span>
|
||||
<span id="404">404</span>
|
||||
<span id="405">405</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="comment">/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
|
@ -421,7 +417,6 @@
|
|||
<span class="doccomment">//! ```rust</span>
|
||||
<span class="doccomment">//! use cache_buster::BusterBuilder;</span>
|
||||
<span class="doccomment">//!</span>
|
||||
<span class="doccomment">//! fn main() {</span>
|
||||
<span class="doccomment">//! // note: add error checking yourself.</span>
|
||||
<span class="doccomment">//! // println!("cargo:rustc-env=GIT_process={}", git_process);</span>
|
||||
<span class="doccomment">//! let types = vec![</span>
|
||||
|
@ -441,7 +436,6 @@
|
|||
<span class="doccomment">//! .unwrap();</span>
|
||||
<span class="doccomment">//!</span>
|
||||
<span class="doccomment">//! config.process().unwrap();</span>
|
||||
<span class="doccomment">//! }</span>
|
||||
<span class="doccomment">//! ```</span>
|
||||
<span class="doccomment">//!</span>
|
||||
<span class="doccomment">//! There's a runtime component to this library which will let you read modified</span>
|
||||
|
@ -544,7 +538,7 @@
|
|||
<span class="kw">for</span> <span class="ident">mime_type</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">mime_types</span>.<span class="ident">iter</span>() {
|
||||
<span class="kw">let</span> <span class="ident">file_mime</span> <span class="op">=</span> <span class="ident">mime_guess::from_path</span>(<span class="ident">path</span>)
|
||||
.<span class="ident">first</span>()
|
||||
.<span class="ident">expect</span>(<span class="kw-2">&</span><span class="macro">format!</span>(<span class="string">"couldn't resolve MIME for file: {:?}"</span>, <span class="kw-2">&</span><span class="ident">path</span>));
|
||||
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="macro">panic!</span>(<span class="string">"couldn't resolve MIME for file: {:?}"</span>, <span class="kw-2">&</span><span class="ident">path</span>));
|
||||
<span class="kw">if</span> <span class="kw-2">&</span><span class="ident">file_mime</span> <span class="op">=</span><span class="op">=</span> <span class="ident">mime_type</span> {
|
||||
<span class="kw">let</span> <span class="ident">contents</span> <span class="op">=</span> <span class="self">Self</span><span class="ident">::read_to_string</span>(<span class="kw-2">&</span><span class="ident">path</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">hash</span> <span class="op">=</span> <span class="self">Self</span><span class="ident">::hasher</span>(<span class="kw-2">&</span><span class="ident">contents</span>);
|
||||
|
@ -586,7 +580,7 @@
|
|||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">prefix</span>) <span class="op">=</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">prefix</span> {
|
||||
<span class="comment">//panic!("{}", &prefix);</span>
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">result</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">result</span>.<span class="ident">as_str</span>();
|
||||
<span class="kw">if</span> <span class="ident">result</span>.<span class="ident">chars</span>().<span class="ident">nth</span>(<span class="number">0</span>) <span class="op">=</span><span class="op">=</span> <span class="prelude-val">Some</span>(<span class="string">'/'</span>) {
|
||||
<span class="kw">if</span> <span class="ident">result</span>.<span class="ident">starts_with</span>(<span class="string">'/'</span>) {
|
||||
<span class="ident">result</span> <span class="op">=</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">result</span>[<span class="number">1</span>..];
|
||||
}
|
||||
<span class="kw">let</span> <span class="ident">destination</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">prefix</span>)
|
||||
|
@ -594,10 +588,10 @@
|
|||
.<span class="ident">join</span>(<span class="ident">rel_location</span>)
|
||||
.<span class="ident">join</span>(<span class="ident">name</span>);
|
||||
|
||||
(<span class="ident">source</span>, <span class="ident">destination</span>.<span class="ident">into</span>())
|
||||
(<span class="ident">source</span>, <span class="ident">destination</span>)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="kw">let</span> <span class="ident">destination</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">result</span>).<span class="ident">join</span>(<span class="ident">rel_location</span>).<span class="ident">join</span>(<span class="ident">name</span>);
|
||||
(<span class="ident">source</span>, <span class="ident">destination</span>.<span class="ident">into</span>())
|
||||
(<span class="ident">source</span>, <span class="ident">destination</span>)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -620,8 +614,7 @@
|
|||
|
||||
<span class="kw">if</span> <span class="ident">entry_path</span>.<span class="ident">is_dir</span>() <span class="op">&&</span> <span class="ident">path</span> <span class="op">!</span><span class="op">=</span> <span class="ident">entry_path</span> {
|
||||
<span class="self">Self</span><span class="ident">::create_dir_structure</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">entry_path</span>)<span class="question-mark">?</span>;
|
||||
} <span class="kw">else</span> {
|
||||
<span class="kw">if</span> <span class="ident">entry_path</span>.<span class="ident">is_dir</span>() {
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">entry_path</span>.<span class="ident">is_dir</span>() {
|
||||
<span class="kw">let</span> <span class="ident">rel_location</span> <span class="op">=</span> <span class="ident">entry_path</span>.<span class="ident">strip_prefix</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">source</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">destination</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">result</span>).<span class="ident">join</span>(<span class="ident">rel_location</span>);
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="ident">destination</span>.<span class="ident">exists</span>() {
|
||||
|
@ -629,7 +622,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
}
|
||||
|
@ -654,11 +646,11 @@
|
|||
|
||||
<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">&</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">></span> <span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="kw-2">&</span><span class="lifetime">'static</span> <span class="ident">str</span><span class="op">></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">&</span><span class="ident">k</span>) {
|
||||
<span class="prelude-val">Err</span>(<span class="string">"key exists"</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="kw">if</span> <span class="kw">let</span> <span class="ident">std::collections::hash_map::Entry::Vacant</span>(<span class="ident">e</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">map</span>.<span class="ident">entry</span>(<span class="ident">k</span>) {
|
||||
<span class="ident">e</span>.<span class="ident">insert</span>(<span class="ident">v</span>);
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">Err</span>(<span class="string">"key exists"</span>)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue