Skip to content

Commit e71dda4

Browse files
committed
ci: generate pages at 7ef58d9 [ci skip]
1 parent 7ef58d9 commit e71dda4

File tree

10,370 files changed

+541914
-621
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

10,370 files changed

+541914
-621
lines changed

public/1.6/complement-design-faq.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ <h2 id='data-layout-is-unspecified' class='section-header'><a href='#data-layout
6767
padding, etc. <code>enum</code>s which carry no data (&quot;C-like&quot;) are eligible to have a
6868
defined representation. Such <code>enum</code>s are easily distinguished in that they are
6969
simply a list of names that carry no data:</p>
70+
7071
<span class='rusttest'>fn main() {
7172
enum CLike {
72-
A,
73-
B = 32,
74-
C = 34,
75-
D
76-
}
77-
73+
A,
74+
B = 32,
75+
C = 34,
76+
D
77+
}
7878
}</span><pre class='rust rust-example-rendered'>
7979
<span class='kw'>enum</span> <span class='ident'>CLike</span> {
8080
<span class='ident'>A</span>,
@@ -133,12 +133,12 @@ <h2 id='match-must-be-exhaustive' class='section-header'><a href='#match-must-be
133133
it could fall through if the type of the <code>match</code> expression is <code>()</code>. This sort
134134
of hidden cost and special casing is against the language&#39;s philosophy. It&#39;s
135135
easy to ignore all unspecified cases by using the <code>_</code> wildcard:</p>
136+
136137
<span class='rusttest'>fn main() {
137138
match val.do_something() {
138-
Cat(a) =&gt; { /* ... */ }
139-
_ =&gt; { /* ... */ }
140-
}
141-
139+
Cat(a) =&gt; { /* ... */ }
140+
_ =&gt; { /* ... */ }
141+
}
142142
}</span><pre class='rust rust-example-rendered'>
143143
<span class='kw'>match</span> <span class='ident'>val</span>.<span class='ident'>do_something</span>() {
144144
<span class='ident'>Cat</span>(<span class='ident'>a</span>) <span class='op'>=&gt;</span> { <span class='comment'>/* ... */</span> }

public/1.6/grammar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ <h1 class="title">Grammar</h1>
7373
<li><a href="#static-items">6.1.8 Static items</a><ul>
7474
<li><a href="#mutable-statics">6.1.8.1 Mutable statics</a><ul></ul></li></ul></li>
7575
<li><a href="#traits">6.1.9 Traits</a><ul></ul></li>
76-
<li><a href="#implementations-1">6.1.10 Implementations</a><ul></ul></li>
76+
<li><a href="#implementations">6.1.10 Implementations</a><ul></ul></li>
7777
<li><a href="#external-blocks">6.1.11 External blocks</a><ul></ul></li></ul></li>
7878
<li><a href="#visibility-and-privacy">6.2 Visibility and Privacy</a><ul>
7979
<li><a href="#re-exporting-and-visibility">6.2.1 Re-exporting and Visibility</a><ul></ul></li></ul></li>
@@ -566,7 +566,7 @@ <h4 id='mutable-statics' class='section-header'><a href='#mutable-statics'>6.1.8
566566
<h3 id='traits' class='section-header'><a href='#traits'>6.1.9 Traits</a></h3>
567567
<p><strong>FIXME:</strong> grammar?</p>
568568

569-
<h3 id='implementations-1' class='section-header'><a href='#implementations-1'>6.1.10 Implementations</a></h3>
569+
<h3 id='implementations' class='section-header'><a href='#implementations'>6.1.10 Implementations</a></h3>
570570
<p><strong>FIXME:</strong> grammar?</p>
571571

572572
<h3 id='external-blocks' class='section-header'><a href='#external-blocks'>6.1.11 External blocks</a></h3>

public/1.6/reference.html

Lines changed: 623 additions & 609 deletions
Large diffs are not rendered by default.

public/1.9/alloc/arc/index.html

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
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 `arc` mod in crate `alloc`.">
8+
<meta name="keywords" content="rust, rustlang, rust-lang, arc">
9+
10+
<title>alloc::arc - Rust</title>
11+
12+
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
13+
<link rel="stylesheet" type="text/css" href="../../main.css">
14+
15+
<link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico">
16+
17+
</head>
18+
<body class="rustdoc">
19+
<!--[if lte IE 8]>
20+
<div class="warning">
21+
This old browser is unsupported and will most likely display funky
22+
things.
23+
</div>
24+
<![endif]-->
25+
26+
27+
28+
<nav class="sidebar">
29+
<a href='../../alloc/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='' width='100'></a>
30+
<p class='location'><a href='../index.html'>alloc</a></p><script>window.sidebarCurrent = {name: 'arc', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
31+
</nav>
32+
33+
<nav class="sub">
34+
<form class="search-form js-only">
35+
<div class="search-container">
36+
<input class="search-input" name="search"
37+
autocomplete="off"
38+
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
39+
type="search">
40+
</div>
41+
</form>
42+
</nav>
43+
44+
<section id='main' class="content mod">
45+
<h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>alloc</a>::<wbr><a class='mod' href=''>arc</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 id='src-331' class='srclink' href='../../src/alloc/arc.rs.html#11-1184' title='goto source code'>[src]</a></span></h1>
50+
<div class='docblock'><p>Threadsafe reference-counted boxes (the <code>Arc&lt;T&gt;</code> type).</p>
51+
52+
<p>The <code>Arc&lt;T&gt;</code> type provides shared ownership of an immutable value.
53+
Destruction is deterministic, and will occur as soon as the last owner is
54+
gone. It is marked as <code>Send</code> because it uses atomic reference counting.</p>
55+
56+
<p>If you do not need thread-safety, and just need shared ownership, consider
57+
the <a href="../rc/struct.Rc.html"><code>Rc&lt;T&gt;</code> type</a>. It is the same as <code>Arc&lt;T&gt;</code>, but
58+
does not use atomics, making it both thread-unsafe as well as significantly
59+
faster when updating the reference count.</p>
60+
61+
<p>The <code>downgrade</code> method can be used to create a non-owning <code>Weak&lt;T&gt;</code> pointer
62+
to the box. A <code>Weak&lt;T&gt;</code> pointer can be upgraded to an <code>Arc&lt;T&gt;</code> pointer, but
63+
will return <code>None</code> if the value has already been dropped.</p>
64+
65+
<p>For example, a tree with parent pointers can be represented by putting the
66+
nodes behind strong <code>Arc&lt;T&gt;</code> pointers, and then storing the parent pointers
67+
as <code>Weak&lt;T&gt;</code> pointers.</p>
68+
69+
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
70+
<p>Sharing some immutable data between threads:</p>
71+
<pre class='rust rust-example-rendered'>
72+
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>sync</span>::<span class='ident'>Arc</span>;
73+
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>thread</span>;
74+
75+
<span class='kw'>let</span> <span class='ident'>five</span> <span class='op'>=</span> <span class='ident'>Arc</span>::<span class='ident'>new</span>(<span class='number'>5</span>);
76+
77+
<span class='kw'>for</span> _ <span class='kw'>in</span> <span class='number'>0</span>..<span class='number'>10</span> {
78+
<span class='kw'>let</span> <span class='ident'>five</span> <span class='op'>=</span> <span class='ident'>five</span>.<span class='ident'>clone</span>();
79+
80+
<span class='ident'>thread</span>::<span class='ident'>spawn</span>(<span class='kw'>move</span> <span class='op'>||</span> {
81+
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{:?}&quot;</span>, <span class='ident'>five</span>);
82+
});
83+
}</pre>
84+
85+
<p>Sharing mutable data safely between threads with a <code>Mutex</code>:</p>
86+
<pre class='rust rust-example-rendered'>
87+
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>sync</span>::{<span class='ident'>Arc</span>, <span class='ident'>Mutex</span>};
88+
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>thread</span>;
89+
90+
<span class='kw'>let</span> <span class='ident'>five</span> <span class='op'>=</span> <span class='ident'>Arc</span>::<span class='ident'>new</span>(<span class='ident'>Mutex</span>::<span class='ident'>new</span>(<span class='number'>5</span>));
91+
92+
<span class='kw'>for</span> _ <span class='kw'>in</span> <span class='number'>0</span>..<span class='number'>10</span> {
93+
<span class='kw'>let</span> <span class='ident'>five</span> <span class='op'>=</span> <span class='ident'>five</span>.<span class='ident'>clone</span>();
94+
95+
<span class='ident'>thread</span>::<span class='ident'>spawn</span>(<span class='kw'>move</span> <span class='op'>||</span> {
96+
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>number</span> <span class='op'>=</span> <span class='ident'>five</span>.<span class='ident'>lock</span>().<span class='ident'>unwrap</span>();
97+
98+
<span class='op'>*</span><span class='ident'>number</span> <span class='op'>+=</span> <span class='number'>1</span>;
99+
100+
<span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='op'>*</span><span class='ident'>number</span>); <span class='comment'>// prints 6</span>
101+
});
102+
}</pre>
103+
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
104+
<table>
105+
<tr class=' module-item'>
106+
<td><a class='struct' href='struct.Arc.html'
107+
title='alloc::arc::Arc'>Arc</a></td>
108+
<td class='docblock short'>
109+
<p>An atomically reference counted wrapper for shared state.</p>
110+
111+
</td>
112+
</tr>
113+
114+
<tr class=' module-item'>
115+
<td><a class='struct' href='struct.Weak.html'
116+
title='alloc::arc::Weak'>Weak</a></td>
117+
<td class='docblock short'>
118+
<p>A weak pointer to an <code>Arc</code>.</p>
119+
120+
</td>
121+
</tr>
122+
</table></section>
123+
<section id='search' class="content hidden"></section>
124+
125+
<section class="footer"></section>
126+
127+
<aside id="help" class="hidden">
128+
<div>
129+
<h1 class="hidden">Help</h1>
130+
131+
<div class="shortcuts">
132+
<h2>Keyboard Shortcuts</h2>
133+
134+
<dl>
135+
<dt>?</dt>
136+
<dd>Show this help dialog</dd>
137+
<dt>S</dt>
138+
<dd>Focus the search field</dd>
139+
<dt>&larrb;</dt>
140+
<dd>Move up in search results</dd>
141+
<dt>&rarrb;</dt>
142+
<dd>Move down in search results</dd>
143+
<dt>&#9166;</dt>
144+
<dd>Go to active search result</dd>
145+
</dl>
146+
</div>
147+
148+
<div class="infos">
149+
<h2>Search Tricks</h2>
150+
151+
<p>
152+
Prefix searches with a type followed by a colon (e.g.
153+
<code>fn:</code>) to restrict the search to a given type.
154+
</p>
155+
156+
<p>
157+
Accepted types are: <code>fn</code>, <code>mod</code>,
158+
<code>struct</code>, <code>enum</code>,
159+
<code>trait</code>, <code>type</code>, <code>macro</code>,
160+
and <code>const</code>.
161+
</p>
162+
163+
<p>
164+
Search functions by type signature (e.g.
165+
<code>vec -> usize</code>)
166+
</p>
167+
</div>
168+
</div>
169+
</aside>
170+
171+
172+
173+
<script>
174+
window.rootPath = "../../";
175+
window.currentCrate = "alloc";
176+
window.playgroundUrl = "";
177+
</script>
178+
<script src="../../jquery.js"></script>
179+
<script src="../../main.js"></script>
180+
181+
<script defer src="../../search-index.js"></script>
182+
</body>
183+
</html>

public/1.9/alloc/arc/sidebar-items.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)