struct.Context.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="generator" content="rustdoc">
  7. <meta name="description" content="API documentation for the Rust `Context` struct in crate `failure`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, Context">
  9. <title>failure::Context - Rust</title>
  10. <link rel="stylesheet" type="text/css" href="../normalize.css">
  11. <link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
  12. <link rel="stylesheet" type="text/css" href="../dark.css">
  13. <link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
  14. <script src="../storage.js"></script>
  15. </head>
  16. <body class="rustdoc struct">
  17. <!--[if lte IE 8]>
  18. <div class="warning">
  19. This old browser is unsupported and will most likely display funky
  20. things.
  21. </div>
  22. <![endif]-->
  23. <nav class="sidebar">
  24. <div class="sidebar-menu">&#9776;</div>
  25. <p class='location'>Struct Context</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.get_context">get_context</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Fail">Fail</a><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-From%3CD%3E">From&lt;D&gt;</a></div></div><p class='location'><a href='index.html'>failure</a></p><script>window.sidebarCurrent = {name: 'Context', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
  26. </nav>
  27. <div class="theme-picker">
  28. <button id="theme-picker" aria-label="Pick another theme!">
  29. <img src="../brush.svg" width="18" alt="Pick another theme!">
  30. </button>
  31. <div id="theme-choices"></div>
  32. </div>
  33. <script src="../theme.js"></script>
  34. <nav class="sub">
  35. <form class="search-form js-only">
  36. <div class="search-container">
  37. <input class="search-input" name="search"
  38. autocomplete="off"
  39. placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
  40. type="search">
  41. </div>
  42. </form>
  43. </nav>
  44. <section id='main' class="content">
  45. <h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>failure</a>::<wbr><a class="struct" href=''>Context</a></span><span class='out-of-band'><span id='render-detail'>
  46. <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
  47. [<span class='inner'>&#x2212;</span>]
  48. </a>
  49. </span><a class='srclink' href='../src/failure/context.rs.html#60-63' title='goto source code'>[src]</a></span></h1>
  50. <pre class='rust struct'>pub struct Context&lt;D:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static&gt; { /* fields omitted */ }</pre><div class='docblock'><p>An error with context around it.</p>
  51. <p>The context is intended to be a human-readable, user-facing explanation for the
  52. error that has occurred. The underlying error is not assumed to be end-user-relevant
  53. information.</p>
  54. <p>The <code>Display</code> impl for <code>Context</code> only prints the human-readable context, while the
  55. <code>Debug</code> impl also prints the underlying error.</p>
  56. </div>
  57. <h2 id='methods' class='small-section-header'>
  58. Methods<a href='#methods' class='anchor'></a>
  59. </h2>
  60. <h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;D:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static&gt; <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a>&lt;D&gt;</code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#65-81' title='goto source code'>[src]</a></span></h3>
  61. <div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>(context: D) -&gt; <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a>&lt;D&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#67-70' title='goto source code'>[src]</a></span></h4>
  62. <div class='docblock'><p>Creates a new context without an underlying error message.</p>
  63. </div><h4 id='method.get_context' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, R&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>R <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, W&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>W <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">impl&lt;'a, I&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item" title="type core::iter::iterator::Iterator::Item">Item</a>;</span></code></div></div><span id='get_context.v' class='invisible'><code>pub fn <a href='#method.get_context' class='fnname'>get_context</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>D</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#73-75' title='goto source code'>[src]</a></span></h4>
  64. <div class='docblock'><p>Returns a reference to the context provided with this error.</p>
  65. </div></div>
  66. <h2 id='implementations' class='small-section-header'>
  67. Trait Implementations<a href='#implementations' class='anchor'></a>
  68. </h2>
  69. <h3 id='impl-Fail' class='impl'><span class='in-band'><code>impl&lt;D:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static&gt; <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a> for <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a>&lt;D&gt;</code><a href='#impl-Fail' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#83-91' title='goto source code'>[src]</a></span></h3>
  70. <div class='impl-items'><h4 id='method.cause' class="method"><span id='cause.v' class='invisible'><code>fn <a href='../failure/trait.Fail.html#method.cause' class='fnname'>cause</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#84-86' title='goto source code'>[src]</a></span></h4>
  71. <div class='docblock'><p>Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. <a href="../failure/trait.Fail.html#method.cause">Read more</a></p>
  72. </div><h4 id='method.backtrace' class="method"><span id='backtrace.v' class='invisible'><code>fn <a href='../failure/trait.Fail.html#method.backtrace' class='fnname'>backtrace</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../failure/struct.Backtrace.html" title="struct failure::Backtrace">Backtrace</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#88-90' title='goto source code'>[src]</a></span></h4>
  73. <div class='docblock'><p>Returns a reference to the <code>Backtrace</code> carried by this failure, if it carries one. <a href="../failure/trait.Fail.html#method.backtrace">Read more</a></p>
  74. </div><h4 id='method.context' class="method"><span id='context.v' class='invisible'><code>fn <a href='../failure/trait.Fail.html#method.context' class='fnname'>context</a>&lt;D&gt;(self, context: D) -&gt; <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a>&lt;D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/lib.rs.html#123-128' title='goto source code'>[src]</a></span></h4>
  75. <div class='docblock'><p>Provides context for this failure. <a href="../failure/trait.Fail.html#method.context">Read more</a></p>
  76. </div><h4 id='method.compat' class="method"><span id='compat.v' class='invisible'><code>fn <a href='../failure/trait.Fail.html#method.compat' class='fnname'>compat</a>(self) -&gt; <a class="struct" href="../failure/struct.Compat.html" title="struct failure::Compat">Compat</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/lib.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
  77. <div class='docblock'><p>Wraps this failure in a compatibility wrapper that implements <code>std::error::Error</code>. <a href="../failure/trait.Fail.html#method.compat">Read more</a></p>
  78. </div><h4 id='method.causes' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a>&lt;'f&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a>&lt;'f&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'f&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a>&lt;'f&gt;</span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &amp;'f <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>;</span></code></div></div><span id='causes.v' class='invisible'><code>fn <a href='../failure/trait.Fail.html#method.causes' class='fnname'>causes</a>(&amp;self) -&gt; <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/lib.rs.html#143-145' title='goto source code'>[src]</a></span></h4>
  79. <div class='docblock'><p>Returns a iterator over the causes of this <code>Fail</code> with itself as the first item and the <code>root_cause</code> as the final item. <a href="../failure/trait.Fail.html#method.causes">Read more</a></p>
  80. </div><h4 id='method.root_cause' class="method"><span id='root_cause.v' class='invisible'><code>fn <a href='../failure/trait.Fail.html#method.root_cause' class='fnname'>root_cause</a>(&amp;self) -&gt; &amp;<a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/lib.rs.html#152-156' title='goto source code'>[src]</a></span></h4>
  81. <div class='docblock'><p>Returns the &quot;root cause&quot; of this <code>Fail</code> - the last value in the cause chain which does not return an underlying <code>cause</code>. <a href="../failure/trait.Fail.html#method.root_cause">Read more</a></p>
  82. </div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl&lt;D:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static&gt; <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="../failure/struct.Context.html" title="struct failure::Context">Context</a>&lt;D&gt;</code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#93-97' title='goto source code'>[src]</a></span></h3>
  83. <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>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <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/failure/context.rs.html#94-96' title='goto source code'>[src]</a></span></h4>
  84. <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>
  85. </div></div><h3 id='impl-Display' class='impl'><span class='in-band'><code>impl&lt;D:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a>&lt;D&gt;</code><a href='#impl-Display' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#99-103' title='goto source code'>[src]</a></span></h3>
  86. <div class='impl-items'><h4 id='method.fmt-1' class="method"><span id='fmt.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <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/failure/context.rs.html#100-102' title='goto source code'>[src]</a></span></h4>
  87. <div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
  88. </div></div><h3 id='impl-From%3CD%3E' class='impl'><span class='in-band'><code>impl&lt;D&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;D&gt; for <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a>&lt;D&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,&nbsp;</span></code><a href='#impl-From%3CD%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#136-142' title='goto source code'>[src]</a></span></h3>
  89. <div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(display: D) -&gt; <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a>&lt;D&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/failure/context.rs.html#139-141' title='goto source code'>[src]</a></span></h4>
  90. <div class='docblock'><p>Performs the conversion.</p>
  91. </div></div></section>
  92. <section id='search' class="content hidden"></section>
  93. <section class="footer"></section>
  94. <aside id="help" class="hidden">
  95. <div>
  96. <h1 class="hidden">Help</h1>
  97. <div class="shortcuts">
  98. <h2>Keyboard Shortcuts</h2>
  99. <dl>
  100. <dt><kbd>?</kbd></dt>
  101. <dd>Show this help dialog</dd>
  102. <dt><kbd>S</kbd></dt>
  103. <dd>Focus the search field</dd>
  104. <dt><kbd>↑</kbd></dt>
  105. <dd>Move up in search results</dd>
  106. <dt><kbd>↓</kbd></dt>
  107. <dd>Move down in search results</dd>
  108. <dt><kbd>↹</kbd></dt>
  109. <dd>Switch tab</dd>
  110. <dt><kbd>&#9166;</kbd></dt>
  111. <dd>Go to active search result</dd>
  112. <dt><kbd>+</kbd></dt>
  113. <dd>Expand all sections</dd>
  114. <dt><kbd>-</kbd></dt>
  115. <dd>Collapse all sections</dd>
  116. </dl>
  117. </div>
  118. <div class="infos">
  119. <h2>Search Tricks</h2>
  120. <p>
  121. Prefix searches with a type followed by a colon (e.g.
  122. <code>fn:</code>) to restrict the search to a given type.
  123. </p>
  124. <p>
  125. Accepted types are: <code>fn</code>, <code>mod</code>,
  126. <code>struct</code>, <code>enum</code>,
  127. <code>trait</code>, <code>type</code>, <code>macro</code>,
  128. and <code>const</code>.
  129. </p>
  130. <p>
  131. Search functions by type signature (e.g.
  132. <code>vec -> usize</code> or <code>* -> vec</code>)
  133. </p>
  134. </div>
  135. </div>
  136. </aside>
  137. <script>
  138. window.rootPath = "../";
  139. window.currentCrate = "failure";
  140. </script>
  141. <script src="../main.js"></script>
  142. <script defer src="../search-index.js"></script>
  143. </body>
  144. </html>