File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,15 @@ pub(crate) trait SealedStorage {
13
13
/// - [`OwnedStorage`]: stores the data in an array `[T; N]` whose size is known at compile time.
14
14
/// - [`ViewStorage`]: stores the data in an unsized `[T]`.
15
15
///
16
- /// This allows containers to be generic over either sized or unsized storage.
16
+ /// This allows containers to be generic over either sized or unsized storage. For example,
17
+ /// the [`vec`](crate::vec) module contains a [`VecInner`](crate::vec::VecInner) struct
18
+ /// that's generic on [`Storage`], and two type aliases for convenience:
19
+ ///
20
+ /// - [`Vec<T, N>`](crate::vec::Vec) = `VecInner<T, OwnedStorage<N>>`
21
+ /// - [`VecView<T>`](crate::vec::VecView) = `VecInner<T, ViewStorage>`
22
+ ///
23
+ /// `Vec` can be unsized into `VecView`, either by unsizing coercions such as `&mut Vec -> &mut VecView` or
24
+ /// `Box<Vec> -> Box<VecView>`, or explicitly with [`.as_view()`](crate::vec::Vec::as_view) or [`.as_mut_view()`](crate::vec::Vec::as_mut_view).
17
25
///
18
26
/// This trait is sealed, so you cannot implement it for your own types. You can only use
19
27
/// the implementations provided by this crate.
You can’t perform that action at this time.
0 commit comments