[−][src]Struct atone::Vc
A VecDeque
(and Vec
) variant that spreads resize load across pushes.
See the crate-level documentation for details.
Implementations
impl<T> Vc<T>
[src]
pub fn new() -> Self
[src]
pub fn with_capacity(capacity: usize) -> Self
[src]
Creates an empty Vc
with space for at least capacity
elements.
Examples
use atone::Vc; let vector: Vc<u32> = Vc::with_capacity(10);
pub fn get(&self, index: usize) -> Option<&T>
[src]
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));
pub fn get_mut(&mut self, index: usize) -> Option<&mut T>
[src]
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);
pub fn swap(&mut self, i: usize, j: usize)
[src]
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]);
pub fn reverse(&mut self)
[src]
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]);
pub fn capacity(&self) -> usize
[src]
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);
pub fn reserve_exact(&mut self, additional: usize)
[src]
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);
pub fn reserve(&mut self, additional: usize)
[src]
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);
pub fn shrink_to_fit(&mut self)
[src]
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);
pub fn truncate(&mut self, len: usize)
[src]
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]);
pub fn iter(&self) -> Iter<T>
[src]
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);
pub fn iter_mut(&mut self) -> IterMut<T>
[src]
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);
pub fn as_single_slice(&self) -> Option<&[T]>
[src]
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::new(); 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); // TODO: // With make_contiguous, we can bring it back. // vector.make_contiguous(); // assert_eq!(vector.as_single_slice(), Some(&(0..16).collect::<Vec<_>>()[..]));
pub fn len(&self) -> usize
[src]
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);
pub fn is_empty(&self) -> bool
[src]
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());
pub fn range<R>(&self, range: R) -> impl ExactSizeIterator<Item = &T> where
R: RangeBounds<usize>,
[src]
R: 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);
pub fn range_mut<R>(
&mut self,
range: R
) -> impl ExactSizeIterator<Item = &mut T> where
R: RangeBounds<usize>,
[src]
&mut self,
range: R
) -> impl ExactSizeIterator<Item = &mut T> where
R: 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]);
pub fn drain<R>(&mut self, range: R) -> Drain<T> where
R: RangeBounds<usize>,
[src]
R: 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());
pub fn clear(&mut self)
[src]
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());
pub fn contains(&self, x: &T) -> bool where
T: PartialEq<T>,
[src]
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);
pub fn front(&self) -> Option<&T>
[src]
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));
pub fn front_mut(&mut self) -> Option<&mut T>
[src]
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));
pub fn back(&self) -> Option<&T>
[src]
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));
pub fn back_mut(&mut self) -> Option<&mut T>
[src]
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));
pub fn pop_front(&mut self) -> Option<T>
[src]
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);
pub fn pop_back(&mut self) -> Option<T>
[src]
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));
pub fn pop(&mut self) -> Option<T>
[src]
Removes the last element from the Vc
and returns it, or None
if
it is empty.
Examples
let mut vec = vec![1, 2, 3]; assert_eq!(vec.pop(), Some(3)); assert_eq!(vec, [1, 2]);
pub fn push_back(&mut self, value: T)
[src]
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());
pub fn push(&mut self, value: T)
[src]
Appends an element to the back of the Vc
.
Panics
Panics if the number of elements in the vector overflows a usize
.
Examples
let mut vec = vec![1, 2]; vec.push(3); assert_eq!(vec, [1, 2, 3]);
pub fn swap_remove_front(&mut self, index: usize) -> Option<T>
[src]
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]);
pub fn swap_remove_back(&mut self, index: usize) -> Option<T>
[src]
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]);
pub fn swap_remove(&mut self, index: usize) -> T
[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 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"]);
pub fn insert(&mut self, index: usize, value: T)
[src]
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']);
pub fn remove(&mut self, index: usize) -> T
[src]
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]);
pub fn append(&mut self, other: &mut Self)
[src]
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![]);
pub fn retain<F>(&mut self, f: F) where
F: FnMut(&T) -> bool,
[src]
F: FnMut(&T) -> 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
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]);
pub fn resize_with(&mut self, new_len: usize, generator: impl FnMut() -> T)
[src]
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]);
pub fn make_contiguous(&mut self) -> &mut [T]
[src]
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 &[_]); }
impl<T: Clone> Vc<T>
[src]
pub fn resize(&mut self, new_len: usize, value: T)
[src]
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
impl<T: Clone> Clone for Vc<T>
[src]
impl<T: Debug> Debug for Vc<T>
[src]
impl<T> Default for Vc<T>
[src]
impl<'de, T> Deserialize<'de> for Vc<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
fn deserialize_in_place<D>(
deserializer: D,
place: &mut Self
) -> Result<(), D::Error> where
D: Deserializer<'de>,
[src]
deserializer: D,
place: &mut Self
) -> Result<(), D::Error> where
D: Deserializer<'de>,
impl<A: Eq> Eq for Vc<A>
[src]
impl<'a, T: 'a + Copy> Extend<&'a T> for Vc<T>
[src]
fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)
[src]
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl<A> Extend<A> for Vc<A>
[src]
fn extend<T: IntoIterator<Item = A>>(&mut self, iter: T)
[src]
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl<T> From<Vc<T>> for Vec<T>
[src]
impl<T> From<Vc<T>> for VecDeque<T>
[src]
impl<T> From<Vec<T>> for Vc<T>
[src]
impl<T> From<VecDeque<T>> for Vc<T>
[src]
impl<A> FromIterator<A> for Vc<A>
[src]
fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self
[src]
impl<T> FromParallelIterator<T> for Vc<T> where
T: Send,
[src]
T: Send,
fn from_par_iter<I>(par_iter: I) -> Self where
I: IntoParallelIterator<Item = T>,
[src]
I: IntoParallelIterator<Item = T>,
impl<A: Hash> Hash for Vc<A>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<A> Index<usize> for Vc<A>
[src]
impl<A> IndexMut<usize> for Vc<A>
[src]
impl<T> IntoIterator for Vc<T>
[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> IntoIter<T>
[src]
impl<'a, T> IntoIterator for &'a Vc<T>
[src]
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = Iter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Iter<'a, T>
[src]
impl<'a, T> IntoIterator for &'a mut Vc<T>
[src]
type Item = &'a mut T
The type of the elements being iterated over.
type IntoIter = IterMut<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> IterMut<'a, T>
[src]
impl<T: Send> IntoParallelIterator for Vc<T>
[src]
type Item = T
The type of item that the parallel iterator will produce.
type Iter = IntoIter<T>
The parallel iterator type that will be created.
fn into_par_iter(self) -> Self::Iter
[src]
impl<'a, T: Sync> IntoParallelIterator for &'a Vc<T>
[src]
type Item = &'a T
The type of item that the parallel iterator will produce.
type Iter = Iter<'a, T>
The parallel iterator type that will be created.
fn into_par_iter(self) -> Self::Iter
[src]
impl<'a, T: Send> IntoParallelIterator for &'a mut Vc<T>
[src]
type Item = &'a mut T
The type of item that the parallel iterator will produce.
type Iter = IterMut<'a, T>
The parallel iterator type that will be created.
fn into_par_iter(self) -> Self::Iter
[src]
impl<A: Ord> Ord for Vc<A>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a, T> ParallelExtend<&'a T> for Vc<T> where
T: 'a + Copy + Send + Sync,
[src]
T: 'a + Copy + Send + Sync,
fn par_extend<I>(&mut self, par_iter: I) where
I: IntoParallelIterator<Item = &'a T>,
[src]
I: IntoParallelIterator<Item = &'a T>,
impl<T> ParallelExtend<T> for Vc<T> where
T: Send,
[src]
T: Send,
fn par_extend<I>(&mut self, par_iter: I) where
I: IntoParallelIterator<Item = T>,
[src]
I: IntoParallelIterator<Item = T>,
impl<'_, A, B> PartialEq<&'_ [B]> for Vc<A> where
A: PartialEq<B>,
[src]
A: PartialEq<B>,
impl<'_, A, B> PartialEq<&'_ mut [B]> for Vc<A> where
A: PartialEq<B>,
[src]
A: PartialEq<B>,
impl<A: PartialEq> PartialEq<Vc<A>> for Vc<A>
[src]
impl<A, B> PartialEq<Vc<A>> for Vec<B> where
A: PartialEq<B>,
[src]
A: PartialEq<B>,
impl<'_, A, B> PartialEq<Vc<A>> for &'_ [B] where
A: PartialEq<B>,
[src]
A: PartialEq<B>,
impl<'_, A, B> PartialEq<Vc<A>> for &'_ mut [B] where
A: PartialEq<B>,
[src]
A: PartialEq<B>,
impl<A, B> PartialEq<Vec<B>> for Vc<A> where
A: PartialEq<B>,
[src]
A: PartialEq<B>,
impl<A: PartialOrd> PartialOrd<Vc<A>> for Vc<A>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> Serialize for Vc<T> where
T: Serialize,
[src]
T: Serialize,
Auto Trait Implementations
impl<T> RefUnwindSafe for Vc<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Vc<T> where
T: Send,
T: Send,
impl<T> Sync for Vc<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Vc<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Vc<T> where
T: UnwindSafe,
T: UnwindSafe,
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> IntoParallelIterator for T where
T: ParallelIterator,
[src]
T: ParallelIterator,
type Iter = T
The parallel iterator type that will be created.
type Item = <T as ParallelIterator>::Item
The type of item that the parallel iterator will produce.
fn into_par_iter(self) -> T
[src]
impl<'data, I> IntoParallelRefIterator<'data> for I where
I: 'data + ?Sized,
&'data I: IntoParallelIterator,
[src]
I: 'data + ?Sized,
&'data I: IntoParallelIterator,
type Iter = <&'data I as IntoParallelIterator>::Iter
The type of the parallel iterator that will be returned.
type Item = <&'data I as IntoParallelIterator>::Item
The type of item that the parallel iterator will produce. This will typically be an &'data T
reference type. Read more
fn par_iter(&'data self) -> <I as IntoParallelRefIterator<'data>>::Iter
[src]
impl<'data, I> IntoParallelRefMutIterator<'data> for I where
I: 'data + ?Sized,
&'data mut I: IntoParallelIterator,
[src]
I: 'data + ?Sized,
&'data mut I: IntoParallelIterator,
type Iter = <&'data mut I as IntoParallelIterator>::Iter
The type of iterator that will be created.
type Item = <&'data mut I as IntoParallelIterator>::Item
The type of item that will be produced; this is typically an &'data mut T
reference. Read more
fn par_iter_mut(
&'data mut self
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
[src]
&'data mut self
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,