Deploying to gh-pages from @ 874dec8180
🚀
This commit is contained in:
parent
3210bcbbd4
commit
3e3699d571
5 changed files with 10 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `get_full_path_runner` fn in crate `actix_example`."><meta name="keywords" content="rust, rustlang, rust-lang, get_full_path_runner"><title>actix_example::get_full_path_runner - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../actix_example/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">actix_example</a></p><div id="sidebar-vars" data-name="get_full_path_runner" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">actix_example</a>::<wbr><a class="fn" href="">get_full_path_runner</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/actix_example/main.rs.html#20-28" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub(crate) fn get_full_path_runner(path: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, files: &<a class="struct" href="../cache_buster/filemap/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></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="actix_example"></div>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="index.html">actix_example</a>::<wbr><a class="fn" href="">get_full_path_runner</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/actix_example/main.rs.html#20-29" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub(crate) fn get_full_path_runner(path: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, files: &<a class="struct" href="../cache_buster/filemap/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></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="actix_example"></div>
|
||||
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `actix_example` crate."><meta name="keywords" content="rust, rustlang, rust-lang, actix_example"><title>actix_example - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../actix_example/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate actix_example</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all actix_example's items</p></a><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="actix_example" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">actix_example</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/actix_example/main.rs.html#1-28" title="goto source code">[src]</a></span></h1><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">actix_example</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/actix_example/main.rs.html#1-29" title="goto source code">[src]</a></span></h1><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
<table><tr class="module-item"><td><a class="fn" href="fn.get_full_path_runner.html" title="actix_example::get_full_path_runner fn">get_full_path_runner</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.main.html" title="actix_example::main fn">main</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="actix_example"></div>
|
||||
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|
|
@ -1,5 +1,5 @@
|
|||
var searchIndex = JSON.parse('{\
|
||||
"actix_example":{"doc":"","i":[[5,"main","actix_example","",null,[[]]],[5,"get_full_path_runner","","",null,[[["files",3],["str",15]],["bool",15]]]],"p":[]},\
|
||||
"cache_buster":{"doc":"","i":[[0,"processor","cache_buster","Module describing file processor that changes filenames …",null,null],[3,"Buster","cache_buster::processor","Configuration for setting up cache-busting",null,null],[3,"BusterBuilder","","Builder for <code>Buster</code>.",null,null],[11,"source","","source directory",0,[[["string",3],["into",8]]]],[11,"mime_types","","mime_types for hashing",0,[[["mime",3],["vec",3]]]],[11,"result","","directory for writing results",0,[[["string",3],["into",8]]]],[11,"prefix","","route prefixes",0,[[["string",3],["into",8]]]],[11,"copy","","copy other non-hashed files from source dire to result …",0,[[["bool",15]]]],[11,"follow_links","","follow symlinks?",0,[[["bool",15]]]],[11,"build","","Builds a new <code>Buster</code>.",0,[[],[["buster",3],["busterbuildererror",4],["result",4]]]],[4,"BusterBuilderError","","Error type for BusterBuilder",null,null],[13,"UninitializedField","","Uninitialized field",1,null],[13,"ValidationError","","Custom validation error",1,null],[11,"process","","Processes files.",2,[[],[["result",4],["error",3]]]],[0,"filemap","cache_buster","Module describing runtime compoenet for fetching modified …",null,null],[3,"Files","cache_buster::filemap","Filemap struct",null,null],[11,"new","","Load filemap in main program. Should be called from main …",3,[[["str",15]]]],[11,"get","","Get relative file path",3,[[["str",15]],[["option",4],["str",15]]]],[11,"get_full_path","","Get file path",3,[[["str",15]],[["option",4],["string",3]]]],[17,"CACHE_BUSTER_DATA_FILE","cache_buster","file to which filemap is written during compilation …",null,null],[11,"from","cache_buster::processor","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_string","","",1,[[],["string",3]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"from","cache_buster::filemap","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"from","cache_buster::processor","",1,[[["uninitializedfielderror",3]]]],[11,"from","","",1,[[["string",3]]]],[11,"clone","","",2,[[],["buster",3]]],[11,"clone","","",0,[[],["busterbuilder",3]]],[11,"clone","cache_buster::filemap","",3,[[],["files",3]]],[11,"default","cache_buster::processor","",0,[[]]],[11,"eq","cache_buster::filemap","",3,[[["files",3]],["bool",15]]],[11,"ne","","",3,[[["files",3]],["bool",15]]],[11,"fmt","cache_buster::processor","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","cache_buster::filemap","",3,[[["formatter",3]],["result",6]]],[11,"fmt","cache_buster::processor","",1,[[["formatter",3]],["result",6]]],[11,"serialize","cache_buster::filemap","",3,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]]],"p":[[3,"BusterBuilder"],[4,"BusterBuilderError"],[3,"Buster"],[3,"Files"]]}\
|
||||
"cache_buster":{"doc":"","i":[[0,"processor","cache_buster","Module describing file processor that changes filenames …",null,null],[3,"Buster","cache_buster::processor","Configuration for setting up cache-busting",null,null],[3,"BusterBuilder","","Builder for <code>Buster</code>.",null,null],[11,"source","","source directory",0,[[["into",8],["string",3]]]],[11,"mime_types","","mime_types for hashing",0,[[["mime",3],["vec",3]]]],[11,"result","","directory for writing results",0,[[["into",8],["string",3]]]],[11,"prefix","","route prefixes",0,[[["into",8],["string",3]]]],[11,"copy","","copy other non-hashed files from source dire to result …",0,[[["bool",15]]]],[11,"follow_links","","follow symlinks?",0,[[["bool",15]]]],[11,"build","","Builds a new <code>Buster</code>.",0,[[],[["buster",3],["result",4],["busterbuildererror",4]]]],[4,"BusterBuilderError","","Error type for BusterBuilder",null,null],[13,"UninitializedField","","Uninitialized field",1,null],[13,"ValidationError","","Custom validation error",1,null],[11,"process","","Processes files.",2,[[],[["result",4],["error",3]]]],[0,"filemap","cache_buster","Module describing runtime compoenet for fetching modified …",null,null],[3,"Files","cache_buster::filemap","Filemap struct",null,null],[11,"new","","Load filemap in main program. Should be called from main …",3,[[["str",15]]]],[11,"get","","Get relative file path",3,[[["str",15]],[["option",4],["str",15]]]],[11,"get_full_path","","Get file path",3,[[["str",15]],[["option",4],["string",3]]]],[17,"CACHE_BUSTER_DATA_FILE","cache_buster","file to which filemap is written during compilation …",null,null],[11,"from","cache_buster::processor","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_string","","",1,[[],["string",3]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"from","cache_buster::filemap","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"from","cache_buster::processor","",1,[[["uninitializedfielderror",3]]]],[11,"from","","",1,[[["string",3]]]],[11,"clone","","",2,[[],["buster",3]]],[11,"clone","","",0,[[],["busterbuilder",3]]],[11,"clone","cache_buster::filemap","",3,[[],["files",3]]],[11,"default","cache_buster::processor","",0,[[]]],[11,"eq","cache_buster::filemap","",3,[[["files",3]],["bool",15]]],[11,"ne","","",3,[[["files",3]],["bool",15]]],[11,"fmt","cache_buster::processor","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","cache_buster::filemap","",3,[[["formatter",3]],["result",6]]],[11,"fmt","cache_buster::processor","",1,[[["formatter",3]],["result",6]]],[11,"serialize","cache_buster::filemap","",3,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]]],"p":[[3,"BusterBuilder"],[4,"BusterBuilderError"],[3,"Buster"],[3,"Files"]]}\
|
||||
}');
|
||||
addSearchOptions(searchIndex);initSearch(searchIndex);
|
|
@ -29,6 +29,7 @@
|
|||
<span id="26">26</span>
|
||||
<span id="27">27</span>
|
||||
<span id="28">28</span>
|
||||
<span id="29">29</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">cache_buster</span>::<span class="ident">Files</span>;
|
||||
<span class="kw">use</span> <span class="ident">cache_buster</span>::<span class="ident">CACHE_BUSTER_DATA_FILE</span>;
|
||||
|
@ -53,6 +54,7 @@
|
|||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">path</span>::<span class="ident">Path</span>;
|
||||
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">file</span>) <span class="op">=</span> <span class="ident">files</span>.<span class="ident">get_full_path</span>(<span class="ident">path</span>) {
|
||||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{:?}"</span>, <span class="ident">files</span>.<span class="ident">get</span>(<span class="ident">path</span>));
|
||||
<span class="ident">Path</span>::<span class="ident">new</span>(<span class="ident">file</span>).<span class="ident">exists</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="bool-val">false</span>
|
||||
|
|
|
@ -215,8 +215,8 @@
|
|||
<span class="doccomment">/// output `/test.randomhash.svg`. For full path, see [get_full_path][Self::get_full_path].</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>(<span class="kw-2">&</span><span class="lifetime">'a</span> <span class="self">self</span>, <span class="ident">path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">path</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">map</span>.<span class="ident">get</span>(<span class="ident">path</span>) {
|
||||
<span class="comment">//Some(&path[self.base_dir.len()..])</span>
|
||||
<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="ident">path</span>)
|
||||
<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="ident">path</span>[<span class="self">self</span>.<span class="ident">base_dir</span>.<span class="ident">len</span>()..])
|
||||
<span class="comment">// Some(&path)</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">None</span>
|
||||
}
|
||||
|
@ -320,9 +320,9 @@
|
|||
|
||||
<span class="kw">fn</span> <span class="ident">get_runner</span>(<span class="ident">path</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">files</span>: <span class="kw-2">&</span><span class="ident">Files</span>) <span class="op">-</span><span class="op">></span> <span class="ident">bool</span> {
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">file</span>) <span class="op">=</span> <span class="ident">files</span>.<span class="ident">get</span>(<span class="ident">path</span>) {
|
||||
<span class="comment">// let path = Path::new(&files.base_dir).join(&file[1..]);</span>
|
||||
<span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="kw-2">&</span><span class="ident">file</span>);
|
||||
<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">file</span>);
|
||||
<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">files</span>.<span class="ident">base_dir</span>).<span class="ident">join</span>(<span class="kw-2">&</span><span class="ident">file</span>[<span class="number">1</span>..]);
|
||||
<span class="comment">//println!("{}", &file);</span>
|
||||
<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">path</span>);
|
||||
<span class="ident">path</span>.<span class="ident">exists</span>()
|
||||
} <span class="kw">else</span> {
|
||||
<span class="bool-val">false</span>
|
||||
|
|
Loading…
Reference in a new issue