|
1 | | -//! The Rust Prelude. |
| 1 | +//! # The Rust Prelude |
2 | 2 | //! |
3 | 3 | //! Rust comes with a variety of things in its standard library. However, if |
4 | 4 | //! you had to manually import every single thing that you used, it would be |
|
28 | 28 | //! The current version of the prelude (version 1) lives in |
29 | 29 | //! [`std::prelude::v1`], and re-exports the following: |
30 | 30 | //! |
31 | | -//! * [`std::marker`]::{[`Copy`], [`Send`], [`Sized`], [`Sync`], [`Unpin`]}, |
| 31 | +//! * [`std::marker`]::{[`Copy`], [`Send`], [`Sized`], [`Sync`], [`Unpin`]}: |
32 | 32 | //! marker traits that indicate fundamental properties of types. |
33 | | -//! * [`std::ops`]::{[`Drop`], [`Fn`], [`FnMut`], [`FnOnce`]}, various |
| 33 | +//! * [`std::ops`]::{[`Drop`], [`Fn`], [`FnMut`], [`FnOnce`]}: various |
34 | 34 | //! operations for both destructors and overloading `()`. |
35 | | -//! * [`std::mem`]::[`drop`][`mem::drop`], a convenience function for explicitly |
| 35 | +//! * [`std::mem`]::[`drop`][`mem::drop`]: a convenience function for explicitly |
36 | 36 | //! dropping a value. |
37 | | -//! * [`std::boxed`]::[`Box`], a way to allocate values on the heap. |
38 | | -//! * [`std::borrow`]::[`ToOwned`], the conversion trait that defines |
| 37 | +//! * [`std::boxed`]::[`Box`]: a way to allocate values on the heap. |
| 38 | +//! * [`std::borrow`]::[`ToOwned`]: the conversion trait that defines |
39 | 39 | //! [`to_owned`], the generic method for creating an owned type from a |
40 | 40 | //! borrowed type. |
41 | | -//! * [`std::clone`]::[`Clone`], the ubiquitous trait that defines |
| 41 | +//! * [`std::clone`]::[`Clone`]: the ubiquitous trait that defines |
42 | 42 | //! [`clone`][`Clone::clone`], the method for producing a copy of a value. |
43 | | -//! * [`std::cmp`]::{[`PartialEq`], [`PartialOrd`], [`Eq`], [`Ord`] }, the |
| 43 | +//! * [`std::cmp`]::{[`PartialEq`], [`PartialOrd`], [`Eq`], [`Ord`]}: the |
44 | 44 | //! comparison traits, which implement the comparison operators and are often |
45 | 45 | //! seen in trait bounds. |
46 | | -//! * [`std::convert`]::{[`AsRef`], [`AsMut`], [`Into`], [`From`]}, generic |
| 46 | +//! * [`std::convert`]::{[`AsRef`], [`AsMut`], [`Into`], [`From`]}: generic |
47 | 47 | //! conversions, used by savvy API authors to create overloaded methods. |
48 | 48 | //! * [`std::default`]::[`Default`], types that have default values. |
49 | | -//! * [`std::iter`]::{[`Iterator`], [`Extend`], [`IntoIterator`] |
50 | | -//! [`DoubleEndedIterator`], [`ExactSizeIterator`]}, iterators of various |
| 49 | +//! * [`std::iter`]::{[`Iterator`], [`Extend`], [`IntoIterator`], |
| 50 | +//! [`DoubleEndedIterator`], [`ExactSizeIterator`]}: iterators of various |
51 | 51 | //! kinds. |
52 | 52 | //! * [`std::option`]::[`Option`]::{[`self`][`Option`], [`Some`], [`None`]}, a |
53 | 53 | //! type which expresses the presence or absence of a value. This type is so |
54 | 54 | //! commonly used, its variants are also exported. |
55 | | -//! * [`std::result`]::[`Result`]::{[`self`][`Result`], [`Ok`], [`Err`]}, a type |
| 55 | +//! * [`std::result`]::[`Result`]::{[`self`][`Result`], [`Ok`], [`Err`]}: a type |
56 | 56 | //! for functions that may succeed or fail. Like [`Option`], its variants are |
57 | 57 | //! exported as well. |
58 | | -//! * [`std::string`]::{[`String`], [`ToString`]}, heap allocated strings. |
59 | | -//! * [`std::vec`]::[`Vec`], a growable, heap-allocated vector. |
| 58 | +//! * [`std::string`]::{[`String`], [`ToString`]}: heap-allocated strings. |
| 59 | +//! * [`std::vec`]::[`Vec`]: a growable, heap-allocated vector. |
60 | 60 | //! |
61 | 61 | //! [`mem::drop`]: crate::mem::drop |
62 | 62 | //! [`std::borrow`]: crate::borrow |
|
0 commit comments