[−][src]Struct coca::vec::Vec
A contiguous growable array type with constant capacity.
Generic over the storage buffer type Buf
and the index type Idx
.
See the module-level documentation for more.
Implementations
impl<E, B, I> Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
pub fn into_raw_parts(self) -> (B, I)
[src]
Decomposes a Vec<E, B, I>
into its raw parts.
Returns the raw storage type and the length of the vector in elements.
These are the same arguments in the same order as the arguments to
from_raw_parts
.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 5]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.extend(&[1, 2, 3]); let (slice, len) = vec.into_raw_parts(); unsafe { assert_eq!(slice[0].assume_init(), 1); assert_eq!(slice[1].assume_init(), 2); assert_eq!(slice[2].assume_init(), 3); // other elements are uninitialized }
pub unsafe fn from_raw_parts(buf: B, length: I) -> Self
[src]
Creates a Vec<E, B, I>
directly from its raw parts.
Safety
Callers must ensure that values stored in buf
at all positions less
than length
are initialized, and that length
is less than or equal
to buf.capacity()
.
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 5]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.extend(&[1, 2, 3]); let (buf, length) = vec.into_raw_parts(); let vec = unsafe { coca::SliceVec::<u32>::from_raw_parts(buf, length) }; assert_eq!(vec.as_slice(), &[1, 2, 3]);
pub fn capacity(&self) -> usize
[src]
Returns the number of elements the vector can hold.
pub fn len(&self) -> usize
[src]
Returns the number of elements in the vector, also referred to as its 'length'.
pub fn is_empty(&self) -> bool
[src]
Returns true
if the vector contains no elements.
pub fn is_full(&self) -> bool
[src]
Returns true
if the vector contains the maximum number of elements.
pub fn pop(&mut self) -> Option<E>
[src]
Removes the last element from the vector and returns it, or None
if it is empty.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 3]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); assert_eq!(vec.pop(), Some(3)); assert_eq!(vec, &[1, 2][..]);
pub fn as_slice(&self) -> &[E]
[src]
Extracts a slice containing the entire vector.
Equivalent to &s[..]
.
pub fn as_mut_slice(&mut self) -> &mut [E]
[src]
Extracts a mutable slice of the entire vector.
Equivalent to &mut s[..]
.
pub fn get(&self, index: I) -> Option<&E>
[src]
Returns a reference to the element at the specified index, or None
if the index is out of bounds.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 3]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); assert_eq!(vec.get(1), Some(&2)); assert_eq!(vec.get(3), None);
pub fn get_mut(&mut self, index: I) -> Option<&mut E>
[src]
Returns a mutable reference to the element at the specified index, or
None
if the index is out of bounds.
pub fn try_push(&mut self, value: E) -> Result<(), E>
[src]
Appends an element to the back of the vector, returning Err(value)
if
it is already at capacity.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 3]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); assert!(vec.try_push(1).is_ok()); assert!(vec.try_push(2).is_ok()); assert!(vec.try_push(3).is_ok()); assert_eq!(vec.try_push(4), Err(4));
pub fn push(&mut self, value: E)
[src]
Appends an element to the back of the vector.
Panics
Panics if the vector is already at capacity. See try_push
for a checked version that never panics.
pub fn truncate(&mut self, len: I)
[src]
Shortens the vector, keeping the first len
elements and dropping the rest.
If len
is greater than the vector's current length, this has no effect.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 4]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); vec.push(4); vec.truncate(6); assert_eq!(vec, &[1, 2, 3, 4][..]); vec.truncate(2); assert_eq!(vec, &[1, 2][..]);
pub fn clear(&mut self)
[src]
Clears the vector, dropping all values.
Equivalent to s.truncate(0)
.
pub fn swap(&mut self, fst: I, snd: I)
[src]
Swaps two elements in the vector.
Panics
Pancis if either argument is out of bounds.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 4]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); vec.push(4); vec.swap(0, 2); assert_eq!(vec, &[3, 2, 1, 4][..]);
pub fn swap_remove(&mut self, index: I) -> E
[src]
Removes an element from the vector and returns it.
The removed element is replaced by the last element of the vector. This does not preserve ordering, but it is O(1).
Panics
Panics if index
is out of bounds.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 4]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); vec.push(4); vec.swap_remove(1); assert_eq!(vec, &[1, 4, 3][..]);
pub fn insert(&mut self, index: I, element: E)
[src]
Inserts an element at position index
within the vector, shifting all
elements after it to the right.
Panics
Panics if the vector is already full, or if index
is out of bounds.
See try_insert
for a checked version.
pub fn try_insert(&mut self, index: I, element: E) -> Result<(), E>
[src]
Inserts an element at position index
within the vector, shifting all
elements after it to the right.
Returns back Err(element)
if the vector is already at capacity.
Panics
Panics if index
is out of bounds.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 4]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); assert!(vec.try_insert(3, 4).is_ok()); assert!(vec.try_insert(4, 5).is_err()); assert_eq!(vec, &[1, 2, 3, 4][..]);
pub fn replace(&mut self, index: I, element: E) -> E
[src]
Places an element at position index
within the vector, returning the
element previously stored there.
Panics
Panics if index
is out of bounds.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 4]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); assert_eq!(vec.replace(1, 4), 2); assert_eq!(vec, &[1, 4, 3][..]);
pub fn remove(&mut self, index: I) -> E
[src]
Removes and returns the element at position index
within the vector,
shifting all elements after it to the left.
Panics
Panics if index
is out of bounds.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 4]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); vec.remove(0); assert_eq!(vec, &[2, 3][..]);
pub fn retain<F>(&mut self, f: F) where
F: FnMut(&E) -> bool,
[src]
F: FnMut(&E) -> bool,
Retains only the elements specified by the predicate.
In other words, remove all elements e
such that f(&e)
returns false.
This method operates in place, visiting each element exactly once in the
original order, and preserves the order of the retained elements.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 4]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); vec.push(4); vec.retain(|&x| x % 2 == 0); assert_eq!(vec, &[2, 4][..]);
The exact order may be useful for tracking external state, like an index.
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 4]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); vec.push(4); let keep = [false, true, true, false]; let mut i = 0; vec.retain(|_| (keep[i], i += 1).0); assert_eq!(vec, &[2, 3][..]);
pub fn drain<R: RangeBounds<I>>(&mut self, range: R) -> Drain<'_, E, B, I>ⓘ
[src]
Creates a draining iterator that removes the specified range in the vector and yields the removed items.
When the iterator is dropped, all elements in the range are removed
from the vector, even if the iterator was not fully consumed. If the
iterator is not dropped (with core::mem::forget
for example),
it is unspecified how many elements are removed.
Panics
Panics if the starting point is greater than the end point or if the end point is greater than the length of the vector.
Examples
let mut backing_region = [core::mem::MaybeUninit::<u32>::uninit(); 5]; let mut vec = coca::SliceVec::<u32>::from(&mut backing_region[..]); vec.push(1); vec.push(2); vec.push(3); vec.push(4); vec.push(5); let mut iter = vec.drain(1..3); assert_eq!(iter.next(), Some(2)); assert_eq!(iter.next(), Some(3)); assert_eq!(iter.next(), None); drop(iter); assert_eq!(vec, &[1, 4, 5][..]);
impl<E, I> Vec<E, Box<[MaybeUninit<E>], Global>, I> where
E: Copy,
I: Capacity,
[src]
E: Copy,
I: Capacity,
pub fn with_capacity(capacity: I) -> Self
[src]
alloc
only.Constructs a new, empty AllocVec<E, I>
with the specified capacity.
Panics
Panics if the specified capacity cannot be represented by a usize
.
impl<E, I, const C: usize> Vec<E, [MaybeUninit<E>; C], I> where
I: Capacity,
[src]
I: Capacity,
Trait Implementations
impl<E, B, I> AsMut<[E]> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
impl<E, B, I> AsRef<[E]> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
impl<E, I, const C: usize> Clone for Vec<E, [MaybeUninit<E>; C], I> where
E: Clone,
I: Capacity,
[src]
E: Clone,
I: Capacity,
nightly
only.pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
[src]
impl<E, B, I> Debug for Vec<E, B, I> where
E: Debug,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: Debug,
B: ContiguousStorage<E>,
I: Capacity,
impl<E, I, const C: usize> Default for Vec<E, [MaybeUninit<E>; C], I> where
I: Capacity,
[src]
I: Capacity,
nightly
only.impl<E, B, I> Deref for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
impl<E, B, I> DerefMut for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
impl<E, B, I> Drop for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
impl<E, B, I> Eq for Vec<E, B, I> where
E: Eq,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: Eq,
B: ContiguousStorage<E>,
I: Capacity,
impl<'a, E, B, Idx> Extend<&'a E> for Vec<E, B, Idx> where
E: 'a + Clone,
B: ContiguousStorage<E>,
Idx: Capacity,
[src]
E: 'a + Clone,
B: ContiguousStorage<E>,
Idx: Capacity,
pub fn extend<I: IntoIterator<Item = &'a E>>(&mut self, iter: I)
[src]
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl<E, B, Idx> Extend<E> for Vec<E, B, Idx> where
B: ContiguousStorage<E>,
Idx: Capacity,
[src]
B: ContiguousStorage<E>,
Idx: Capacity,
pub fn extend<I: IntoIterator<Item = E>>(&mut self, iter: I)
[src]
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl<E, I, const C: usize> From<&'_ [E]> for Vec<E, [MaybeUninit<E>; C], I> where
E: Clone,
I: Capacity,
[src]
E: Clone,
I: Capacity,
nightly
only.impl<E, I, const C: usize> From<&'_ mut [E]> for Vec<E, [MaybeUninit<E>; C], I> where
E: Clone,
I: Capacity,
[src]
E: Clone,
I: Capacity,
nightly
only.impl<E, B, I> From<B> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
pub fn from(buf: B) -> Self
[src]
Converts a contiguous block of memory into an empty vector.
Panics
This may panic if the index type I cannot represent buf.capacity()
.
impl<E, B, I> From<Vec<E, B, I>> for BinaryHeap<E, B, I> where
E: Ord,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: Ord,
B: ContiguousStorage<E>,
I: Capacity,
pub fn from(vec: Vec<E, B, I>) -> Self
[src]
Converts a Vec
into a binary heap.
This conversion happens in-place, and has O(n) time complexity.
impl<E, B: ContiguousStorage<E>, I: Capacity> From<Vec<E, B, I>> for Deque<E, B, I>
[src]
impl<E, I, const N: usize> FromIterator<E> for Vec<E, [MaybeUninit<E>; N], I> where
I: Capacity,
[src]
I: Capacity,
nightly
only.pub fn from_iter<It: IntoIterator<Item = E>>(iter: It) -> Self
[src]
Creates a vector backed by an inline array from an iterator.
Panics
Panics if the iterator yields more than N
elements.
impl<E, B, I> Hash for Vec<E, B, I> where
E: Hash,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: Hash,
B: ContiguousStorage<E>,
I: Capacity,
pub fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<E, B, I> Index<I> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
type Output = E
The returned type after indexing.
pub fn index(&self, index: I) -> &Self::Output
[src]
impl<E, B, I> Index<Range<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
type Output = [E]
The returned type after indexing.
pub fn index(&self, index: Range<I>) -> &Self::Output
[src]
impl<E, B, I> Index<RangeFrom<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
type Output = [E]
The returned type after indexing.
pub fn index(&self, index: RangeFrom<I>) -> &Self::Output
[src]
impl<E, B, I> Index<RangeFull> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
type Output = [E]
The returned type after indexing.
pub fn index(&self, index: RangeFull) -> &Self::Output
[src]
impl<E, B, I> Index<RangeInclusive<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
type Output = [E]
The returned type after indexing.
pub fn index(&self, index: RangeInclusive<I>) -> &Self::Output
[src]
impl<E, B, I> Index<RangeTo<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
type Output = [E]
The returned type after indexing.
pub fn index(&self, index: RangeTo<I>) -> &Self::Output
[src]
impl<E, B, I> Index<RangeToInclusive<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
type Output = [E]
The returned type after indexing.
pub fn index(&self, index: RangeToInclusive<I>) -> &Self::Output
[src]
impl<E, B, I> IndexMut<I> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
impl<E, B, I> IndexMut<Range<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
impl<E, B, I> IndexMut<RangeFrom<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
impl<E, B, I> IndexMut<RangeFull> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
impl<E, B, I> IndexMut<RangeInclusive<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
pub fn index_mut(&mut self, index: RangeInclusive<I>) -> &mut Self::Output
[src]
impl<E, B, I> IndexMut<RangeTo<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
impl<E, B, I> IndexMut<RangeToInclusive<I>> for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
[src]
B: ContiguousStorage<E>,
I: Capacity + PartialOrd,
pub fn index_mut(&mut self, index: RangeToInclusive<I>) -> &mut Self::Output
[src]
impl<E, B, I> IntoIterator for Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
type Item = E
The type of the elements being iterated over.
type IntoIter = IntoIterator<E, B, I>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, E, B, I> IntoIterator for &'a Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
type Item = &'a E
The type of the elements being iterated over.
type IntoIter = Iter<'a, E>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, E, B, I> IntoIterator for &'a mut Vec<E, B, I> where
B: ContiguousStorage<E>,
I: Capacity,
[src]
B: ContiguousStorage<E>,
I: Capacity,
type Item = &'a mut E
The type of the elements being iterated over.
type IntoIter = IterMut<'a, E>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> Self::IntoIter
[src]
impl<E, B, I> Ord for Vec<E, B, I> where
E: Ord,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: Ord,
B: ContiguousStorage<E>,
I: Capacity,
pub fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<V, E, B, I> PartialEq<&'_ [V]> for Vec<E, B, I> where
E: PartialEq<V>,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: PartialEq<V>,
B: ContiguousStorage<E>,
I: Capacity,
pub fn eq(&self, other: &&[V]) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<V, E, B, I> PartialEq<&'_ mut [V]> for Vec<E, B, I> where
E: PartialEq<V>,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: PartialEq<V>,
B: ContiguousStorage<E>,
I: Capacity,
pub fn eq(&self, other: &&mut [V]) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<V, E, B, I, const N: usize> PartialEq<[V; N]> for Vec<E, B, I> where
E: PartialEq<V>,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: PartialEq<V>,
B: ContiguousStorage<E>,
I: Capacity,
nightly
only.pub fn eq(&self, other: &[V; N]) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<AE, AB, AI, BE, BB, BI> PartialEq<Vec<BE, BB, BI>> for Vec<AE, AB, AI> where
AE: PartialEq<BE>,
AB: ContiguousStorage<AE>,
BB: ContiguousStorage<BE>,
AI: Capacity,
BI: Capacity,
[src]
AE: PartialEq<BE>,
AB: ContiguousStorage<AE>,
BB: ContiguousStorage<BE>,
AI: Capacity,
BI: Capacity,
pub fn eq(&self, other: &Vec<BE, BB, BI>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<V, E, B, I> PartialEq<Vec<E, B, I>> for &[V] where
V: PartialEq<E>,
B: ContiguousStorage<E>,
I: Capacity,
[src]
V: PartialEq<E>,
B: ContiguousStorage<E>,
I: Capacity,
pub fn eq(&self, other: &Vec<E, B, I>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<V, E, B, I> PartialEq<Vec<E, B, I>> for &mut [V] where
V: PartialEq<E>,
B: ContiguousStorage<E>,
I: Capacity,
[src]
V: PartialEq<E>,
B: ContiguousStorage<E>,
I: Capacity,
pub fn eq(&self, other: &Vec<E, B, I>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<V, E, B, I, const N: usize> PartialEq<Vec<E, B, I>> for [V; N] where
V: PartialEq<E>,
B: ContiguousStorage<E>,
I: Capacity,
[src]
V: PartialEq<E>,
B: ContiguousStorage<E>,
I: Capacity,
nightly
only.pub fn eq(&self, other: &Vec<E, B, I>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<E, B, I> PartialOrd<Vec<E, B, I>> for Vec<E, B, I> where
E: PartialOrd,
B: ContiguousStorage<E>,
I: Capacity,
[src]
E: PartialOrd,
B: ContiguousStorage<E>,
I: Capacity,
Auto Trait Implementations
impl<Element, Buf, Idx> Send for Vec<Element, Buf, Idx> where
Buf: Send,
Element: Send,
Idx: Send,
[src]
Buf: Send,
Element: Send,
Idx: Send,
impl<Element, Buf, Idx> Sync for Vec<Element, Buf, Idx> where
Buf: Sync,
Element: Sync,
Idx: Sync,
[src]
Buf: Sync,
Element: Sync,
Idx: Sync,
impl<Element, Buf, Idx> Unpin for Vec<Element, Buf, Idx> where
Buf: Unpin,
Element: Unpin,
Idx: Unpin,
[src]
Buf: Unpin,
Element: Unpin,
Idx: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,