pub struct CustomVc<T, const R: usize = { default_r() }> { /* private fields */ }
Expand description
A VecDeque
(and Vec
) variant that spreads resize load across pushes.
This variant differs from Vc
in that you can customize the incremental resize chunk size
(R
).
See the crate-level documentation for details.
Implementations§
source§impl<T, const R: usize> CustomVc<T, R>
impl<T, const R: usize> CustomVc<T, R>
sourcepub const fn move_amount() -> usize
pub const fn move_amount() -> usize
The incremental resize chunk size used by this Vc
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates an empty Vc
with space for at least capacity
elements.
Examples
use atone::Vc;
let vector: Vc<u32> = Vc::with_capacity(10);
sourcepub fn first(&self) -> Option<&T>
pub fn first(&self) -> Option<&T>
Returns the first element of the Vc
, or None
if it is empty.
Examples
use atone::Vc;
let mut v = Vc::new();
v.push_back(10);
v.push_back(40);
v.push_back(30);
assert_eq!(Some(&10), v.first());
v.clear();
assert_eq!(None, v.first());
sourcepub fn first_mut(&mut self) -> Option<&mut T>
pub fn first_mut(&mut self) -> Option<&mut T>
Returns a mutable pointer to the first element of the Vc
, or None
if it is empty.
Examples
use atone::Vc;
let mut x = Vc::new();
x.push_back(0);
x.push_back(1);
x.push_back(2);
if let Some(last) = x.first_mut() {
*last = 5;
}
assert_eq!(x, vec![5, 1, 2]);
sourcepub fn last(&self) -> Option<&T>
pub fn last(&self) -> Option<&T>
Returns the last element of the Vc
, or None
if it is empty.
Examples
use atone::Vc;
let mut v = Vc::new();
v.push_back(10);
v.push_back(40);
v.push_back(30);
assert_eq!(Some(&30), v.last());
v.clear();
assert_eq!(None, v.last());
sourcepub fn last_mut(&mut self) -> Option<&mut T>
pub fn last_mut(&mut self) -> Option<&mut T>
Returns a mutable pointer to the last item in the Vc
.
Examples
use atone::Vc;
let mut x = Vc::new();
x.push_back(0);
x.push_back(1);
x.push_back(2);
if let Some(last) = x.last_mut() {
*last = 10;
}
assert_eq!(x, vec![0, 1, 10]);
sourcepub fn get(&self, index: usize) -> Option<&T>
pub fn get(&self, index: usize) -> Option<&T>
Provides a reference to the element at the given index.
Element at index 0 is the front of the queue.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(3);
buf.push_back(4);
buf.push_back(5);
assert_eq!(buf.get(1), Some(&4));
sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut T>
pub fn get_mut(&mut self, index: usize) -> Option<&mut T>
Provides a mutable reference to the element at the given index.
Element at index 0 is the front of the queue.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(3);
buf.push_back(4);
buf.push_back(5);
if let Some(elem) = buf.get_mut(1) {
*elem = 7;
}
assert_eq!(buf[1], 7);
sourcepub fn swap(&mut self, i: usize, j: usize)
pub fn swap(&mut self, i: usize, j: usize)
Swaps elements at indices i
and j
.
i
and j
may be equal.
Element at index 0 is the front of the queue.
Panics
Panics if either index is out of bounds.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(3);
buf.push_back(4);
buf.push_back(5);
assert_eq!(buf, vec![3, 4, 5]);
buf.swap(0, 2);
assert_eq!(buf, vec![5, 4, 3]);
sourcepub fn reverse(&mut self)
pub fn reverse(&mut self)
Reverses the order of elements in the Vc
, in place.
Examples
use atone::Vc;
use std::iter::FromIterator;
let mut v: Vc<_> = (1..=3).collect();
v.reverse();
assert_eq!(v, vec![3, 2, 1]);
sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the number of elements the Vc
can hold without
reallocating.
Examples
use atone::Vc;
let buf: Vc<i32> = Vc::with_capacity(10);
assert!(buf.capacity() >= 10);
sourcepub fn reserve_exact(&mut self, additional: usize)
pub fn reserve_exact(&mut self, additional: usize)
Reserves the minimum capacity for exactly additional
more elements to be inserted in the
given Vc
. Does nothing if the capacity is already sufficient.
Note that the allocator may give the collection more space than it requests. Therefore
capacity can not be relied upon to be precisely minimal. Prefer [reserve
] if future
insertions are expected.
While we try to make this incremental where possible, it may require all-at-once resizing.
Panics
Panics if the new capacity overflows usize
.
Examples
use atone::Vc;
let mut buf: Vc<i32> = vec![1].into_iter().collect();
buf.reserve_exact(10);
assert!(buf.capacity() >= 11);
sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves capacity for at least additional
more elements to be inserted in the given
Vc
. The collection may reserve more space to avoid frequent reallocations.
While we try to make this incremental where possible, it may require all-at-once resizing.
Panics
Panics if the new capacity overflows usize
.
Examples
use atone::Vc;
let mut buf: Vc<i32> = vec![1].into_iter().collect();
buf.reserve(10);
assert!(buf.capacity() >= 11);
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the Vc
as much as possible.
It will drop down as close as possible to the length but the allocator may still inform the
Vc
that there is space for a few more elements.
Examples
use atone::Vc;
let mut buf = Vc::with_capacity(15);
buf.extend(0..4);
assert_eq!(buf.capacity(), 15);
buf.shrink_to_fit();
assert!(buf.capacity() >= 4);
assert!(buf.capacity() < 15);
sourcepub fn truncate(&mut self, len: usize)
pub fn truncate(&mut self, len: usize)
Shortens the Vc
, keeping the first len
elements and dropping
the rest.
If len
is greater than the Vc
’s current length, this has no
effect.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(5);
buf.push_back(10);
buf.push_back(15);
assert_eq!(buf, vec![5, 10, 15]);
buf.truncate(1);
assert_eq!(buf, vec![5]);
sourcepub fn iter(&self) -> Iter<'_, T> ⓘ
pub fn iter(&self) -> Iter<'_, T> ⓘ
Returns a front-to-back iterator.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(5);
buf.push_back(3);
buf.push_back(4);
let b: &[_] = &[&5, &3, &4];
let c: Vec<&i32> = buf.iter().collect();
assert_eq!(&c[..], b);
sourcepub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ
Returns a front-to-back iterator that returns mutable references.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(5);
buf.push_back(3);
buf.push_back(4);
for num in buf.iter_mut() {
*num = *num - 2;
}
let b: &[_] = &[&mut 3, &mut 1, &mut 2];
assert_eq!(&buf.iter_mut().collect::<Vec<&mut i32>>()[..], b);
sourcepub fn as_single_slice(&self) -> Option<&[T]>
pub fn as_single_slice(&self) -> Option<&[T]>
Returns the single slice which contains, in order, the contents of the Vc
, if possible.
You will likely want to call make_contiguous
before calling
this method to ensure that this method returns Some
.
Examples
use atone::Vc;
let mut vector = Vc::with_capacity(3);
vector.push(0);
vector.push(1);
vector.push(2);
assert_eq!(vector.as_single_slice(), Some(&[0, 1, 2][..]));
// Push enough items, and the memory is no longer
// contiguous due to incremental resizing.
for i in 3..16 {
vector.push(i);
}
assert_eq!(vector.as_single_slice(), None);
vector.make_contiguous();
assert_eq!(vector.as_single_slice(), Some(&(0..16).collect::<Vec<_>>()[..]));
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of elements in the Vc
.
Examples
use atone::Vc;
let mut v = Vc::new();
assert_eq!(v.len(), 0);
v.push_back(1);
assert_eq!(v.len(), 1);
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if the Vc
is empty.
Examples
use atone::Vc;
let mut v = Vc::new();
assert!(v.is_empty());
v.push(1);
assert!(!v.is_empty());
sourcepub fn range<Range>(&self, range: Range) -> Iter<'_, T> ⓘwhere
Range: RangeBounds<usize>,
pub fn range<Range>(&self, range: Range) -> Iter<'_, T> ⓘwhere
Range: RangeBounds<usize>,
Creates an iterator that covers the specified range in the VecDeque
.
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
use atone::Vc;
let v: Vc<_> = vec![1, 2, 3].into_iter().collect();
let range = v.range(2..).copied().collect::<Vc<_>>();
assert_eq!(range, vec![3]);
// A full range covers all contents
let all = v.range(..);
assert_eq!(all.len(), 3);
sourcepub fn range_mut<Range>(&mut self, range: Range) -> IterMut<'_, T> ⓘwhere
Range: RangeBounds<usize>,
pub fn range_mut<Range>(&mut self, range: Range) -> IterMut<'_, T> ⓘwhere
Range: RangeBounds<usize>,
Creates an iterator that covers the specified mutable range in the VecDeque
.
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
use atone::Vc;
let mut v: Vc<_> = vec![1, 2, 3].into_iter().collect();
for v in v.range_mut(2..) {
*v *= 2;
}
assert_eq!(v, vec![1, 2, 6]);
// A full range covers all contents
for v in v.range_mut(..) {
*v *= 2;
}
assert_eq!(v, vec![2, 4, 12]);
sourcepub fn drain<Range>(&mut self, range: Range) -> Drain<'_, T> ⓘwhere
Range: RangeBounds<usize>,
pub fn drain<Range>(&mut self, range: Range) -> Drain<'_, T> ⓘwhere
Range: RangeBounds<usize>,
Creates a draining iterator that removes the specified range in the
Vc
and yields the removed items.
Note 1: The element range is removed even if the iterator is not consumed until the end.
Note 2: It is unspecified how many elements are removed from the deque,
if the Drain
value is not dropped, but the borrow it holds expires
(e.g., due to mem::forget
).
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
use atone::Vc;
let mut v: Vc<_> = vec![1, 2, 3].into_iter().collect();
let drained = v.drain(2..).collect::<Vc<_>>();
assert_eq!(drained, vec![3]);
assert_eq!(v, vec![1, 2]);
// A full range clears all contents
v.drain(..);
assert!(v.is_empty());
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears the Vc
, removing all values.
Examples
use atone::Vc;
let mut v = Vc::new();
v.push_back(1);
v.clear();
assert!(v.is_empty());
sourcepub fn contains(&self, x: &T) -> boolwhere
T: PartialEq<T>,
pub fn contains(&self, x: &T) -> boolwhere
T: PartialEq<T>,
Returns true
if the Vc
contains an element equal to the
given value.
Examples
use atone::Vc;
let mut vector: Vc<u32> = Vc::new();
vector.push_back(0);
vector.push_back(1);
assert_eq!(vector.contains(&1), true);
assert_eq!(vector.contains(&10), false);
sourcepub fn front(&self) -> Option<&T>
pub fn front(&self) -> Option<&T>
Provides a reference to the front element, or None
if the Vc
is
empty.
Examples
use atone::Vc;
let mut d = Vc::new();
assert_eq!(d.front(), None);
d.push_back(1);
d.push_back(2);
assert_eq!(d.front(), Some(&1));
sourcepub fn front_mut(&mut self) -> Option<&mut T>
pub fn front_mut(&mut self) -> Option<&mut T>
Provides a mutable reference to the front element, or None
if the
Vc
is empty.
Examples
use atone::Vc;
let mut d = Vc::new();
assert_eq!(d.front_mut(), None);
d.push_back(1);
d.push_back(2);
match d.front_mut() {
Some(x) => *x = 9,
None => (),
}
assert_eq!(d.front(), Some(&9));
sourcepub fn back(&self) -> Option<&T>
pub fn back(&self) -> Option<&T>
Provides a reference to the back element, or None
if the Vc
is
empty.
Examples
use atone::Vc;
let mut d = Vc::new();
assert_eq!(d.back(), None);
d.push_back(1);
d.push_back(2);
assert_eq!(d.back(), Some(&2));
sourcepub fn back_mut(&mut self) -> Option<&mut T>
pub fn back_mut(&mut self) -> Option<&mut T>
Provides a mutable reference to the back element, or None
if the
Vc
is empty.
Examples
use atone::Vc;
let mut d = Vc::new();
assert_eq!(d.back(), None);
d.push_back(1);
d.push_back(2);
match d.back_mut() {
Some(x) => *x = 9,
None => (),
}
assert_eq!(d.back(), Some(&9));
sourcepub fn pop_front(&mut self) -> Option<T>
pub fn pop_front(&mut self) -> Option<T>
Removes the first element and returns it, or None
if the Vc
is
empty.
Examples
use atone::Vc;
let mut d = Vc::new();
d.push_back(1);
d.push_back(2);
assert_eq!(d.pop_front(), Some(1));
assert_eq!(d.pop_front(), Some(2));
assert_eq!(d.pop_front(), None);
sourcepub fn pop_back(&mut self) -> Option<T>
pub fn pop_back(&mut self) -> Option<T>
Removes the last element from the Vc
and returns it, or None
if
it is empty.
Examples
use atone::Vc;
let mut buf = Vc::new();
assert_eq!(buf.pop_back(), None);
buf.push_back(1);
buf.push_back(3);
assert_eq!(buf.pop_back(), Some(3));
sourcepub fn push_back(&mut self, value: T)
pub fn push_back(&mut self, value: T)
Appends an element to the back of the Vc
.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(1);
buf.push_back(3);
assert_eq!(3, *buf.back().unwrap());
sourcepub fn swap_remove_front(&mut self, index: usize) -> Option<T>
pub fn swap_remove_front(&mut self, index: usize) -> Option<T>
Removes an element from anywhere in the Vc
and returns it,
replacing it with the first element.
This does not preserve ordering, but is O(1)
.
Returns None
if index
is out of bounds.
Element at index 0 is the front of the queue.
Examples
use atone::Vc;
let mut buf = Vc::new();
assert_eq!(buf.swap_remove_front(0), None);
buf.push_back(1);
buf.push_back(2);
buf.push_back(3);
assert_eq!(buf, vec![1, 2, 3]);
assert_eq!(buf.swap_remove_front(2), Some(3));
assert_eq!(buf, vec![2, 1]);
sourcepub fn swap_remove_back(&mut self, index: usize) -> Option<T>
pub fn swap_remove_back(&mut self, index: usize) -> Option<T>
Removes an element from anywhere in the Vc
and returns it, replacing it with the
last element.
This does not preserve ordering, but is O(1)
.
Returns None
if index
is out of bounds.
Element at index 0 is the front of the queue.
Examples
use atone::Vc;
let mut buf = Vc::new();
assert_eq!(buf.swap_remove_back(0), None);
buf.push_back(1);
buf.push_back(2);
buf.push_back(3);
assert_eq!(buf, vec![1, 2, 3]);
assert_eq!(buf.swap_remove_back(0), Some(1));
assert_eq!(buf, vec![3, 2]);
sourcepub fn swap_remove(&mut self, index: usize) -> T
pub fn swap_remove(&mut self, index: usize) -> T
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 is O(1).
Panics
Panics if index
is out of bounds.
Examples
let mut v = vec!["foo", "bar", "baz", "qux"];
assert_eq!(v.swap_remove(1), "bar");
assert_eq!(v, ["foo", "qux", "baz"]);
assert_eq!(v.swap_remove(0), "foo");
assert_eq!(v, ["baz", "qux"]);
sourcepub fn insert(&mut self, index: usize, value: T)
pub fn insert(&mut self, index: usize, value: T)
Inserts an element at index
within the Vc
, shifting all elements with indices
greater than or equal to index
towards the back.
Element at index 0 is the front of the queue.
Panics
Panics if index
is greater than Vc
’s length
Examples
use atone::Vc;
let mut vec_deque = Vc::new();
vec_deque.push_back('a');
vec_deque.push_back('b');
vec_deque.push_back('c');
assert_eq!(vec_deque, vec!['a', 'b', 'c']);
vec_deque.insert(1, 'd');
assert_eq!(vec_deque, vec!['a', 'd', 'b', 'c']);
sourcepub fn push_front(&mut self, value: T)
pub fn push_front(&mut self, value: T)
Inserts an element at the front of the queue, shifting all elements with indices
greater than or equal to index
towards the back.
Panics
Panics if index
is greater than Vc
’s length
Examples
use atone::Vc;
let mut vec_deque = Vc::new();
vec_deque.push_front('a');
vec_deque.push_front('b');
vec_deque.push_front('c');
assert_eq!(vec_deque, vec!['c', 'b', 'a']);
vec_deque.insert(1, 'd');
assert_eq!(vec_deque, vec!['c', 'd', 'b', 'a']);
sourcepub fn remove(&mut self, index: usize) -> T
pub fn remove(&mut self, index: usize) -> T
Removes and returns the element at index
from the Vc
.
Whichever end is closer to the removal point will be moved to make
room, and all the affected elements will be moved to new positions.
Panics
Panics if index
is out of bounds.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(1);
buf.push_back(2);
buf.push_back(3);
assert_eq!(buf, vec![1, 2, 3]);
assert_eq!(buf.remove(1), 2);
assert_eq!(buf, vec![1, 3]);
sourcepub fn split_off(&mut self, at: usize) -> Self
pub fn split_off(&mut self, at: usize) -> Self
Splits the Vc
into two at the given index.
Returns a newly allocated Vc
. self
contains elements [0, at)
,
and the returned Vc
contains elements [at, len)
.
Note that the capacity of self
does not change.
Element at index 0 is the front of the queue.
Panics
Panics if at > len
.
Examples
use atone::Vc;
let mut buf: Vc<_> = vec![1,2,3].into_iter().collect();
let buf2 = buf.split_off(1);
assert_eq!(buf, vec![1]);
assert_eq!(buf2, vec![2, 3]);
sourcepub fn append(&mut self, other: &mut Self)
pub fn append(&mut self, other: &mut Self)
Moves all the elements of other
into self
, leaving other
empty.
Panics
Panics if the new number of elements in self overflows a usize
.
Examples
use atone::Vc;
let mut buf: Vc<_> = vec![1, 2].into_iter().collect();
let mut buf2: Vc<_> = vec![3, 4].into_iter().collect();
buf.append(&mut buf2);
assert_eq!(buf, vec![1, 2, 3, 4]);
assert_eq!(buf2, vec![]);
sourcepub fn retain<F>(&mut self, f: F)
pub fn retain<F>(&mut self, f: F)
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
use atone::Vc;
let mut buf = Vc::new();
buf.extend(1..5);
buf.retain(|&x| x % 2 == 0);
assert_eq!(buf, vec![2, 4]);
The exact order may be useful for tracking external state, like an index.
use atone::Vc;
let mut buf = Vc::new();
buf.extend(1..6);
let keep = [false, true, true, false, true];
let mut i = 0;
buf.retain(|_| (keep[i], i += 1).0);
assert_eq!(buf, vec![2, 3, 5]);
sourcepub fn resize_with(&mut self, new_len: usize, generator: impl FnMut() -> T)
pub fn resize_with(&mut self, new_len: usize, generator: impl FnMut() -> T)
Modifies the Vc
in-place so that len()
is equal to new_len
,
either by removing excess elements from the back or by appending
elements generated by calling generator
to the back.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(5);
buf.push_back(10);
buf.push_back(15);
assert_eq!(buf, vec![5, 10, 15]);
buf.resize_with(5, Default::default);
assert_eq!(buf, vec![5, 10, 15, 0, 0]);
buf.resize_with(2, || unreachable!());
assert_eq!(buf, vec![5, 10]);
let mut state = 100;
buf.resize_with(5, || { state += 1; state });
assert_eq!(buf, vec![5, 10, 101, 102, 103]);
sourcepub fn make_contiguous(&mut self) -> &mut [T]
pub fn make_contiguous(&mut self) -> &mut [T]
Rearranges the internal storage so that all elements are in one contiguous slice, which is then returned.
This method does not allocate and does not change the order of the inserted elements. As it returns a mutable slice, this can be used to sort or binary search a deque.
This method will also move over leftover items from the last resize, if any.
Examples
Sorting the content of a deque.
use atone::Vc;
let mut buf = Vc::with_capacity(3);
for i in 1..=16 {
buf.push(16 - i);
}
// The backing memory of buf is now split,
// since some items are left over after the resize.
// To sort the list, we make it contiguous, and then sort.
buf.make_contiguous().sort();
assert_eq!(buf, (0..16).collect::<Vec<_>>());
// Similarly, we can sort it in reverse order.
buf.make_contiguous().sort_by(|a, b| b.cmp(a));
assert_eq!(buf, (1..=16).map(|i| 16 - i).collect::<Vec<_>>());
Getting immutable access to the contiguous slice.
use atone::Vc;
let mut buf = Vc::new();
for i in 1..=3 {
buf.push(i);
}
buf.make_contiguous();
if let Some(slice) = buf.as_single_slice() {
// we can now be sure that `slice` contains all elements of the deque,
// while still having immutable access to `buf`.
assert_eq!(buf.len(), slice.len());
assert_eq!(slice, &[1, 2, 3] as &[_]);
}
source§impl<T: Clone, const R: usize> CustomVc<T, R>
impl<T: Clone, const R: usize> CustomVc<T, R>
sourcepub fn resize(&mut self, new_len: usize, value: T)
pub fn resize(&mut self, new_len: usize, value: T)
Modifies the Vc
in-place so that len()
is equal to new_len,
either by removing excess elements from the back or by appending clones of value
to the back.
Examples
use atone::Vc;
let mut buf = Vc::new();
buf.push_back(5);
buf.push_back(10);
buf.push_back(15);
assert_eq!(buf, vec![5, 10, 15]);
buf.resize(2, 0);
assert_eq!(buf, vec![5, 10]);
buf.resize(5, 20);
assert_eq!(buf, vec![5, 10, 20, 20, 20]);
Trait Implementations§
source§impl<'a, T: 'a + Copy, const R: usize> Extend<&'a T> for CustomVc<T, R>
impl<'a, T: 'a + Copy, const R: usize> Extend<&'a T> for CustomVc<T, R>
source§fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl<A, const R: usize> Extend<A> for CustomVc<A, R>
impl<A, const R: usize> Extend<A> for CustomVc<A, R>
source§fn extend<T: IntoIterator<Item = A>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = A>>(&mut self, iter: T)
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl<A, const R: usize> FromIterator<A> for CustomVc<A, R>
impl<A, const R: usize> FromIterator<A> for CustomVc<A, R>
source§fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self
source§impl<'a, T, const R: usize> IntoIterator for &'a CustomVc<T, R>
impl<'a, T, const R: usize> IntoIterator for &'a CustomVc<T, R>
source§impl<'a, T, const R: usize> IntoIterator for &'a mut CustomVc<T, R>
impl<'a, T, const R: usize> IntoIterator for &'a mut CustomVc<T, R>
source§impl<T, const R: usize> IntoIterator for CustomVc<T, R>
impl<T, const R: usize> IntoIterator for CustomVc<T, R>
source§impl<A: Ord, const R: usize> Ord for CustomVc<A, R>
impl<A: Ord, const R: usize> Ord for CustomVc<A, R>
source§impl<A, B, const R: usize> PartialEq<&[B]> for CustomVc<A, R>where
A: PartialEq<B>,
impl<A, B, const R: usize> PartialEq<&[B]> for CustomVc<A, R>where
A: PartialEq<B>,
source§impl<A, B, const R: usize> PartialEq<&mut [B]> for CustomVc<A, R>where
A: PartialEq<B>,
impl<A, B, const R: usize> PartialEq<&mut [B]> for CustomVc<A, R>where
A: PartialEq<B>,
source§impl<A, B, const R: usize> PartialEq<CustomVc<A, R>> for &[B]where
A: PartialEq<B>,
impl<A, B, const R: usize> PartialEq<CustomVc<A, R>> for &[B]where
A: PartialEq<B>,
source§impl<A, B, const R: usize> PartialEq<CustomVc<A, R>> for &mut [B]where
A: PartialEq<B>,
impl<A, B, const R: usize> PartialEq<CustomVc<A, R>> for &mut [B]where
A: PartialEq<B>,
source§impl<A, B, const R: usize> PartialEq<CustomVc<A, R>> for Vec<B>where
A: PartialEq<B>,
impl<A, B, const R: usize> PartialEq<CustomVc<A, R>> for Vec<B>where
A: PartialEq<B>,
source§impl<A, B, const R: usize> PartialEq<Vec<B>> for CustomVc<A, R>where
A: PartialEq<B>,
impl<A, B, const R: usize> PartialEq<Vec<B>> for CustomVc<A, R>where
A: PartialEq<B>,
source§impl<A: PartialEq, const R: usize> PartialEq for CustomVc<A, R>
impl<A: PartialEq, const R: usize> PartialEq for CustomVc<A, R>
source§impl<A: PartialOrd, const R: usize> PartialOrd for CustomVc<A, R>
impl<A: PartialOrd, const R: usize> PartialOrd for CustomVc<A, R>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl<A: Eq, const R: usize> Eq for CustomVc<A, R>
Auto Trait Implementations§
impl<T, const R: usize> RefUnwindSafe for CustomVc<T, R>where
T: RefUnwindSafe,
impl<T, const R: usize> Send for CustomVc<T, R>where
T: Send,
impl<T, const R: usize> Sync for CustomVc<T, R>where
T: Sync,
impl<T, const R: usize> Unpin for CustomVc<T, R>where
T: Unpin,
impl<T, const R: usize> UnwindSafe for CustomVc<T, R>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<'data, I> IntoParallelRefIterator<'data> for I
impl<'data, I> IntoParallelRefIterator<'data> for I
§type Iter = <&'data I as IntoParallelIterator>::Iter
type Iter = <&'data I as IntoParallelIterator>::Iter
§type Item = <&'data I as IntoParallelIterator>::Item
type Item = <&'data I as IntoParallelIterator>::Item
&'data T
reference type.source§impl<'data, I> IntoParallelRefMutIterator<'data> for I
impl<'data, I> IntoParallelRefMutIterator<'data> for I
§type Iter = <&'data mut I as IntoParallelIterator>::Iter
type Iter = <&'data mut I as IntoParallelIterator>::Iter
§type Item = <&'data mut I as IntoParallelIterator>::Item
type Item = <&'data mut I as IntoParallelIterator>::Item
&'data mut T
reference.source§fn par_iter_mut(
&'data mut self
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
fn par_iter_mut( &'data mut self ) -> <I as IntoParallelRefMutIterator<'data>>::Iter
self
. Read more