mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-14 21:12:54 +00:00
232 lines
26 KiB
HTML
232 lines
26 KiB
HTML
<!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 `Mmap` struct in crate `memmap`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, Mmap">
|
||
|
||
<title>memmap::Mmap - 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="../dark.css">
|
||
<link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
|
||
<script src="../storage.js"></script>
|
||
|
||
|
||
|
||
|
||
</head>
|
||
<body class="rustdoc struct">
|
||
<!--[if lte IE 8]>
|
||
<div class="warning">
|
||
This old browser is unsupported and will most likely display funky
|
||
things.
|
||
</div>
|
||
<![endif]-->
|
||
|
||
|
||
|
||
<nav class="sidebar">
|
||
<div class="sidebar-menu">☰</div>
|
||
|
||
<p class='location'>Struct Mmap</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.open">open</a><a href="#method.open_path">open_path</a><a href="#method.open_with_offset">open_with_offset</a><a href="#method.anonymous">anonymous</a><a href="#method.anonymous_with_options">anonymous_with_options</a><a href="#method.flush">flush</a><a href="#method.flush_async">flush_async</a><a href="#method.flush_range">flush_range</a><a href="#method.flush_async_range">flush_async_range</a><a href="#method.set_protection">set_protection</a><a href="#method.len">len</a><a href="#method.ptr">ptr</a><a href="#method.mut_ptr">mut_ptr</a><a href="#method.as_slice">as_slice</a><a href="#method.as_mut_slice">as_mut_slice</a><a href="#method.into_view">into_view</a><a href="#method.into_view_sync">into_view_sync</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div></div><p class='location'><a href='index.html'>memmap</a></p><script>window.sidebarCurrent = {name: 'Mmap', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||
</nav>
|
||
|
||
<div class="theme-picker">
|
||
<button id="theme-picker" aria-label="Pick another theme!">
|
||
<img src="../brush.svg" width="18" alt="Pick another theme!">
|
||
</button>
|
||
<div id="theme-choices"></div>
|
||
</div>
|
||
<script src="../theme.js"></script>
|
||
<nav class="sub">
|
||
<form class="search-form js-only">
|
||
<div class="search-container">
|
||
<input class="search-input" name="search"
|
||
autocomplete="off"
|
||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||
type="search">
|
||
</div>
|
||
</form>
|
||
</nav>
|
||
|
||
<section id='main' class="content">
|
||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>memmap</a>::<wbr><a class="struct" href=''>Mmap</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/memmap/lib.rs.html#99-101' title='goto source code'>[src]</a></span></h1>
|
||
<pre class='rust struct'>pub struct Mmap { /* fields omitted */ }</pre><div class='docblock'><p>A memory-mapped buffer.</p>
|
||
<p>A file-backed <code>Mmap</code> buffer may be used to read or write data to a file. Use
|
||
<code>Mmap::open(..)</code> to create a file-backed memory map. An anonymous <code>Mmap</code>
|
||
buffer may be used any place that an in-memory byte buffer is needed, and
|
||
gives the added features of a memory map. Use <code>Mmap::anonymous(..)</code> to
|
||
create an anonymous memory map.</p>
|
||
<p>Changes written to a memory-mapped file are not guaranteed to be durable
|
||
until the memory map is flushed, or it is dropped.</p>
|
||
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Write</span>;
|
||
<span class="kw">use</span> <span class="ident">memmap</span>::{<span class="ident">Mmap</span>, <span class="ident">Protection</span>};
|
||
|
||
<span class="kw">let</span> <span class="ident">file_mmap</span> <span class="op">=</span> <span class="ident">Mmap</span>::<span class="ident">open_path</span>(<span class="string">"README.md"</span>, <span class="ident">Protection</span>::<span class="ident">Read</span>).<span class="ident">unwrap</span>();
|
||
<span class="kw">let</span> <span class="ident">bytes</span>: <span class="kw-2">&</span>[<span class="ident">u8</span>] <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">file_mmap</span>.<span class="ident">as_slice</span>() };
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">b"# memmap"</span>, <span class="kw-2">&</span><span class="ident">bytes</span>[<span class="number">0</span>..<span class="number">8</span>]);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">anon_mmap</span> <span class="op">=</span> <span class="ident">Mmap</span>::<span class="ident">anonymous</span>(<span class="number">4096</span>, <span class="ident">Protection</span>::<span class="ident">ReadWrite</span>).<span class="ident">unwrap</span>();
|
||
<span class="kw">unsafe</span> { <span class="ident">anon_mmap</span>.<span class="ident">as_mut_slice</span>() }.<span class="ident">write</span>(<span class="string">b"foo"</span>).<span class="ident">unwrap</span>();
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">b"foo\0\0"</span>, <span class="kw">unsafe</span> { <span class="kw-2">&</span><span class="ident">anon_mmap</span>.<span class="ident">as_slice</span>()[<span class="number">0</span>..<span class="number">5</span>] });</pre>
|
||
</div>
|
||
<h2 id='methods' class='small-section-header'>
|
||
Methods<a href='#methods' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl' class='impl'><span class='in-band'><code>impl <a class="struct" href="../memmap/struct.Mmap.html" title="struct memmap::Mmap">Mmap</a></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#103-263' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.open' class="method"><span id='open.v' class='invisible'><code>pub fn <a href='#method.open' class='fnname'>open</a>(file: &<a class="struct" href="https://doc.rust-lang.org/nightly/std/fs/struct.File.html" title="struct std::fs::File">File</a>, prot: <a class="enum" href="../memmap/enum.Protection.html" title="enum memmap::Protection">Protection</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="struct" href="../memmap/struct.Mmap.html" title="struct memmap::Mmap">Mmap</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#109-112' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Opens a file-backed memory map.</p>
|
||
<p>The file must be opened with read permissions, and write permissions if
|
||
the supplied protection is <code>ReadWrite</code>. The file must not be empty.</p>
|
||
</div><h4 id='method.open_path' class="method"><span id='open_path.v' class='invisible'><code>pub fn <a href='#method.open_path' class='fnname'>open_path</a><P>(path: P, prot: <a class="enum" href="../memmap/enum.Protection.html" title="enum memmap::Protection">Protection</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="struct" href="../memmap/struct.Mmap.html" title="struct memmap::Mmap">Mmap</a>> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>>, </span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#117-122' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Opens a file-backed memory map.</p>
|
||
<p>The file must not be empty.</p>
|
||
</div><h4 id='method.open_with_offset' class="method"><span id='open_with_offset.v' class='invisible'><code>pub fn <a href='#method.open_with_offset' class='fnname'>open_with_offset</a>(<br> file: &<a class="struct" href="https://doc.rust-lang.org/nightly/std/fs/struct.File.html" title="struct std::fs::File">File</a>, <br> prot: <a class="enum" href="../memmap/enum.Protection.html" title="enum memmap::Protection">Protection</a>, <br> offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="struct" href="../memmap/struct.Mmap.html" title="struct memmap::Mmap">Mmap</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#129-134' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Opens a file-backed memory map with the specified offset and length.</p>
|
||
<p>The file must be opened with read permissions, and write permissions if
|
||
the supplied protection is <code>ReadWrite</code>. The file must not be empty. The
|
||
length must be greater than zero.</p>
|
||
</div><h4 id='method.anonymous' class="method"><span id='anonymous.v' class='invisible'><code>pub fn <a href='#method.anonymous' class='fnname'>anonymous</a>(len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, prot: <a class="enum" href="../memmap/enum.Protection.html" title="enum memmap::Protection">Protection</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="struct" href="../memmap/struct.Mmap.html" title="struct memmap::Mmap">Mmap</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#139-141' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Opens an anonymous memory map.</p>
|
||
<p>The length must be greater than zero.</p>
|
||
</div><h4 id='method.anonymous_with_options' class="method"><span id='anonymous_with_options.v' class='invisible'><code>pub fn <a href='#method.anonymous_with_options' class='fnname'>anonymous_with_options</a>(<br> len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <br> prot: <a class="enum" href="../memmap/enum.Protection.html" title="enum memmap::Protection">Protection</a>, <br> options: <a class="struct" href="../memmap/struct.MmapOptions.html" title="struct memmap::MmapOptions">MmapOptions</a><br>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="struct" href="../memmap/struct.Mmap.html" title="struct memmap::Mmap">Mmap</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#146-150' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Opens an anonymous memory map with the provided options.</p>
|
||
<p>The length must be greater than zero.</p>
|
||
</div><h4 id='method.flush' class="method"><span id='flush.v' class='invisible'><code>pub fn <a href='#method.flush' class='fnname'>flush</a>(&self) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#157-160' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Flushes outstanding memory map modifications to disk.</p>
|
||
<p>When this returns with a non-error result, all outstanding changes to a
|
||
file-backed memory map are guaranteed to be durably stored. The file's
|
||
metadata (including last modification timestamp) may not be updated.</p>
|
||
</div><h4 id='method.flush_async' class="method"><span id='flush_async.v' class='invisible'><code>pub fn <a href='#method.flush_async' class='fnname'>flush_async</a>(&self) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#167-170' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Asynchronously flushes outstanding memory map modifications to disk.</p>
|
||
<p>This method initiates flushing modified pages to durable storage, but it
|
||
will not wait for the operation to complete before returning. The file's
|
||
metadata (including last modification timestamp) may not be updated.</p>
|
||
</div><h4 id='method.flush_range' class="method"><span id='flush_range.v' class='invisible'><code>pub fn <a href='#method.flush_range' class='fnname'>flush_range</a>(&self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#182-184' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Flushes outstanding memory map modifications in the range to disk.</p>
|
||
<p>The offset and length must be in the bounds of the mmap.</p>
|
||
<p>When this returns with a non-error result, all outstanding changes to a
|
||
file-backed memory in the range are guaranteed to be durable stored. The
|
||
file's metadata (including last modification timestamp) may not be
|
||
updated. It is not guaranteed the only the changes in the specified
|
||
range are flushed; other outstanding changes to the mmap may be flushed
|
||
as well.</p>
|
||
</div><h4 id='method.flush_async_range' class="method"><span id='flush_async_range.v' class='invisible'><code>pub fn <a href='#method.flush_async_range' class='fnname'>flush_async_range</a>(&self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#197-199' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Asynchronously flushes outstanding memory map modifications in the range
|
||
to disk.</p>
|
||
<p>The offset and length must be in the bounds of the mmap.</p>
|
||
<p>This method initiates flushing modified pages to durable storage, but it
|
||
will not wait for the operation to complete before returning. The file's
|
||
metadata (including last modification timestamp) may not be updated. It
|
||
is not guaranteed that the only changes flushed are those in the
|
||
specified range; other outstanding changes to the mmap may be flushed as
|
||
well.</p>
|
||
</div><h4 id='method.set_protection' class="method"><span id='set_protection.v' class='invisible'><code>pub fn <a href='#method.set_protection' class='fnname'>set_protection</a>(&mut self, prot: <a class="enum" href="../memmap/enum.Protection.html" title="enum memmap::Protection">Protection</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#205-207' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Change the <code>Protection</code> this mapping was created with.</p>
|
||
<p>If you create a read-only file-backed mapping, you can <strong>not</strong> use this method to make the
|
||
mapping writeable. Remap the file instead.</p>
|
||
</div><h4 id='method.len' class="method"><span id='len.v' class='invisible'><code>pub fn <a href='#method.len' class='fnname'>len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#210-212' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the length of the memory map.</p>
|
||
</div><h4 id='method.ptr' class="method"><span id='ptr.v' class='invisible'><code>pub fn <a href='#method.ptr' class='fnname'>ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#218-220' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns a pointer to the mapped memory.</p>
|
||
<p>See <code>Mmap::as_slice</code> for invariants that must hold when dereferencing
|
||
the pointer.</p>
|
||
</div><h4 id='method.mut_ptr' class="method"><span id='mut_ptr.v' class='invisible'><code>pub fn <a href='#method.mut_ptr' class='fnname'>mut_ptr</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#226-228' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns a pointer to the mapped memory.</p>
|
||
<p>See <code>Mmap::as_mut_slice</code> for invariants that must hold when
|
||
dereferencing the pointer.</p>
|
||
</div><h4 id='method.as_slice' class="method"><span id='as_slice.v' class='invisible'><code>pub unsafe fn <a href='#method.as_slice' class='fnname'>as_slice</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#235-237' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the memory mapped file as an immutable slice.</p>
|
||
<h2 id="unsafety" class="section-header"><a href="#unsafety">Unsafety</a></h2>
|
||
<p>The caller must ensure that the file is not concurrently modified.</p>
|
||
</div><h4 id='method.as_mut_slice' class="method"><span id='as_mut_slice.v' class='invisible'><code>pub unsafe fn <a href='#method.as_mut_slice' class='fnname'>as_mut_slice</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#244-246' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Returns the memory mapped file as a mutable slice.</p>
|
||
<h2 id="unsafety-1" class="section-header"><a href="#unsafety-1">Unsafety</a></h2>
|
||
<p>The caller must ensure that the file is not concurrently accessed.</p>
|
||
</div><h4 id='method.into_view' class="method"><span id='into_view.v' class='invisible'><code>pub fn <a href='#method.into_view' class='fnname'>into_view</a>(self) -> <a class="struct" href="../memmap/struct.MmapView.html" title="struct memmap::MmapView">MmapView</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#249-254' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates a splittable mmap view from the mmap.</p>
|
||
</div><h4 id='method.into_view_sync' class="method"><span id='into_view_sync.v' class='invisible'><code>pub fn <a href='#method.into_view_sync' class='fnname'>into_view_sync</a>(self) -> <a class="struct" href="../memmap/struct.MmapViewSync.html" title="struct memmap::MmapViewSync">MmapViewSync</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#257-262' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><p>Creates a thread-safe splittable mmap view from the mmap.</p>
|
||
</div></div>
|
||
<h2 id='implementations' class='small-section-header'>
|
||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl-Debug' class='impl'><span class='in-band'><code>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="../memmap/struct.Mmap.html" title="struct memmap::Mmap">Mmap</a></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#265-269' title='goto source code'>[src]</a></span></h3>
|
||
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><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></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/memmap/lib.rs.html#266-268' title='goto source code'>[src]</a></span></h4>
|
||
<div class='docblock'><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></section>
|
||
<section id='search' class="content hidden"></section>
|
||
|
||
<section class="footer"></section>
|
||
|
||
<aside id="help" class="hidden">
|
||
<div>
|
||
<h1 class="hidden">Help</h1>
|
||
|
||
<div class="shortcuts">
|
||
<h2>Keyboard Shortcuts</h2>
|
||
|
||
<dl>
|
||
<dt><kbd>?</kbd></dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt><kbd>S</kbd></dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt><kbd>↑</kbd></dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt><kbd>↓</kbd></dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt><kbd>↹</kbd></dt>
|
||
<dd>Switch tab</dd>
|
||
<dt><kbd>⏎</kbd></dt>
|
||
<dd>Go to active search result</dd>
|
||
<dt><kbd>+</kbd></dt>
|
||
<dd>Expand all sections</dd>
|
||
<dt><kbd>-</kbd></dt>
|
||
<dd>Collapse all sections</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div class="infos">
|
||
<h2>Search Tricks</h2>
|
||
|
||
<p>
|
||
Prefix searches with a type followed by a colon (e.g.
|
||
<code>fn:</code>) to restrict the search to a given type.
|
||
</p>
|
||
|
||
<p>
|
||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||
<code>struct</code>, <code>enum</code>,
|
||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||
and <code>const</code>.
|
||
</p>
|
||
|
||
<p>
|
||
Search functions by type signature (e.g.
|
||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../";
|
||
window.currentCrate = "memmap";
|
||
</script>
|
||
<script src="../main.js"></script>
|
||
<script defer src="../search-index.js"></script>
|
||
</body>
|
||
</html> |