blob: 6e607d4e558c2a51124d90ab70c2afa6490120df [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Env` trait in crate `rusty_leveldb`."><meta name="keywords" content="rust, rustlang, rust-lang, Env"><title>Env in rusty_leveldb - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../rusty_leveldb/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../rusty_leveldb/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Env</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.children">children</a></li><li><a href="#tymethod.delete">delete</a></li><li><a href="#tymethod.exists">exists</a></li><li><a href="#tymethod.lock">lock</a></li><li><a href="#tymethod.micros">micros</a></li><li><a href="#tymethod.mkdir">mkdir</a></li><li><a href="#tymethod.new_logger">new_logger</a></li><li><a href="#tymethod.open_appendable_file">open_appendable_file</a></li><li><a href="#tymethod.open_random_access_file">open_random_access_file</a></li><li><a href="#tymethod.open_sequential_file">open_sequential_file</a></li><li><a href="#tymethod.open_writable_file">open_writable_file</a></li><li><a href="#tymethod.rename">rename</a></li><li><a href="#tymethod.rmdir">rmdir</a></li><li><a href="#tymethod.size_of">size_of</a></li><li><a href="#tymethod.unlock">unlock</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In rusty_leveldb</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Trait <a href="index.html">rusty_leveldb</a>::<wbr><a class="trait" href="#">Env</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/rusty_leveldb/env.rs.html#26-47">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust trait"><code>pub trait Env {
<details class="rustdoc-toggle type-contents-toggle"><summary class="hideme"><span>Show 15 methods</span></summary> fn <a href="#tymethod.open_sequential_file" class="fnname">open_sequential_file</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Box&lt;dyn Read&gt;&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.open_random_access_file" class="fnname">open_random_access_file</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Box&lt;dyn RandomAccess&gt;&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.open_writable_file" class="fnname">open_writable_file</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Box&lt;dyn Write&gt;&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.open_appendable_file" class="fnname">open_appendable_file</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Box&lt;dyn Write&gt;&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.exists" class="fnname">exists</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;bool&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.children" class="fnname">children</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Vec&lt;PathBuf&gt;&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of" class="fnname">size_of</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;usize&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.delete" class="fnname">delete</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.mkdir" class="fnname">mkdir</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.rmdir" class="fnname">rmdir</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.rename" class="fnname">rename</a>(&amp;self, p: &amp;Path, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.lock" class="fnname">lock</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;FileLock&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.unlock" class="fnname">unlock</a>(&amp;self, l: FileLock) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.new_logger" class="fnname">new_logger</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Logger&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.micros" class="fnname">micros</a>(&amp;self) -&gt; u64;
</details>}</code></pre></div><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><section id="tymethod.open_sequential_file" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#27">source</a><h4 class="code-header">fn <a href="#tymethod.open_sequential_file" class="fnname">open_sequential_file</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Box&lt;dyn Read&gt;&gt;</h4></section><section id="tymethod.open_random_access_file" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#28">source</a><h4 class="code-header">fn <a href="#tymethod.open_random_access_file" class="fnname">open_random_access_file</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Box&lt;dyn RandomAccess&gt;&gt;</h4></section><section id="tymethod.open_writable_file" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#29">source</a><h4 class="code-header">fn <a href="#tymethod.open_writable_file" class="fnname">open_writable_file</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Box&lt;dyn Write&gt;&gt;</h4></section><section id="tymethod.open_appendable_file" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#30">source</a><h4 class="code-header">fn <a href="#tymethod.open_appendable_file" class="fnname">open_appendable_file</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Box&lt;dyn Write&gt;&gt;</h4></section><section id="tymethod.exists" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#32">source</a><h4 class="code-header">fn <a href="#tymethod.exists" class="fnname">exists</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;bool&gt;</h4></section><section id="tymethod.children" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#33">source</a><h4 class="code-header">fn <a href="#tymethod.children" class="fnname">children</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Vec&lt;PathBuf&gt;&gt;</h4></section><section id="tymethod.size_of" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#34">source</a><h4 class="code-header">fn <a href="#tymethod.size_of" class="fnname">size_of</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;usize&gt;</h4></section><section id="tymethod.delete" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#36">source</a><h4 class="code-header">fn <a href="#tymethod.delete" class="fnname">delete</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;</h4></section><section id="tymethod.mkdir" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#37">source</a><h4 class="code-header">fn <a href="#tymethod.mkdir" class="fnname">mkdir</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;</h4></section><section id="tymethod.rmdir" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#38">source</a><h4 class="code-header">fn <a href="#tymethod.rmdir" class="fnname">rmdir</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;</h4></section><section id="tymethod.rename" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#39">source</a><h4 class="code-header">fn <a href="#tymethod.rename" class="fnname">rename</a>(&amp;self, p: &amp;Path, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;</h4></section><section id="tymethod.lock" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#41">source</a><h4 class="code-header">fn <a href="#tymethod.lock" class="fnname">lock</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;FileLock&gt;</h4></section><section id="tymethod.unlock" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#42">source</a><h4 class="code-header">fn <a href="#tymethod.unlock" class="fnname">unlock</a>(&amp;self, l: FileLock) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;()&gt;</h4></section><section id="tymethod.new_logger" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#44">source</a><h4 class="code-header">fn <a href="#tymethod.new_logger" class="fnname">new_logger</a>(&amp;self, p: &amp;Path) -&gt; <a class="type" href="type.Result.html" title="type rusty_leveldb::Result">Result</a>&lt;Logger&gt;</h4></section><section id="tymethod.micros" class="method has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/env.rs.html#46">source</a><h4 class="code-header">fn <a href="#tymethod.micros" class="fnname">micros</a>(&amp;self) -&gt; u64</h4></section></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div id="implementors-list"><section id="impl-Env-for-MemEnv" class="impl has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/mem_env.rs.html#286-349">source</a><a href="#impl-Env-for-MemEnv" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Env.html" title="trait rusty_leveldb::Env">Env</a> for <a class="struct" href="struct.MemEnv.html" title="struct rusty_leveldb::MemEnv">MemEnv</a></h3></section><section id="impl-Env-for-PosixDiskEnv" class="impl has-srclink"><a class="srclink rightside" href="../src/rusty_leveldb/disk_env.rs.html#46-189">source</a><a href="#impl-Env-for-PosixDiskEnv" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="trait.Env.html" title="trait rusty_leveldb::Env">Env</a> for <a class="struct" href="struct.PosixDiskEnv.html" title="struct rusty_leveldb::PosixDiskEnv">PosixDiskEnv</a></h3></section></div><script src="../implementors/rusty_leveldb/env/trait.Env.js" async></script></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="rusty_leveldb" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>