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
//! Traits for pushing data to the front or back of a collection.
use LenMut;
use Push;
/// A trait for moving data onto the back of a collection.
///
/// Some collections have a particular location onto which new values are pushed, and the "back"
/// refers to this canonical location. If you don't care where values are pushed, you should use
/// [`Push`] by itself instead.
///
/// Collections which have two locations to push values should also implement [`PushFront`].
///
/// [`Push`]: ../base/trait.Push.html
/// [`PushFront`]: trait.PushFront.html
/// A trait for moving data onto the front of a collection.
///
/// Some collections have two locations to push values; for these collections, we assign one
/// location as the "back" and the other as the "front." See [`PushBack`] for more information, or
/// use [`Push`] by itself if you don't care where values are pushed.
///
/// [`PushBack`]: trait.PushBack.html
/// [`Push`]: ../base/trait.Push.html
/// A trait for moving data to a specific index within a collection.
///
/// Unlike [`Push`], insertions must take a linear amount of time and space with respect to the
/// length of both the collection and the inserted item.
///
/// [`Push`]: ../base/trait.Push.html