summaryrefslogtreecommitdiffstats
path: root/src/doc/rust-by-example/src/std.md
blob: 8863c788ae85a6b87cab27f15f794c0f0aec49fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Std library types

The `std` library provides many custom types which expands drastically on
the `primitives`. Some of these include:

* growable `String`s like: `"hello world"`
* growable vectors: `[1, 2, 3]`
* optional types: `Option<i32>`
* error handling types: `Result<i32, i32>`
* heap allocated pointers: `Box<i32>`

### See also:

[primitives] and [the std library][std]

[primitives]: primitives.md
[std]: https://doc.rust-lang.org/std/