Deploying to gh-pages from @ 0dad006822
🚀
This commit is contained in:
parent
057e8ef18b
commit
a308fc8af8
5 changed files with 12 additions and 10 deletions
|
@ -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="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-550" 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-551" 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">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<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#73-95" 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#117-309" 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#141-246" title="goto source code">[src]</a></h4><div class="docblock"><p>Processes files.</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#117-310" 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#142-247" 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#71" 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#71" 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>
|
||||
|
|
|
@ -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,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,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","FileExtentions","FilePaths","NoHashCategory","UninitializedField","ValidationError","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","clone","clone","clone","clone_into","clone_into","clone_into","copy","default","fmt","fmt","fmt","fmt","follow_links","from","from","from","from","from","from","into","into","into","into","mime_types","no_hash","prefix","process","result","source","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","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","vector of file extensions that should be avoided for hash …","list of file paths that should be avoided for file …","Items to avoid hash calculation.","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,0,3,3,2,4,3,5,2,4,3,5,4,2,4,5,2,4,5,4,4,2,3,3,5,4,2,4,3,3,3,5,2,4,3,5,4,4,4,5,4,4,2,4,5,3,2,4,3,5,2,4,3,5,2,4,3,5],"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]],[["string",3],["option",4]]],[[]],[[["files",3]],["bool",15]],[[["str",15]]],[[],["result",4]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[["busterbuildererror",4],["result",4],["buster",3]]],[[],["nohashcategory",4]],[[],["busterbuilder",3]],[[],["buster",3]],[[]],[[]],[[]],[[["bool",15]]],[[]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["bool",15]]],[[]],[[]],[[["uninitializedfielderror",3]]],[[]],[[["string",3]]],[[]],[[]],[[]],[[]],[[]],[[["vec",3],["into",8]]],[[["vec",3],["nohashcategory",4]]],[[["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]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[3,"Files"],[4,"NoHashCategory"],[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,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,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","FileExtentions","FilePaths","NoHashCategory","UninitializedField","ValidationError","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","clone","clone","clone","clone_into","clone_into","clone_into","copy","default","fmt","fmt","fmt","fmt","follow_links","from","from","from","from","from","from","into","into","into","into","mime_types","no_hash","prefix","process","result","source","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","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","vector of file extensions that should be avoided for hash …","list of file paths that should be avoided for file …","Items to avoid hash calculation.","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,0,3,3,2,4,3,5,2,4,3,5,4,2,4,5,2,4,5,4,4,2,3,3,5,4,2,4,3,3,3,5,2,4,3,5,4,4,4,5,4,4,2,4,5,3,2,4,3,5,2,4,3,5,2,4,3,5],"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]],[["string",3],["option",4]]],[[]],[[["files",3]],["bool",15]],[[["str",15]]],[[],["result",4]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],[["result",4],["buster",3],["busterbuildererror",4]]],[[],["nohashcategory",4]],[[],["busterbuilder",3]],[[],["buster",3]],[[]],[[]],[[]],[[["bool",15]]],[[]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["bool",15]]],[[]],[[]],[[["uninitializedfielderror",3]]],[[]],[[["string",3]]],[[]],[[]],[[]],[[]],[[]],[[["vec",3],["into",8]]],[[["vec",3],["nohashcategory",4]]],[[["string",3],["into",8]]],[[],[["result",4],["error",3]]],[[["string",3],["into",8]]],[[["string",3],["into",8]]],[[]],[[]],[[]],[[],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[3,"Files"],[4,"NoHashCategory"],[4,"BusterBuilderError"],[3,"BusterBuilder"],[3,"Buster"]]}\
|
||||
}');
|
||||
if (window.initSearch) {window.initSearch(searchIndex)};
|
|
@ -302,10 +302,10 @@
|
|||
|
||||
<span class="attribute">#[<span class="ident">actix_rt::test</span>]</span>
|
||||
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">static_assets_work</span>() {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">app</span> <span class="op">=</span> <span class="ident">test::init_service</span>(<span class="ident">App::new</span>().<span class="ident">configure</span>(<span class="ident">services</span>)).<span class="kw">await</span>;
|
||||
<span class="kw">let</span> <span class="ident">app</span> <span class="op">=</span> <span class="ident">test::init_service</span>(<span class="ident">App::new</span>().<span class="ident">configure</span>(<span class="ident">services</span>)).<span class="kw">await</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="ident">img_resp</span> <span class="op">=</span> <span class="ident">test::call_service</span>(
|
||||
<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">app</span>,
|
||||
<span class="kw-2">&</span><span class="ident">app</span>,
|
||||
<span class="ident">test::TestRequest::get</span>()
|
||||
.<span class="ident">uri</span>(
|
||||
<span class="kw-2">&</span><span class="kw">crate</span><span class="ident">::FILES</span>
|
||||
|
@ -318,7 +318,7 @@
|
|||
<span class="macro">assert_eq!</span>(<span class="ident">img_resp</span>.<span class="ident">status</span>(), <span class="ident">StatusCode::OK</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">css_resp</span> <span class="op">=</span> <span class="ident">test::call_service</span>(
|
||||
<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">app</span>,
|
||||
<span class="kw-2">&</span><span class="ident">app</span>,
|
||||
<span class="ident">test::TestRequest::get</span>()
|
||||
.<span class="ident">uri</span>(
|
||||
<span class="kw-2">&</span><span class="kw">crate</span><span class="ident">::FILES</span>
|
||||
|
@ -331,7 +331,7 @@
|
|||
<span class="macro">assert_eq!</span>(<span class="ident">css_resp</span>.<span class="ident">status</span>(), <span class="ident">StatusCode::OK</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">favicon_resp</span> <span class="op">=</span> <span class="ident">test::call_service</span>(
|
||||
<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">app</span>,
|
||||
<span class="kw-2">&</span><span class="ident">app</span>,
|
||||
<span class="ident">test::TestRequest::get</span>().<span class="ident">uri</span>(<span class="string">"/favicon.ico"</span>).<span class="ident">to_request</span>(),
|
||||
)
|
||||
.<span class="kw">await</span>;
|
||||
|
|
|
@ -551,6 +551,7 @@
|
|||
<span id="548">548</span>
|
||||
<span id="549">549</span>
|
||||
<span id="550">550</span>
|
||||
<span id="551">551</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="comment">/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
|
@ -672,6 +673,7 @@
|
|||
<span class="comment">// creates base_dir to output files to</span>
|
||||
<span class="kw">fn</span> <span class="ident">init</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span>(), <span class="ident">Error</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">res</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="macro">println!</span>(<span class="string">"cargo:rerun-if-changed={}"</span>, <span class="self">self</span>.<span class="ident">source</span>);
|
||||
<span class="kw">if</span> <span class="ident">res</span>.<span class="ident">exists</span>() {
|
||||
<span class="ident">fs::remove_dir_all</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">result</span>).<span class="ident">unwrap</span>();
|
||||
}
|
||||
|
@ -983,7 +985,7 @@
|
|||
<span class="kw">let</span> <span class="ident">source</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>);
|
||||
<span class="kw">let</span> <span class="ident">no_hash</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">file</span>);
|
||||
<span class="ident">source</span> <span class="op">=</span><span class="op">=</span> <span class="kw-2">&</span><span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="ident">file</span>)
|
||||
<span class="ident">source</span> <span class="op">=</span><span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="ident">file</span>)
|
||||
<span class="op">&&</span> <span class="ident">dest</span>.<span class="ident">exists</span>()
|
||||
<span class="op">&&</span> <span class="ident">no_hash</span>.<span class="ident">file_name</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">dest</span>.<span class="ident">file_name</span>()
|
||||
}));
|
||||
|
@ -1061,7 +1063,7 @@
|
|||
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::load</span>();
|
||||
|
||||
<span class="macro">assert!</span>(<span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span>(<span class="ident">k</span>, <span class="ident">v</span>)<span class="op">|</span> {
|
||||
<span class="macro">assert!</span>(<span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span>(<span class="ident">_k</span>, <span class="ident">v</span>)<span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>);
|
||||
<span class="ident">dest</span>.<span class="ident">extension</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">APPLICATION_WASM</span> <span class="op">&&</span> <span class="ident">dest</span>.<span class="ident">exists</span>()
|
||||
}));
|
||||
|
@ -1080,7 +1082,7 @@
|
|||
<span class="kw">let</span> <span class="ident">source</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>);
|
||||
<span class="kw">let</span> <span class="ident">no_hash</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">file</span>);
|
||||
<span class="ident">source</span> <span class="op">=</span><span class="op">=</span> <span class="kw-2">&</span><span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="ident">file</span>)
|
||||
<span class="ident">source</span> <span class="op">=</span><span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="ident">file</span>)
|
||||
<span class="op">&&</span> <span class="ident">dest</span>.<span class="ident">exists</span>()
|
||||
<span class="op">&&</span> <span class="ident">no_hash</span>.<span class="ident">file_name</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">dest</span>.<span class="ident">file_name</span>()
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue