diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 9c970ac..f40b617 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -1183,6 +1183,18 @@ impl ArrayVec { } } +impl ArrayVec { + /// Returns the reference to the inner array of the `ArrayVec`. + /// + /// This returns the full array, even if the `ArrayVec` length is currently + /// less than that. + #[inline(always)] + #[must_use] + pub const fn as_inner(&self) -> &A { + &self.data + } +} + /// Splicing iterator for `ArrayVec` /// See [`ArrayVec::splice`](ArrayVec::::splice) pub struct ArrayVecSplice<'p, A: Array, I: Iterator> {