1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
---
source: ferritin/src/tests.rs
expression: "render_interactive_for_tests(Commands::search(\"generic struct\"))"
---
" Search results for 'generic struct' "
" ════════════════════════════════════════════════════════════════════════════ "
" "
" ◦ fixture-crate::GenericStruct (Struct) - score: 100 (relevance: 100, "
" authority: 0) "
" │ A generic struct for testing multi-paragraph documentation. "
" │ "
" │ This struct demonstrates how generics work with complex type bounds and "
" │ provides a comprehensive example of the generic system in Rust. "
" ╰─[...] "
" "
" ◦ alloc::borrow::Borrow (Trait) - score: 91 (relevance: 85, authority: 7) "
" │ A trait for borrowing data. "
" │ "
" │ In Rust, it is common to provide different representations of a type for "
" │ different use cases. For instance, storage location and management for "
" │ a value can be specifically chosen as appropriate for a particular use "
" │ via pointer types such as Box<T> or Rc<T>. Beyond these generic wrappers "
" │ that can be used with any type, some types provide optional facets "
" │ providing potentially costly functionality. An example for such a type "
" │ is String which adds the ability to extend a string to the basic str. "
" │ This requires keeping additional information unnecessary for a simple, "
" │ immutable string. "
" ╰─[...] "
" "
" ◦ core::borrow::Borrow (Trait) - score: 85 (relevance: 85, authority: 0) "
" │ A trait for borrowing data. "
" │ "
" │ In Rust, it is common to provide different representations of a type for "
" │ different use cases. For instance, storage location and management for "
" │ a value can be specifically chosen as appropriate for a particular use "
" │ via pointer types such as Box<T> or Rc<T>. Beyond these generic wrappers "
" │ that can be used with any type, some types provide optional facets "
" │ providing potentially costly functionality. An example for such a type "
" │ is String which adds the ability to extend a string to the basic str. "
" │ This requires keeping additional information unnecessary for a simple, "
" │ immutable string. "
" ╰─[...] "
" "
" ◦ std::borrow::Borrow (Trait) - score: 85 (relevance: 85, authority: 0) "
" │ A trait for borrowing data. "
" │ "
" │ In Rust, it is common to provide different representations of a type for "
" │ different use cases. For instance, storage location and management for "
" │ a value can be specifically chosen as appropriate for a particular use "
" │ via pointer types such as Box<T> or Rc<T>. Beyond these generic wrappers "
" │ that can be used with any type, some types provide optional facets "
" │ providing potentially costly functionality. An example for such a type "
" │ is String which adds the ability to extend a string to the basic str. "
" │ This requires keeping additional information unnecessary for a simple, "
" │ immutable string. "
" ╰─[...] "
" "
" ◦ core::clone::Clone (Trait) - score: 83 (relevance: 82, authority: 1) "
" │ A common trait that allows explicit creation of a duplicate value. "
" │ "
" │ Calling clone always produces a new value. However, for types that are "
" │ references to other data (such as smart pointers or references), the "
" │ new value may still point to the same underlying data, rather than "
" │ duplicating it. See Clone::clone for more details. "
" ╰─[...] "
" "
" ◦ std::clone::Clone (Trait) - score: 83 (relevance: 82, authority: 1) "
" │ A common trait that allows explicit creation of a duplicate value. "
" │ "
" │ Calling clone always produces a new value. However, for types that are "
" │ references to other data (such as smart pointers or references), the "
" │ new value may still point to the same underlying data, rather than "
" │ duplicating it. See Clone::clone for more details. "
" ╰─[...] "
" "
" ◦ core::ops::Deref (Trait) - score: 80 (relevance: 79, authority: 1) "
" │ Used for immutable dereferencing operations, like *v. "
" │ "
" │ In addition to being used for explicit dereferencing operations with the "
" │ (unary) * operator in immutable contexts, Deref is also used implicitly "
" │ by the compiler in many circumstances. This mechanism is called "Deref "
" │ coercion". In mutable contexts, DerefMut is used and mutable deref "
" │ coercion similarly occurs. "
" ╰─[...] "
" "
" ◦ std::ops::Deref (Trait) - score: 80 (relevance: 79, authority: 1) "
" │ Used for immutable dereferencing operations, like *v. "
" │ "
" │ In addition to being used for explicit dereferencing operations with the "
" │ (unary) * operator in immutable contexts, Deref is also used implicitly "
" │ by the compiler in many circumstances. This mechanism is called "Deref "
" │ coercion". In mutable contexts, DerefMut is used and mutable deref "
" │ coercion similarly occurs. "
" ╰─[...] "
" "
" ◦ fixture-crate::GenericEnum (Enum) - score: 77 (relevance: 58, "
" authority: 33) "
" A generic enum for testing "
" "
" See also crate::TestEnum "
" "
" ◦ core::mem::ManuallyDrop (Struct) - score: 77 (relevance: 76, "
" authority: 1) "
" │ A wrapper to inhibit the compiler from automatically calling T’s "
" │ destructor. This wrapper is 0-cost. "
" │ "
" │ ManuallyDrop<T> is guaranteed to have the same layout and bit validity "
" │ as T, and is subject to the same layout optimizations as T. As a "
" │ consequence, it has no effect on the assumptions that the compiler makes "
" │ about its contents. For example, initializing a ManuallyDrop<&mut T> "
" │ with mem::zeroed is undefined behavior. If you need to handle "
" │ uninitialized data, use MaybeUninit<T> instead. "
" ╰─[...] "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
"▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂"
" ferritin - q:quit ?:help ←/→:history g:go s:search l:list c:code "