Skip to content

Commit 3f6404e

Browse files
committed
DOC: Elaborate doc on ArrayView etc type aliases
1 parent 7b8c64e commit 3f6404e

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

src/lib.rs

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,13 +504,27 @@ pub struct ArrayBase<S, D>
504504
/// An array where the data has shared ownership and is copy on write.
505505
/// It can act as both an owner as the data as well as a shared reference (view
506506
/// like).
507+
///
508+
/// The `RcArray<A, D>` is parameterized by `A` for the element type and `D` for
509+
/// the dimensionality.
510+
///
511+
/// [**`ArrayBase`**](struct.ArrayBase.html) is used to implement both the owned
512+
/// arrays and the views; see its docs for an overview of all array features.
513+
///
514+
/// See also:
515+
///
516+
/// + [Constructor Methods for Owned Arrays](struct.ArrayBase.html#constructor-methods-for-owned-arrays)
517+
/// + [Methods For All Array Types](struct.ArrayBase.html#methods-for-all-array-types)
507518
pub type RcArray<A, D> = ArrayBase<OwnedRcRepr<A>, D>;
508519

509520
/// An array that owns its data uniquely.
510521
///
511522
/// `Array` is the main n-dimensional array type, and it owns all its array
512523
/// elements.
513524
///
525+
/// The `Array<A, D>` is parameterized by `A` for the element type and `D` for
526+
/// the dimensionality.
527+
///
514528
/// [**`ArrayBase`**](struct.ArrayBase.html) is used to implement both the owned
515529
/// arrays and the views; see its docs for an overview of all array features.
516530
///
@@ -521,25 +535,34 @@ pub type RcArray<A, D> = ArrayBase<OwnedRcRepr<A>, D>;
521535
/// + Dimensionality-specific type alises
522536
/// [`Array1`](Array1.t.html),
523537
/// [`Array2`](Array2.t.html),
524-
/// [`Array3`](Array3.t.html) and so on.
538+
/// [`Array3`](Array3.t.html), ...,
539+
/// [`ArrayD`](ArrayD.t.html),
540+
/// and so on.
525541
pub type Array<A, D> = ArrayBase<OwnedRepr<A>, D>;
526542

527-
/// A lightweight array view.
543+
/// A read-only array view.
528544
///
529545
/// An array view represents an array or a part of it, created from
530546
/// an iterator, subview or slice of an array.
531547
///
548+
/// The `ArrayView<'a, A, D>` is parameterized by `'a` for the scope of the
549+
/// borrow, `A` for the element type and `D` for the dimensionality.
550+
///
532551
/// Array views have all the methods of an array (see [`ArrayBase`][ab]).
533552
///
534553
/// See also [**Methods Specific To Array Views**](struct.ArrayBase.html#methods-specific-to-array-views)
535554
///
536555
/// [ab]: struct.ArrayBase.html
537556
pub type ArrayView<'a, A, D> = ArrayBase<ViewRepr<&'a A>, D>;
538-
/// A lightweight read-write array view.
557+
558+
/// A read-write array view.
539559
///
540560
/// An array view represents an array or a part of it, created from
541561
/// an iterator, subview or slice of an array.
542562
///
563+
/// The `ArrayViewMut<'a, A, D>` is parameterized by `'a` for the scope of the
564+
/// borrow, `A` for the element type and `D` for the dimensionality.
565+
///
543566
/// Array views have all the methods of an array (see [`ArrayBase`][ab]).
544567
///
545568
/// See also [**Methods Specific To Array Views**](struct.ArrayBase.html#methods-specific-to-array-views)

0 commit comments

Comments
 (0)