We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a990f5d + 5c6d00e commit a90765cCopy full SHA for a90765c
lib.rs
@@ -530,6 +530,20 @@ impl<A: Array> SmallVec<A> {
530
}
531
532
533
+ /// Extracts a slice containing the entire vector.
534
+ ///
535
+ /// Equivalent to `&mut s[..]`.
536
+ pub fn as_slice(&self) -> &[A::Item] {
537
+ self
538
+ }
539
+
540
+ /// Extracts a mutable slice of the entire vector.
541
542
543
+ pub fn as_mut_slice(&mut self) -> &mut [A::Item] {
544
545
546
547
/// Remove the element at position `index`, replacing it with the last element.
548
///
549
/// This does not preserve ordering, but is O(1).
0 commit comments