21
21
>   ;  ;   ;  ; | _ MacroDefinition_ \
22
22
>   ;  ; )
23
23
24
- [ _OuterAttribute_ ] : attributes.html
25
- [ _Visibility_ ] : visibility-and-privacy.html
26
- [ _Module_ ] : items/modules.html
27
- [ _ExternCrate_ ] : items/extern-crates.html
28
- [ _UseDeclaration_ ] : items/use-declarations.html
29
- [ _Function_ ] : items/functions.html
30
- [ _TypeAlias_ ] : items/type-aliases.html
31
- [ _Struct_ ] : items/structs.html
32
- [ _Enumeration_ ] : items/enumerations.html
33
- [ _Union_ ] : items/unions.html
34
- [ _ConstantItem_ ] : items/constant-items.html
35
- [ _StaticItem_ ] : items/static-items.html
36
- [ _Trait_ ] : items/traits.html
37
- [ _Implementation_ ] : items/implementations.html
38
- [ _ExternBlock_ ] : items/extern-blocks.html
39
-
40
24
An _ item_ is a component of a crate. Items are organized within a crate by a
41
25
nested set of [ modules] . Every crate has a single "outermost" anonymous module;
42
26
all further items within the crate have [ paths] within the module tree of the
43
27
crate.
44
28
45
- [ modules ] : items/modules.html
46
- [ paths ] : paths.html
47
-
48
29
Items are entirely determined at compile-time, generally remain fixed during
49
30
execution, and may reside in read-only memory.
50
31
51
32
There are several kinds of items:
52
33
53
- * [ modules] ( items/modules.html )
54
- * [ ` extern crate ` declarations] ( items/extern-crates.html )
55
- * [ ` use ` declarations] ( items/use-declarations.html )
56
- * [ function definitions] ( items/functions.html )
57
- * [ type definitions] ( items/type-aliases.html )
58
- * [ struct definitions] ( items/structs.html )
59
- * [ enumeration definitions] ( items/enumerations.html )
60
- * [ union definitions] ( items/unions.html )
61
- * [ constant items] ( items/constant-items.html )
62
- * [ static items] ( items/static-items.html )
63
- * [ trait definitions] ( items/traits.html )
64
- * [ implementations] ( items/implementations.html )
65
- * [ ` extern ` blocks] ( items/external-blocks.html )
34
+ * [ modules]
35
+ * [ ` extern crate ` declarations]
36
+ * [ ` use ` declarations]
37
+ * [ function definitions]
38
+ * [ type definitions]
39
+ * [ struct definitions]
40
+ * [ enumeration definitions]
41
+ * [ union definitions]
42
+ * [ constant items]
43
+ * [ static items]
44
+ * [ trait definitions]
45
+ * [ implementations]
46
+ * [ ` extern ` blocks]
66
47
67
48
Some items form an implicit scope for the declaration of sub-items. In other
68
49
words, within a function or module, declarations of items can (in many cases)
@@ -73,3 +54,33 @@ as if the item was declared outside the scope — it is still a static item
73
54
qualified by the name of the enclosing item, or is private to the enclosing
74
55
item (in the case of functions). The grammar specifies the exact locations in
75
56
which sub-item declarations may appear.
57
+
58
+ [ _ConstantItem_ ] : items/constant-items.html
59
+ [ _Enumeration_ ] : items/enumerations.html
60
+ [ _ExternBlock_ ] : items/external-blocks.html
61
+ [ _ExternCrate_ ] : items/extern-crates.html
62
+ [ _Function_ ] : items/functions.html
63
+ [ _Implementation_ ] : items/implementations.html
64
+ [ _Module_ ] : items/modules.html
65
+ [ _OuterAttribute_ ] : attributes.html
66
+ [ _StaticItem_ ] : items/static-items.html
67
+ [ _Struct_ ] : items/structs.html
68
+ [ _Trait_ ] : items/traits.html
69
+ [ _TypeAlias_ ] : items/type-aliases.html
70
+ [ _Union_ ] : items/unions.html
71
+ [ _UseDeclaration_ ] : items/use-declarations.html
72
+ [ _Visibility_ ] : visibility-and-privacy.html
73
+ [ `extern crate` declarations ] : items/extern-crates.html
74
+ [ `extern` blocks ] : items/external-blocks.html
75
+ [ `use` declarations ] : items/use-declarations.html
76
+ [ constant items ] : items/constant-items.html
77
+ [ enumeration definitions ] : items/enumerations.html
78
+ [ function definitions ] : items/functions.html
79
+ [ implementations ] : items/implementations.html
80
+ [ modules ] : items/modules.html
81
+ [ paths ] : paths.html
82
+ [ static items ] : items/static-items.html
83
+ [ struct definitions ] : items/structs.html
84
+ [ trait definitions ] : items/traits.html
85
+ [ type definitions ] : items/type-aliases.html
86
+ [ union definitions ] : items/unions.html
0 commit comments