Type Alias extendr_api::prelude::RawArrayView

source ·
pub type RawArrayView<A, D> = ArrayBase<RawViewRepr<*const A>, D>;
Expand description

A read-only array view without a lifetime.

This is similar to ArrayView but does not carry any lifetime or ownership information, and its data cannot be read without an unsafe conversion into an ArrayView. The relationship between RawArrayView and ArrayView is somewhat analogous to the relationship between *const T and &T, but RawArrayView has additional requirements that *const T does not, such as non-nullness.

The RawArrayView<A, D> is parameterized by A for the element type and D for the dimensionality.

Raw array views have all the methods of an array (see ArrayBase).

See also RawArrayViewMut.

§Warning

You can’t use this type with an arbitrary raw pointer; see from_shape_ptr for details.

Aliased Type§

struct RawArrayView<A, D> {
    pub(crate) data: RawViewRepr<*const A>,
    pub(crate) ptr: NonNull<A>,
    pub(crate) dim: D,
    pub(crate) strides: D,
}

Fields§

§data: RawViewRepr<*const A>§ptr: NonNull<A>§dim: D§strides: D