Vec1

Type Alias Vec1 

Source
pub type Vec1<T> = NonEmpty<Vec<T>>;
Available on crate feature alloc only.

Aliased Type§

pub struct Vec1<T> { /* private fields */ }

Implementations§

Source§

impl<T> Vec1<T>

Source

pub unsafe fn from_vec_unchecked(items: Vec<T>) -> Self

§Safety

items must be non-empty. For example, it is unsound to call this function with the immediate output of Vec::new().

Source

pub fn from_one(item: T) -> Self

Source

pub fn from_one_with_capacity(item: T, capacity: usize) -> Self

Source

pub fn from_iter1_with_capacity<U>(items: U, capacity: usize) -> Self
where U: IntoIterator1<Item = T>,

Source

pub fn from_head_and_tail<I>(head: T, tail: I) -> Self
where I: IntoIterator<Item = T>,

Source

pub fn from_rtail_and_head<I>(tail: I, head: T) -> Self
where I: IntoIterator<Item = T>,

Source

pub fn try_from_ref(items: &Vec<T>) -> Result<&Self, EmptyError<&Vec<T>>>

Source

pub fn try_from_mut( items: &mut Vec<T>, ) -> Result<&mut Self, EmptyError<&mut Vec<T>>>

Source

pub fn into_head_and_tail(self) -> (T, Vec<T>)

Source

pub fn into_rtail_and_head(self) -> (Vec<T>, T)

Source

pub fn into_vec(self) -> Vec<T>

Source

pub fn into_boxed_slice1(self) -> BoxedSlice1<T>

Source

pub fn leak<'a>(self) -> &'a mut Slice1<T>

Source

pub fn try_retain<F>(self, f: F) -> Result<Self, EmptyError<Vec<T>>>
where F: FnMut(&T) -> bool,

Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<&T>
where F: FnMut(&T) -> bool,

Source

pub fn reserve(&mut self, additional: usize)

Source

pub fn reserve_exact(&mut self, additional: usize)

Source

pub fn shrink_to(&mut self, capacity: usize)

Source

pub fn shrink_to_fit(&mut self)

Source

pub fn split_off_tail(&mut self) -> Vec<T>

Source

pub fn append(&mut self, items: &mut Vec<T>)

Source

pub fn extend_from_slice(&mut self, items: &[T])
where T: Clone,

Source

pub fn extend_from_within<R>(&mut self, range: R)
where T: Clone, R: RangeBounds<usize>,

Source

pub fn push(&mut self, item: T)

Source

pub fn pop_if_many(&mut self) -> PopIfMany<'_, Self>

Source

pub fn pop_if_many_and<F>(&mut self, f: F) -> Option<T>
where F: FnOnce(&mut T) -> bool,

Source

pub fn insert(&mut self, index: usize, item: T)

Source

pub fn remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Source

pub fn swap_remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Source

pub fn dedup(&mut self)
where T: PartialEq,

Source

pub fn dedup_by<F>(&mut self, f: F)
where F: FnMut(&mut T, &mut T) -> bool,

Source

pub fn dedup_by_key<K, F>(&mut self, f: F)
where K: PartialEq, F: FnMut(&mut T) -> K,

Source

pub fn len(&self) -> NonZeroUsize

Source

pub fn capacity(&self) -> NonZeroUsize

Source

pub const fn as_vec(&self) -> &Vec<T>

Source

pub const unsafe fn as_mut_vec(&mut self) -> &mut Vec<T>

§Safety

The Vec behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::prelude::*;

let mut xs = vec1![0i32, 1, 2, 3];
// This block is unsound. The `&mut Vec<_>` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_vec().clear();
}
let x = xs.first(); // Undefined behavior!
Source

pub fn as_slice1(&self) -> &Slice1<T>

Source

pub fn as_mut_slice1(&mut self) -> &mut Slice1<T>

Source

pub fn as_ptr(&self) -> *const T

Source

pub fn as_mut_ptr(&mut self) -> *mut T

Source§

impl<T, const N: usize> Vec1<[T; N]>

Source

pub fn into_flattened(self) -> Vec1<T>

Methods from Deref<Target = Slice1<T>>§

Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<&T>
where F: FnMut(&T) -> bool,

Available on crate feature arrayvec only.
Source

pub fn try_extend_from_slice( &mut self, items: &[T], ) -> Result<(), CapacityError>
where T: Copy,

Available on crate feature arrayvec only.
Source

pub fn push(&mut self, item: T)

Available on crate feature arrayvec only.
Source

pub fn try_push(&mut self, item: T) -> Result<(), CapacityError<T>>

Available on crate feature arrayvec only.
Source

pub unsafe fn push_unchecked(&mut self, item: T)

Available on crate feature arrayvec only.
§Safety

The ArrayVec1 must have vacancy (available capacity) for the given item. Calling this function against a saturated ArrayVec1 is undefined behavior.

Source

pub fn pop_if_many(&mut self) -> PopIfMany<'_, Self, N>

Available on crate feature arrayvec only.
Source

pub fn swap_pop_if_many(&mut self, index: usize) -> SwapPopIfMany<'_, Self, N>

Available on crate feature arrayvec only.
Source

pub fn insert(&mut self, index: usize, item: T)

Available on crate feature arrayvec only.
Source

pub fn try_insert( &mut self, index: usize, item: T, ) -> Result<(), CapacityError<T>>

Available on crate feature arrayvec only.
Source

pub fn remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self, N>

Available on crate feature arrayvec only.
Source

pub fn swap_remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self, N>

Available on crate feature arrayvec only.
Source

pub fn len(&self) -> NonZeroUsize

Available on crate feature arrayvec only.
Source

pub fn capacity(&self) -> NonZeroUsize

Available on crate feature arrayvec only.
Source

pub fn as_array_vec(&self) -> &ArrayVec<T, N>

Available on crate feature arrayvec only.
Source

pub unsafe fn as_mut_array_vec(&mut self) -> &mut ArrayVec<T, N>

Available on crate feature arrayvec only.
§Safety

The ArrayVec behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::array_vec1::ArrayVec1;

let mut xs = ArrayVec1::from([0i32, 1, 2, 3]);
// This block is unsound. The `&mut ArrayVec` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_array_vec().clear();
}
let x = xs.first(); // Undefined behavior!
Source

pub fn as_slice1(&self) -> &Slice1<T>

Available on crate feature arrayvec only.
Source

pub fn as_mut_slice1(&mut self) -> &mut Slice1<T>

Available on crate feature arrayvec only.
Source

pub fn as_ptr(&self) -> *const T

Available on crate feature arrayvec only.
Source

pub fn as_mut_ptr(&mut self) -> *mut T

Available on crate feature arrayvec only.
Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<(&K, &V)>
where K: Ord, F: FnMut(&K, &V) -> bool,

Source

pub fn split_off_tail(&mut self) -> BTreeMap<K, V>
where K: Clone + UnsafeOrd,

Source

pub fn append(&mut self, items: &mut BTreeMap<K, V>)
where K: Ord,

Source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V>
where K: Ord,

Source

pub fn insert(&mut self, key: K, value: V) -> Option<V>
where K: Ord,

Source

pub fn pop_first_if_many(&mut self) -> PopIfMany<'_, Self>
where K: Ord,

Source

pub fn pop_first_until_only(&mut self) -> PopFirstUntilOnly<'_, K, V>
where K: Ord,

Source

pub fn pop_last_if_many(&mut self) -> PopIfMany<'_, Self>
where K: Ord,

Source

pub fn pop_last_until_only(&mut self) -> PopLastUntilOnly<'_, K, V>
where K: Ord,

Source

pub fn remove_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> RemoveIfMany<'a, 'q, Self, Q>
where K: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn remove_entry_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> RemoveEntryIfMany<'a, 'q, Self, Q>
where K: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn get<Q>(&self, query: &Q) -> Option<&V>
where K: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn get_key_value<Q>(&self, query: &Q) -> Option<(&K, &V)>
where K: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn get_mut<Q>(&mut self, query: &Q) -> Option<&mut V>
where K: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn len(&self) -> NonZeroUsize

Source

pub fn first_key_value(&self) -> (&K, &V)
where K: Ord,

Source

pub fn first_entry(&mut self) -> OccupiedEntry<'_, K, V>
where K: Ord,

Source

pub fn last_key_value(&self) -> (&K, &V)
where K: Ord,

Source

pub fn last_entry(&mut self) -> OccupiedEntry<'_, K, V>
where K: Ord,

Source

pub fn iter1(&self) -> Iterator1<Iter<'_, K, V>>

Source

pub fn iter1_mut(&mut self) -> Iterator1<IterMut<'_, K, V>>

Source

pub fn keys1(&self) -> Iterator1<Keys<'_, K, V>>

Source

pub fn values1(&self) -> Iterator1<Values<'_, K, V>>

Source

pub fn values1_mut(&mut self) -> Iterator1<ValuesMut<'_, K, V>>

Source

pub fn contains_key<Q>(&self, query: &Q) -> bool
where K: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn as_btree_map(&self) -> &BTreeMap<K, V>

Source

pub unsafe fn as_mut_btree_map(&mut self) -> &mut BTreeMap<K, V>

§Safety

The BTreeMap behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::btree_map1::BTreeMap1;

let mut xs = BTreeMap1::from([("a", 0i32), ("b", 1)]);
// This block is unsound. The `&mut BTreeMap` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_btree_map().clear();
}
let x = xs.first_key_value(); // Undefined behavior!
Source

pub fn par_iter1( &self, ) -> ParallelIterator1<<&Self as IntoParallelIterator>::Iter>
where K: Sync, V: Sync,

Available on crate feature rayon only.
Source

pub fn par_iter1_mut( &mut self, ) -> ParallelIterator1<<&mut Self as IntoParallelIterator>::Iter>
where K: Sync, V: Send,

Available on crate feature rayon only.
Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<&T>
where T: Ord, F: FnMut(&T) -> bool,

Source

pub fn split_off_tail(&mut self) -> BTreeSet<T>
where T: Clone + UnsafeOrd,

Source

pub fn append(&mut self, items: &mut BTreeSet<T>)
where T: Ord,

Source

pub fn insert(&mut self, item: T) -> bool
where T: Ord,

Source

pub fn replace(&mut self, item: T) -> Option<T>
where T: Ord,

Source

pub fn pop_first_if_many(&mut self) -> PopIfMany<'_, Self>
where T: Ord,

Source

pub fn pop_first_until_only(&mut self) -> PopFirstUntilOnly<'_, T>
where T: Ord,

Source

pub fn pop_last_if_many(&mut self) -> PopIfMany<'_, Self>
where T: Ord,

Source

pub fn pop_last_until_only(&mut self) -> PopLastUntilOnly<'_, T>
where T: Ord,

Source

pub fn remove_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> DropRemoveIfMany<'a, 'q, Self, Q>
where T: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn take_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> TakeRemoveIfMany<'a, 'q, Self, Q>
where T: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn get<Q>(&self, query: &Q) -> Option<&T>
where T: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn len(&self) -> NonZeroUsize

Source

pub fn first(&self) -> &T
where T: Ord,

Source

pub fn last(&self) -> &T
where T: Ord,

Source

pub fn range<Q, R>(&self, range: R) -> Range<'_, T>
where T: Borrow<Q> + Ord, Q: Ord + ?Sized, R: RangeBounds<Q>,

Source

pub fn difference<'a, R>(&'a self, other: &'a R) -> Difference<'a, T>
where T: Ord, R: ClosedBTreeSet<Item = T>,

Source

pub fn symmetric_difference<'a, R>( &'a self, other: &'a R, ) -> SymmetricDifference<'a, T>
where T: Ord, R: ClosedBTreeSet<Item = T>,

Source

pub fn intersection<'a, R>(&'a self, other: &'a R) -> Intersection<'a, T>
where T: Ord, R: ClosedBTreeSet<Item = T>,

Source

pub fn union<'a, R>(&'a self, other: &'a R) -> Iterator1<Union<'a, T>>
where T: Ord, R: ClosedBTreeSet<Item = T>,

Source

pub fn iter1(&self) -> Iterator1<Iter<'_, T>>

Source

pub fn is_disjoint<R>(&self, other: &R) -> bool
where T: Ord, R: ClosedBTreeSet<Item = T>,

Source

pub fn is_subset<R>(&self, other: &R) -> bool
where T: Ord, R: ClosedBTreeSet<Item = T>,

Source

pub fn is_superset<R>(&self, other: &R) -> bool
where T: Ord, R: ClosedBTreeSet<Item = T>,

Source

pub fn contains<Q>(&self, key: &Q) -> bool
where T: Borrow<Q> + Ord, Q: Ord + ?Sized,

Source

pub fn as_btree_set(&self) -> &BTreeSet<T>

Source

pub unsafe fn as_mut_btree_set(&mut self) -> &mut BTreeSet<T>

§Safety

The BTreeSet behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::btree_set1::BTreeSet1;

let mut xs = BTreeSet1::from([0i32, 1, 2, 3]);
// This block is unsound. The `&mut BTreeSet` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_btree_set().clear();
}
let x = xs.first(); // Undefined behavior!
Source

pub fn par_iter1( &self, ) -> ParallelIterator1<<&Self as IntoParallelIterator>::Iter>
where T: Sync,

Available on crate feature rayon only.
Source

pub fn iter1(&self) -> Iterator1<Iter<'_, T>>

Available on crate feature std only.
Source

pub fn hasher(&self) -> &S

Available on crate feature std only.
Source

pub fn len(&self) -> NonZeroUsize

Available on crate feature std only.
Source

pub fn capacity(&self) -> NonZeroUsize

Available on crate feature std only.
Source

pub fn as_hash_set(&self) -> &HashSet<T, S>

Available on crate feature std only.
Source

pub unsafe fn as_mut_hash_set(&mut self) -> &mut HashSet<T, S>

Available on crate feature std only.
§Safety

The HashSet behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::hash_set1::HashSet1;

let mut xs = HashSet1::from([0i32, 1, 2, 3]);
// This block is unsound. The `&mut HashSet` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_hash_set().clear();
}
let x = xs.iter1().first(); // Undefined behavior!
Source

pub fn par_iter1( &self, ) -> ParallelIterator1<<&Self as IntoParallelIterator>::Iter>
where T: Sync,

Available on crate features std and rayon only.
Source

pub fn extract_until_only_if<'a, F>( &'a mut self, f: F, ) -> impl 'a + Iterator<Item = T>
where F: 'a + FnMut(&T) -> bool,

Available on crate feature std only.
Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<&T>
where T: Clone, F: FnMut(&T) -> bool,

Available on crate feature std only.
Source

pub fn insert(&mut self, item: T) -> bool

Available on crate feature std only.
Source

pub fn replace(&mut self, item: T) -> Option<T>

Available on crate feature std only.
Source

pub fn remove_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> DropRemoveIfMany<'a, 'q, Self, Q>
where T: Borrow<Q>, Q: Eq + Hash + ?Sized,

Available on crate feature std only.
Source

pub fn take_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> TakeRemoveIfMany<'a, 'q, Self, Q>
where T: Borrow<Q>, Q: Eq + Hash + ?Sized,

Available on crate feature std only.
Source

pub fn get<Q>(&self, query: &Q) -> Option<&T>
where T: Borrow<Q>, Q: Eq + Hash + ?Sized,

Available on crate feature std only.
Source

pub fn difference<'a, R>(&'a self, other: &'a R) -> Difference<'a, T, S>
where R: ClosedHashSet<Item = T, State = S>,

Available on crate feature std only.
Source

pub fn symmetric_difference<'a, R>( &'a self, other: &'a R, ) -> SymmetricDifference<'a, T, S>
where R: ClosedHashSet<Item = T, State = S>,

Available on crate feature std only.
Source

pub fn intersection<'a, R>(&'a self, other: &'a R) -> Intersection<'a, T, S>
where R: ClosedHashSet<Item = T, State = S>,

Available on crate feature std only.
Source

pub fn union<'a, R>(&'a self, other: &'a R) -> Iterator1<Union<'a, T, S>>
where R: ClosedHashSet<Item = T, State = S>,

Available on crate feature std only.
Source

pub fn is_disjoint<R>(&self, other: &R) -> bool
where R: ClosedHashSet<Item = T, State = S>,

Available on crate feature std only.
Source

pub fn is_subset<R>(&self, other: &R) -> bool
where R: ClosedHashSet<Item = T, State = S>,

Available on crate feature std only.
Source

pub fn is_superset<R>(&self, other: &R) -> bool
where R: ClosedHashSet<Item = T, State = S>,

Available on crate feature std only.
Source

pub fn contains<Q>(&self, key: &Q) -> bool
where T: Borrow<Q>, Q: Eq + Hash + ?Sized,

Available on crate feature std only.
Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<&T>
where F: FnMut(&T) -> bool,

Available on crate feature heapless only.
Source

pub fn push(&mut self, item: T) -> Result<(), T>

Available on crate feature heapless only.
Source

pub unsafe fn push_unchecked(&mut self, item: T)

Available on crate feature heapless only.
§Safety
Source

pub fn pop_if_many(&mut self) -> PopIfMany<'_, Self>

Available on crate feature heapless only.
Source

pub fn insert(&mut self, index: usize, item: T) -> Result<(), T>

Available on crate feature heapless only.
Source

pub fn remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Available on crate feature heapless only.
Source

pub fn swap_remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Available on crate feature heapless only.
Source

pub fn extend_from_slice(&mut self, items: &[T]) -> Result<(), CapacityError>
where T: Clone,

Available on crate feature heapless only.
Source

pub fn capacity(&self) -> NonZeroUsize

Available on crate feature heapless only.
Source

pub fn as_slice1(&self) -> &Slice1<T>

Available on crate feature heapless only.
Source

pub fn as_mut_slice1(&mut self) -> &mut Slice1<T>

Available on crate feature heapless only.
Source

pub fn as_ptr(&self) -> *const T

Available on crate feature heapless only.
Source

pub fn as_mut_ptr(&mut self) -> *mut T

Available on crate feature heapless only.
Source

pub fn is_full(&self) -> bool

Available on crate feature heapless only.
Source

pub fn as_vec(&self) -> &Vec<T, N>

Available on crate feature heapless only.
Source

pub unsafe fn as_mut_vec(&mut self) -> &mut Vec<T, N>

Available on crate feature heapless only.
§Safety
Source

pub fn as_view1(&self) -> &VecView1<T>

Available on crate feature heapless only.
Source

pub fn as_mut_view1(&mut self) -> &mut VecView1<T>

Available on crate feature heapless only.
Source

pub fn as_vec_view(&self) -> &VecView<T>

Available on crate feature heapless only.
Source

pub unsafe fn as_mut_vec_view(&mut self) -> &mut VecView<T>

Available on crate feature heapless only.
§Safety
Source

pub fn split_first(&self) -> ((&K, &V), &Slice<K, V>)

Available on crate feature indexmap only.
Source

pub fn split_last(&self) -> ((&K, &V), &Slice<K, V>)

Available on crate feature indexmap only.
Source

pub fn first(&self) -> (&K, &V)

Available on crate feature indexmap only.
Source

pub fn last(&self) -> (&K, &V)

Available on crate feature indexmap only.
Source

pub fn iter1(&self) -> Iterator1<Iter<'_, K, V>>

Available on crate feature indexmap only.
Source

pub fn len(&self) -> NonZeroUsize

Available on crate feature indexmap only.
Source

pub fn split_off_tail(&mut self) -> IndexMap<K, V, S>
where S: Clone,

Available on crate feature indexmap only.
Source

pub fn reverse(&mut self)

Available on crate feature indexmap only.
Source

pub fn sort_keys(&mut self)
where K: Ord,

Available on crate feature indexmap only.
Source

pub fn sort_unstable_keys(&mut self)
where K: Ord,

Available on crate feature indexmap only.
Source

pub fn sort_by<F>(&mut self, f: F)
where F: FnMut(&K, &V, &K, &V) -> Ordering,

Available on crate feature indexmap only.
Source

pub fn sort_unstable_by<F>(&mut self, f: F)
where F: FnMut(&K, &V, &K, &V) -> Ordering,

Available on crate feature indexmap only.
Source

pub fn sort_by_cached_key<T, F>(&mut self, f: F)
where T: Ord, F: FnMut(&K, &V) -> T,

Available on crate feature indexmap only.
Source

pub fn move_index(&mut self, from: usize, to: usize)

Available on crate feature indexmap only.
Source

pub fn swap_indices(&mut self, a: usize, b: usize)

Available on crate feature indexmap only.
Source

pub fn get_index(&self, index: usize) -> Option<(&K, &V)>

Available on crate feature indexmap only.
Source

pub fn get_index_mut(&mut self, index: usize) -> Option<(&K, &mut V)>

Available on crate feature indexmap only.
Source

pub fn get_index_entry( &mut self, index: usize, ) -> Option<IndexedEntry<'_, K, V>>

Available on crate feature indexmap only.
Source

pub fn get_range<R>(&self, range: R) -> Option<&Slice<K, V>>
where R: RangeBounds<usize>,

Available on crate feature indexmap only.
Source

pub fn get_range_mut<R>(&mut self, range: R) -> Option<&mut Slice<K, V>>
where R: RangeBounds<usize>,

Available on crate feature indexmap only.
Source

pub fn binary_search_keys(&self, key: &K) -> Result<usize, usize>
where K: Ord,

Available on crate feature indexmap only.
Source

pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
where F: FnMut(&'a K, &'a V) -> Ordering,

Available on crate feature indexmap only.
Source

pub fn binary_search_by_key<'a, Q, F>( &'a self, query: &Q, f: F, ) -> Result<usize, usize>
where Q: Ord, F: FnMut(&'a K, &'a V) -> Q,

Available on crate feature indexmap only.
Source

pub fn partition_point<F>(&self, f: F) -> usize
where F: FnMut(&K, &V) -> bool,

Available on crate feature indexmap only.
Source

pub fn iter1(&self) -> Iterator1<Iter<'_, K, V>>

Available on crate feature indexmap only.
Source

pub fn iter1_mut(&mut self) -> Iterator1<IterMut<'_, K, V>>

Available on crate feature indexmap only.
Source

pub fn keys1(&self) -> Iterator1<Keys<'_, K, V>>

Available on crate feature indexmap only.
Source

pub fn values1(&self) -> Iterator1<Values<'_, K, V>>

Available on crate feature indexmap only.
Source

pub fn values1_mut(&mut self) -> Iterator1<ValuesMut<'_, K, V>>

Available on crate feature indexmap only.
Source

pub fn len(&self) -> NonZeroUsize

Available on crate feature indexmap only.
Source

pub fn capacity(&self) -> NonZeroUsize

Available on crate feature indexmap only.
Source

pub fn hasher(&self) -> &S

Available on crate feature indexmap only.
Source

pub fn as_index_map(&self) -> &IndexMap<K, V, S>

Available on crate feature indexmap only.
Source

pub unsafe fn as_mut_index_map(&mut self) -> &mut IndexMap<K, V, S>

Available on crate feature indexmap only.
§Safety

The IndexMap behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::index_map1::IndexMap1;

let mut xs = IndexMap1::from([("a", 0i32), ("b", 1)]);
// This block is unsound. The `&mut IndexMap` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_index_map().clear();
}
let x = xs.first(); // Undefined behavior!
Source

pub fn as_slice1(&self) -> &Slice1<K, V>

Available on crate feature indexmap only.
Source

pub fn as_mut_slice1(&mut self) -> &mut Slice1<K, V>

Available on crate feature indexmap only.
Source

pub fn pop_if_many(&mut self) -> PopIfMany<'_, Self>

Available on crate feature indexmap only.
Source

pub fn shift_remove_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> RemoveIfMany<'a, 'q, Self, Q>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn swap_remove_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> RemoveIfMany<'a, 'q, Self, Q>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn shift_remove_entry_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> RemoveEntryIfMany<'a, 'q, Self, Q>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn swap_remove_entry_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> RemoveEntryIfMany<'a, 'q, Self, Q>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn get<Q>(&self, query: &Q) -> Option<&V>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn get_mut<Q>(&mut self, query: &Q) -> Option<&mut V>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn get_key_value<Q>(&self, query: &Q) -> Option<(&K, &V)>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn get_full<Q>(&self, query: &Q) -> Option<(usize, &K, &V)>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn get_full_mut<Q>(&mut self, query: &Q) -> Option<(usize, &K, &mut V)>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn get_index_of<Q>(&self, query: &Q) -> Option<usize>
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn first(&self) -> (&K, &V)

Available on crate feature indexmap only.
Source

pub fn first_mut(&mut self) -> (&K, &mut V)

Available on crate feature indexmap only.
Source

pub fn first_entry(&mut self) -> IndexedEntry<'_, K, V>

Available on crate feature indexmap only.
Source

pub fn last(&self) -> (&K, &V)

Available on crate feature indexmap only.
Source

pub fn last_mut(&mut self) -> (&K, &mut V)

Available on crate feature indexmap only.
Source

pub fn last_entry(&mut self) -> IndexedEntry<'_, K, V>

Available on crate feature indexmap only.
Source

pub fn contains_key<Q>(&self, query: &Q) -> bool
where Q: Equivalent<K> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn append<SR>(&mut self, items: &mut IndexMap<K, V, SR>)

Available on crate feature indexmap only.
Source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V>

Available on crate feature indexmap only.
Source

pub fn insert(&mut self, key: K, value: V) -> Option<V>

Available on crate feature indexmap only.
Source

pub fn insert_full(&mut self, key: K, value: V) -> (usize, Option<V>)

Available on crate feature indexmap only.
Source

pub fn insert_sorted(&mut self, key: K, value: V) -> (usize, Option<V>)
where K: Ord,

Available on crate feature indexmap only.
Source

pub fn insert_before( &mut self, index: usize, key: K, value: V, ) -> (usize, Option<V>)

Available on crate feature indexmap only.
Source

pub fn shift_insert(&mut self, index: usize, key: K, value: V) -> Option<V>

Available on crate feature indexmap only.
Source

pub fn par_sort_keys(&mut self)
where K: Ord + Send, V: Send,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort_unstable_keys(&mut self)
where K: Ord + Send, V: Send,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort_by<F>(&mut self, f: F)
where K: Send, V: Send, F: Fn(&K, &V, &K, &V) -> Ordering + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort_unstable_by<F>(&mut self, f: F)
where K: Send, V: Send, F: Fn(&K, &V, &K, &V) -> Ordering + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort_by_cached_key<T, F>(&mut self, f: F)
where K: Send, V: Send, T: Ord + Send, F: Fn(&K, &V) -> T + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_iter1( &self, ) -> ParallelIterator1<<&Self as IntoParallelIterator>::Iter>
where K: Sync, V: Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_iter1_mut( &mut self, ) -> ParallelIterator1<<&mut Self as IntoParallelIterator>::Iter>
where K: Send + Sync, V: Send,

Available on crate features indexmap and rayon only.
Source

pub fn par_keys1(&self) -> ParallelIterator1<ParKeys<'_, K, V>>
where K: Sync, V: Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_values1(&self) -> ParallelIterator1<ParValues<'_, K, V>>
where K: Sync, V: Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_values1_mut(&mut self) -> ParallelIterator1<ParValuesMut<'_, K, V>>
where K: Send, V: Send,

Available on crate features indexmap and rayon only.
Source

pub fn par_eq<R>(&self, other: &R) -> bool
where K: Eq + Hash + Sync, V: PartialEq<R::Value> + Sync, S: BuildHasher, R: ClosedIndexMap<Key = K>, R::Value: Sync, R::State: BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn split_first(&self) -> (&T, &Slice<T>)

Available on crate feature indexmap only.
Source

pub fn split_last(&self) -> (&T, &Slice<T>)

Available on crate feature indexmap only.
Source

pub fn first(&self) -> &T

Available on crate feature indexmap only.
Source

pub fn last(&self) -> &T

Available on crate feature indexmap only.
Source

pub fn iter1(&self) -> Iterator1<Iter<'_, T>>

Available on crate feature indexmap only.
Source

pub fn len(&self) -> NonZeroUsize

Available on crate feature indexmap only.
Source

pub fn reserve(&mut self, additional: usize)

Available on crate feature indexmap only.
Source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Available on crate feature indexmap only.
Source

pub fn reserve_exact(&mut self, additional: usize)

Available on crate feature indexmap only.
Source

pub fn try_reserve_exact( &mut self, additional: usize, ) -> Result<(), TryReserveError>

Available on crate feature indexmap only.
Source

pub fn shrink_to(&mut self, capacity: usize)

Available on crate feature indexmap only.
Source

pub fn shrink_to_fit(&mut self)

Available on crate feature indexmap only.
Source

pub fn sort(&mut self)
where T: Ord,

Available on crate feature indexmap only.
Source

pub fn sort_by<F>(&mut self, f: F)
where F: FnMut(&T, &T) -> Ordering,

Available on crate feature indexmap only.
Source

pub fn sort_unstable(&mut self)
where T: Ord,

Available on crate feature indexmap only.
Source

pub fn sort_unstable_by<F>(&mut self, f: F)
where F: FnMut(&T, &T) -> Ordering,

Available on crate feature indexmap only.
Source

pub fn sort_by_cached_key<K, F>(&mut self, f: F)
where K: Ord, F: FnMut(&T) -> K,

Available on crate feature indexmap only.
Source

pub fn reverse(&mut self)

Available on crate feature indexmap only.
Source

pub fn split_off_tail(&mut self) -> IndexSet<T, S>
where S: Clone,

Available on crate feature indexmap only.
Source

pub fn move_index(&mut self, from: usize, to: usize)

Available on crate feature indexmap only.
Source

pub fn swap_indices(&mut self, a: usize, b: usize)

Available on crate feature indexmap only.
Source

pub fn pop_if_many(&mut self) -> PopIfMany<'_, Self>
where T: Eq + Hash,

Available on crate feature indexmap only.
Source

pub fn shift_remove_index_if_many( &mut self, index: usize, ) -> TakeRemoveIfMany<'_, Self>

Available on crate feature indexmap only.
Source

pub fn swap_remove_index_if_many( &mut self, index: usize, ) -> TakeRemoveIfMany<'_, Self>

Available on crate feature indexmap only.
Source

pub fn get_index(&self, index: usize) -> Option<&T>

Available on crate feature indexmap only.
Source

pub fn get_range<R>(&self, range: R) -> Option<&Slice<T>>
where R: RangeBounds<usize>,

Available on crate feature indexmap only.
Available on crate feature indexmap only.
Source

pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
where F: FnMut(&'a T) -> Ordering,

Available on crate feature indexmap only.
Source

pub fn binary_search_by_key<'a, K, F>( &'a self, key: &K, f: F, ) -> Result<usize, usize>
where K: Ord, F: FnMut(&'a T) -> K,

Available on crate feature indexmap only.
Source

pub fn partition_point<F>(&self, f: F) -> usize
where F: FnMut(&T) -> bool,

Available on crate feature indexmap only.
Source

pub fn first(&self) -> &T

Available on crate feature indexmap only.
Source

pub fn last(&self) -> &T

Available on crate feature indexmap only.
Source

pub fn len(&self) -> NonZeroUsize

Available on crate feature indexmap only.
Source

pub fn capacity(&self) -> NonZeroUsize

Available on crate feature indexmap only.
Source

pub fn iter1(&self) -> Iterator1<Iter<'_, T>>

Available on crate feature indexmap only.
Source

pub fn hasher(&self) -> &S

Available on crate feature indexmap only.
Source

pub fn as_index_set(&self) -> &IndexSet<T, S>

Available on crate feature indexmap only.
Source

pub unsafe fn as_mut_index_set(&mut self) -> &mut IndexSet<T, S>

Available on crate feature indexmap only.
§Safety

The IndexSet behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::index_set1::IndexSet1;

let mut xs = IndexSet1::from([0i32, 1, 2, 3]);
// This block is unsound. The `&mut IndexSet` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_index_set().clear();
}
let x = xs.first(); // Undefined behavior!
Source

pub fn as_slice1(&self) -> &Slice1<T>

Available on crate feature indexmap only.
Source

pub fn get<Q>(&self, query: &Q) -> Option<&T>
where T: Borrow<Q>, Q: Equivalent<T> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn shift_remove_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> DropRemoveIfMany<'a, 'q, Self, Q>
where T: Borrow<Q>, Q: Equivalent<T> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn swap_remove_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> DropRemoveIfMany<'a, 'q, Self, Q>
where T: Borrow<Q>, Q: Equivalent<T> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn shift_remove_full_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> TakeRemoveFullIfMany<'a, 'q, Self, Q>
where T: Borrow<Q>, Q: Equivalent<T> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn swap_remove_full_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> TakeRemoveFullIfMany<'a, 'q, Self, Q>
where T: Borrow<Q>, Q: Equivalent<T> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn shift_take_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> TakeRemoveIfMany<'a, Self, &'q Q>
where T: Borrow<Q>, Q: Equivalent<T> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn swap_take_if_many<'a, 'q, Q>( &'a mut self, query: &'q Q, ) -> TakeRemoveIfMany<'a, Self, &'q Q>
where T: Borrow<Q>, Q: Equivalent<T> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn contains<Q>(&self, item: &Q) -> bool
where T: Borrow<Q>, Q: Equivalent<T> + Hash + ?Sized,

Available on crate feature indexmap only.
Source

pub fn append<SR>(&mut self, items: &mut IndexSet<T, SR>)

Available on crate feature indexmap only.
Source

pub fn insert(&mut self, item: T) -> bool

Available on crate feature indexmap only.
Source

pub fn insert_full(&mut self, item: T) -> (usize, bool)

Available on crate feature indexmap only.
Source

pub fn insert_sorted(&mut self, item: T) -> (usize, bool)
where T: Ord,

Available on crate feature indexmap only.
Source

pub fn replace(&mut self, item: T) -> Option<T>

Available on crate feature indexmap only.
Source

pub fn replace_full(&mut self, item: T) -> (usize, Option<T>)

Available on crate feature indexmap only.
Source

pub fn difference<'a, R, SR>(&'a self, other: &'a R) -> Difference<'a, T, SR>
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher,

Available on crate feature indexmap only.
Source

pub fn symmetric_difference<'a, R, SR>( &'a self, other: &'a R, ) -> SymmetricDifference<'a, T, S, SR>
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher,

Available on crate feature indexmap only.
Source

pub fn intersection<'a, R, SR>( &'a self, other: &'a R, ) -> Intersection<'a, T, SR>
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher,

Available on crate feature indexmap only.
Source

pub fn union<'a, R, SR>(&'a self, other: &'a R) -> Iterator1<Union<'a, T, S>>
where R: ClosedIndexSet<Item = T, State = SR>, SR: 'a + BuildHasher,

Available on crate feature indexmap only.
Source

pub fn is_disjoint<R, SR>(&self, other: &R) -> bool
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher,

Available on crate feature indexmap only.
Source

pub fn is_subset<R, SR>(&self, other: &R) -> bool
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher,

Available on crate feature indexmap only.
Source

pub fn is_superset<R, SR>(&self, other: &R) -> bool
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher,

Available on crate feature indexmap only.
Source

pub fn par_iter1( &self, ) -> ParallelIterator1<<&Self as IntoParallelIterator>::Iter>
where T: Sync, S: Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_difference<'a, R, SR>( &'a self, other: &'a R, ) -> ParDifference<'a, T, S, SR>
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_symmetric_difference<'a, R, SR>( &'a self, other: &'a R, ) -> ParSymmetricDifference<'a, T, S, SR>
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_intersection<'a, R, SR>( &'a self, other: &'a R, ) -> ParIntersection<'a, T, S, SR>
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_union<'a, R, SR>( &'a self, other: &'a R, ) -> ParallelIterator1<ParUnion<'a, T, S, SR>>
where R: ClosedIndexSet<Item = T, State = SR>, SR: 'a + BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_eq<R, SR>(&self, other: &R) -> bool
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_is_disjoint<R, SR>(&self, other: &R) -> bool
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_is_subset<R, SR>(&self, other: &R) -> bool
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_is_superset<R, SR>(&self, other: &R) -> bool
where R: ClosedIndexSet<Item = T, State = SR>, SR: BuildHasher + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort(&mut self)
where T: Ord,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort_by<F>(&mut self, f: F)
where F: Fn(&T, &T) -> Ordering + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort_unstable(&mut self)
where T: Ord,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort_unstable_by<F>(&mut self, f: F)
where F: Fn(&T, &T) -> Ordering + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn par_sort_by_cached_key<K, F>(&mut self, f: F)
where K: Ord + Send, F: Fn(&T) -> K + Sync,

Available on crate features indexmap and rayon only.
Source

pub fn to_vec1(&self) -> Vec1<T>
where T: Clone,

Source

pub fn into_vec1(self: BoxedSlice1<T>) -> Vec1<T>

Source

pub fn once_and_then_repeat(&self, n: usize) -> Vec1<T>
where T: Copy,

Source

pub fn split_first(&self) -> (&T, &[T])

Source

pub fn split_first_mut(&mut self) -> (&mut T, &mut [T])

Source

pub fn first(&self) -> &T

Source

pub fn first_mut(&mut self) -> &mut T

Source

pub fn last(&self) -> &T

Source

pub fn last_mut(&mut self) -> &mut T

Source

pub fn chunks1(&self, n: usize) -> Iterator1<Chunks<'_, T>>

Source

pub fn chunks1_mut(&mut self, n: usize) -> Iterator1<ChunksMut<'_, T>>

Source

pub fn rchunks1(&self, n: usize) -> Iterator1<RChunks<'_, T>>

Source

pub fn rchunks1_mut(&mut self, n: usize) -> Iterator1<RChunksMut<'_, T>>

Source

pub fn iter1(&self) -> Iterator1<Iter<'_, T>>

Source

pub fn iter1_mut(&mut self) -> Iterator1<IterMut<'_, T>>

Source

pub fn len(&self) -> NonZeroUsize

Source

pub fn as_slice(&self) -> &[T]

Source

pub fn as_mut_slice(&mut self) -> &mut [T]

Source

pub fn par_iter1( &self, ) -> ParallelIterator1<<&Self as IntoParallelIterator>::Iter>
where T: Sync,

Available on crate feature rayon only.
Source

pub fn par_iter1_mut( &mut self, ) -> ParallelIterator1<<&mut Self as IntoParallelIterator>::Iter>
where T: Send,

Available on crate feature rayon only.
Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<&T>
where F: FnMut(&T) -> bool,

Available on crate feature smallvec only.
Source

pub fn reserve(&mut self, additional: usize)

Available on crate feature smallvec only.
Source

pub fn reserve_exact(&mut self, additional: usize)

Available on crate feature smallvec only.
Source

pub fn shrink_to_fit(&mut self)

Available on crate feature smallvec only.
Source

pub fn append(&mut self, items: &mut SmallVec<A>)

Available on crate feature smallvec only.
Source

pub fn extend_from_slice(&mut self, items: &[T])
where T: Copy,

Available on crate feature smallvec only.
Source

pub fn push(&mut self, item: T)

Available on crate feature smallvec only.
Source

pub fn pop_if_many(&mut self) -> PopIfMany<'_, Self>

Available on crate feature smallvec only.
Source

pub fn insert(&mut self, index: usize, item: T)

Available on crate feature smallvec only.
Source

pub fn insert_from_slice(&mut self, index: usize, items: &[T])
where T: Copy,

Available on crate feature smallvec only.
Source

pub fn remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Available on crate feature smallvec only.
Source

pub fn swap_remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Available on crate feature smallvec only.
Source

pub fn dedup(&mut self)
where T: PartialEq,

Available on crate feature smallvec only.
Source

pub fn dedup_by<F>(&mut self, f: F)
where F: FnMut(&mut T, &mut T) -> bool,

Available on crate feature smallvec only.
Source

pub fn dedup_by_key<K, F>(&mut self, f: F)
where K: PartialEq, F: FnMut(&mut T) -> K,

Available on crate feature smallvec only.
Source

pub fn len(&self) -> NonZeroUsize

Available on crate feature smallvec only.
Source

pub fn capacity(&self) -> NonZeroUsize

Available on crate feature smallvec only.
Source

pub fn inline_size(&self) -> usize

Available on crate feature smallvec only.
Source

pub fn as_small_vec(&self) -> &SmallVec<A>

Available on crate feature smallvec only.
Source

pub unsafe fn as_mut_small_vec(&mut self) -> &mut SmallVec<A>

Available on crate feature smallvec only.
§Safety

The SmallVec behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::small_vec1::SmallVec1;

let mut xs = SmallVec1::from([0i32, 1, 2, 3]);
// This block is unsound. The `&mut SmallVec` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_small_vec().clear();
}
let x = xs.first(); // Undefined behavior!
Source

pub fn as_slice1(&self) -> &Slice1<T>

Available on crate feature smallvec only.
Source

pub fn as_mut_slice1(&mut self) -> &mut Slice1<T>

Available on crate feature smallvec only.
Source

pub fn as_ptr(&self) -> *const T

Available on crate feature smallvec only.
Source

pub fn as_mut_ptr(&mut self) -> *mut T

Available on crate feature smallvec only.
Source

pub fn spilled(&self) -> bool

Available on crate feature smallvec only.
Source

pub fn to_string1(&self) -> String1

Source

pub fn into_string1(self: BoxedStr1) -> String1

Source

pub fn once_and_then_repeat(&self, n: usize) -> String1

Source

pub fn encode1_utf16(&self) -> Iterator1<EncodeUtf16<'_>>

Source

pub fn split1<'a, P>( &'a self, separator: &'a P, ) -> Iterator1<Split<'a, &'a [char]>>
where P: 'a + AsRef<[char]>,

Source

pub fn split1_inclusive<'a, P>( &'a self, separator: &'a P, ) -> Iterator1<SplitInclusive<'a, &'a [char]>>
where P: 'a + AsRef<[char]>,

Source

pub fn split1_terminator<'a, P>( &'a self, separator: &'a P, ) -> Iterator1<SplitTerminator<'a, &'a [char]>>
where P: 'a + AsRef<[char]>,

Source

pub fn chars1(&self) -> Iterator1<Chars<'_>>

Source

pub fn char_indices1(&self) -> Iterator1<CharIndices<'_>>

Source

pub fn bytes1(&self) -> Iterator1<Bytes<'_>>

Source

pub fn lines1(&self) -> Iterator1<Lines<'_>>

Source

pub fn len(&self) -> NonZeroUsize

Source

pub fn as_bytes1(&self) -> &Slice1<u8>

Source

pub fn as_bytes1_mut(&mut self) -> &mut Slice1<u8>

Source

pub fn as_str(&self) -> &str

Source

pub fn as_mut_str(&mut self) -> &mut str

Source

pub fn par_encode1_utf16(&self) -> ParallelIterator1<EncodeUtf16<'_>>

Available on crate feature rayon only.
Source

pub fn par_split1<'a, P>( &'a self, separator: &'a P, ) -> ParallelIterator1<Split<'a, &'a [char]>>
where P: 'a + AsRef<[char]>,

Available on crate feature rayon only.
Source

pub fn par_split1_inclusive<'a, P>( &'a self, separator: &'a P, ) -> ParallelIterator1<SplitInclusive<'a, &'a [char]>>
where P: 'a + AsRef<[char]>,

Available on crate feature rayon only.
Source

pub fn par_split1_terminator<'a, P>( &'a self, separator: &'a P, ) -> ParallelIterator1<SplitTerminator<'a, &'a [char]>>
where P: 'a + AsRef<[char]>,

Available on crate feature rayon only.
Source

pub fn par_chars1(&self) -> ParallelIterator1<Chars<'_>>

Available on crate feature rayon only.
Source

pub fn par_char_indices1(&self) -> ParallelIterator1<CharIndices<'_>>

Available on crate feature rayon only.
Source

pub fn par_bytes1(&self) -> ParallelIterator1<Bytes<'_>>

Available on crate feature rayon only.
Source

pub fn par_lines1(&self) -> ParallelIterator1<Lines<'_>>

Available on crate feature rayon only.
Source

pub fn reserve(&mut self, additional: usize)

Source

pub fn reserve_exact(&mut self, additional: usize)

Source

pub fn shrink_to(&mut self, capacity: usize)

Source

pub fn shrink_to_fit(&mut self)

Source

pub fn split_off_tail(&mut self) -> String

Source

pub fn push(&mut self, item: char)

Source

pub fn push_str(&mut self, items: &str)

Source

pub fn pop_if_many(&mut self) -> PopIfMany<'_>

Source

pub fn insert(&mut self, index: usize, item: char)

Source

pub fn remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_>

Source

pub fn len(&self) -> NonZeroUsize

Source

pub fn capacity(&self) -> NonZeroUsize

Source

pub fn as_string(&self) -> &String

Source

pub unsafe fn as_mut_string(&mut self) -> &mut String

§Safety

The String behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::string1::String1;

let mut xs = String1::try_from("abc").unwrap();
// This block is unsound. The `&mut String` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_string().clear();
}
let x = xs.as_bytes1().first(); // Undefined behavior!
Source

pub unsafe fn as_mut_vec1(&mut self) -> &mut Vec1<u8>

§Safety

The returned Vec1 must contain valid UTF-8 when the reference is dropped. Note that the non-empty guarantee of String1 may also be violated by invalid UTF-8, because invalid UTF-8 bytes may yield no code points.

Source

pub fn as_str1(&self) -> &Str1

Source

pub fn as_mut_str1(&mut self) -> &mut Str1

Source

pub fn as_ptr(&self) -> *const u8

Source

pub fn as_mut_ptr(&mut self) -> *mut u8

Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<&T>
where F: FnMut(&T) -> bool,

Source

pub fn reserve(&mut self, additional: usize)

Source

pub fn reserve_exact(&mut self, additional: usize)

Source

pub fn shrink_to(&mut self, capacity: usize)

Source

pub fn shrink_to_fit(&mut self)

Source

pub fn split_off_tail(&mut self) -> Vec<T>

Source

pub fn append(&mut self, items: &mut Vec<T>)

Source

pub fn extend_from_slice(&mut self, items: &[T])
where T: Clone,

Source

pub fn extend_from_within<R>(&mut self, range: R)
where T: Clone, R: RangeBounds<usize>,

Source

pub fn push(&mut self, item: T)

Source

pub fn pop_if_many(&mut self) -> PopIfMany<'_, Self>

Source

pub fn pop_if_many_and<F>(&mut self, f: F) -> Option<T>
where F: FnOnce(&mut T) -> bool,

Source

pub fn insert(&mut self, index: usize, item: T)

Source

pub fn remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Source

pub fn swap_remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Source

pub fn dedup(&mut self)
where T: PartialEq,

Source

pub fn dedup_by<F>(&mut self, f: F)
where F: FnMut(&mut T, &mut T) -> bool,

Source

pub fn dedup_by_key<K, F>(&mut self, f: F)
where K: PartialEq, F: FnMut(&mut T) -> K,

Source

pub fn len(&self) -> NonZeroUsize

Source

pub fn capacity(&self) -> NonZeroUsize

Source

pub fn as_vec(&self) -> &Vec<T>

Source

pub unsafe fn as_mut_vec(&mut self) -> &mut Vec<T>

§Safety

The Vec behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::prelude::*;

let mut xs = vec1![0i32, 1, 2, 3];
// This block is unsound. The `&mut Vec<_>` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_vec().clear();
}
let x = xs.first(); // Undefined behavior!
Source

pub fn as_slice1(&self) -> &Slice1<T>

Source

pub fn as_mut_slice1(&mut self) -> &mut Slice1<T>

Source

pub fn as_ptr(&self) -> *const T

Source

pub fn as_mut_ptr(&mut self) -> *mut T

Source

pub fn retain_until_only<F>(&mut self, f: F) -> Option<&T>
where F: FnMut(&T) -> bool,

Source

pub fn shrink_to(&mut self, capacity: usize)

Source

pub fn shrink_to_fit(&mut self)

Source

pub fn make_contiguous(&mut self) -> &mut Slice1<T>

Source

pub fn rotate_left(&mut self, n: usize)

Source

pub fn rotate_right(&mut self, n: usize)

Source

pub fn split_off_tail(&mut self) -> VecDeque<T>

Source

pub fn append(&mut self, items: &mut VecDeque<T>)

Source

pub fn push_front(&mut self, item: T)

Source

pub fn push_back(&mut self, item: T)

Source

pub fn pop_front_if_many(&mut self) -> PopIfMany<'_, Self>

Source

pub fn pop_back_if_many(&mut self) -> PopIfMany<'_, Self>

Source

pub fn insert(&mut self, index: usize, item: T)

Source

pub fn remove_if_many(&mut self, index: usize) -> RemoveIfMany<'_, Self>

Source

pub fn swap_remove_front_if_many( &mut self, index: usize, ) -> RemoveIfMany<'_, Self>

Source

pub fn swap_remove_back_if_many( &mut self, index: usize, ) -> RemoveIfMany<'_, Self>

Source

pub fn get(&self, index: usize) -> Option<&T>

Source

pub fn get_mut(&mut self, index: usize) -> Option<&mut T>

Source

pub fn len(&self) -> NonZeroUsize

Source

pub fn capacity(&self) -> NonZeroUsize

Source

pub fn front(&self) -> &T

Source

pub fn front_mut(&mut self) -> &mut T

Source

pub fn back(&self) -> &T

Source

pub fn back_mut(&mut self) -> &mut T

Source

pub fn iter1(&self) -> Iterator1<Iter<'_, T>>

Source

pub fn iter1_mut(&mut self) -> Iterator1<IterMut<'_, T>>

Source

pub fn as_vec_deque(&self) -> &VecDeque<T>

Source

pub unsafe fn as_mut_vec_deque(&mut self) -> &mut VecDeque<T>

§Safety

The VecDeque behind the returned mutable reference must not be empty when the reference is dropped. Consider the following example:

use mitsein::vec_deque1::VecDeque1;

let mut xs = VecDeque1::from([0i32, 1, 2, 3]);
// This block is unsound. The `&mut VecDeque<_>` is dropped in the block and so `xs` can be
// freely manipulated after the block despite violation of the non-empty guarantee.
unsafe {
    xs.as_mut_vec_deque().clear();
}
let x = xs.front(); // Undefined behavior!
Source

pub fn par_iter1( &self, ) -> ParallelIterator1<<&Self as IntoParallelIterator>::Iter>
where T: Sync,

Available on crate feature rayon only.
Source

pub fn par_iter1_mut( &mut self, ) -> ParallelIterator1<<&mut Self as IntoParallelIterator>::Iter>
where T: Send,

Available on crate feature rayon only.

Trait Implementations§

Source§

impl<'a, T> Arbitrary<'a> for Vec1<T>
where T: Arbitrary<'a>,

Available on crate feature arbitrary only.
Source§

fn arbitrary(unstructured: &mut Unstructured<'a>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
Source§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
Source§

fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
Source§

impl<T> AsMut<[T]> for Vec1<T>

Source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T> AsMut<NonEmpty<[T]>> for Vec1<T>

Source§

fn as_mut(&mut self) -> &mut Slice1<T>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T> AsRef<[T]> for Vec1<T>

Source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> AsRef<NonEmpty<[T]>> for Vec1<T>

Source§

fn as_ref(&self) -> &Slice1<T>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> Borrow<[T]> for Vec1<T>

Source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
Source§

impl<T> Borrow<NonEmpty<[T]>> for Vec1<T>

Source§

fn borrow(&self) -> &Slice1<T>

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<[T]> for Vec1<T>

Source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<NonEmpty<[T]>> for Vec1<T>

Source§

fn borrow_mut(&mut self) -> &mut Slice1<T>

Mutably borrows from an owned value. Read more
Source§

impl<T, R> ByRange<usize, R> for Vec1<T>
where R: RangeBounds<usize>,

Source§

type Range = IndexRange

Available on crate features alloc or arrayvec or heapless only.
Source§

type Error = RangeError<usize>

Available on crate features alloc or arrayvec or heapless only.
Source§

fn segment(&mut self, range: R) -> Result<Segment<'_, Self>, Self::Error>

Available on crate features alloc or arrayvec or heapless only.
Source§

impl<T> ByTail for Vec1<T>

Source§

type Range = IndexRange

Available on crate features alloc or arrayvec or heapless only.
Source§

fn tail(&mut self) -> Segment<'_, Self>

Available on crate features alloc or arrayvec or heapless only.
Source§

fn rtail(&mut self) -> Segment<'_, Self>

Available on crate features alloc or arrayvec or heapless only.
Source§

impl<T> ClosedVec for Vec1<T>

Source§

type Item = T

Source§

fn as_vec(&self) -> &Vec<Self::Item>

Source§

impl<T> Debug for Vec1<T>
where T: Debug,

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Deref for Vec1<T>

Source§

type Target = NonEmpty<[T]>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T> DerefMut for Vec1<T>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'a, T> Extend<&'a T> for Vec1<T>
where T: 'a + Copy,

Source§

fn extend<I>(&mut self, extension: I)
where I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<T> Extend<T> for Vec1<T>

Source§

fn extend<I>(&mut self, extension: I)
where I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<'a, T, const N: usize> From<&'a [T; N]> for Vec1<T>
where [T; N]: Array1, T: Copy,

Source§

fn from(items: &'a [T; N]) -> Self

Converts to this type from the input type.
Source§

impl<'a, T> From<&'a NonEmpty<[T]>> for Vec1<T>
where T: Clone,

Source§

fn from(items: &'a Slice1<T>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a NonEmpty<str>> for Vec1<u8>

Source§

fn from(items: &'a Str1) -> Self

Converts to this type from the input type.
Source§

impl<'a, T, const N: usize> From<&'a mut [T; N]> for Vec1<T>
where [T; N]: Array1, T: Copy,

Source§

fn from(items: &'a mut [T; N]) -> Self

Converts to this type from the input type.
Source§

impl<'a, T> From<&'a mut NonEmpty<[T]>> for Vec1<T>
where T: Clone,

Source§

fn from(items: &'a mut Slice1<T>) -> Self

Converts to this type from the input type.
Source§

impl<T, const N: usize> From<[T; N]> for Vec1<T>
where [T; N]: Array1,

Source§

fn from(items: [T; N]) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Box<NonEmpty<[T]>>> for Vec1<T>

Source§

fn from(items: BoxedSlice1<T>) -> Self

Converts to this type from the input type.
Source§

impl<'a, T> From<Cow<'a, NonEmpty<[T]>>> for Vec1<T>
where Slice1<T>: ToOwned<Owned = Vec1<T>>,

Source§

fn from(items: CowSlice1<'a, T>) -> Self

Converts to this type from the input type.
Source§

impl From<NonEmpty<String>> for Vec1<u8>

Source§

fn from(items: String1) -> Self

Converts to this type from the input type.
Source§

impl<T> From<NonEmpty<VecDeque<T>>> for Vec1<T>

Source§

fn from(items: VecDeque1<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> FromIterator1<T> for Vec1<T>

Source§

fn from_iter1<I>(items: I) -> Self
where I: IntoIterator1<Item = T>,

Source§

fn try_from_iter<I>(items: I) -> Result<Self, EmptyError<Peekable<I::IntoIter>>>
where Self: Sized, I: IntoIterator<Item = T>,

Source§

impl<T> FromParallelIterator1<T> for Vec1<T>
where T: Send,

Available on crate feature rayon only.
Source§

fn from_par_iter1<I>(items: I) -> Self
where I: IntoParallelIterator1<Item = T>,

Source§

impl<T, I> Index<I> for Vec1<T>
where Vec<T>: Index<I>,

Source§

type Output = <Vec<T> as Index<I>>::Output

The returned type after indexing.
Source§

fn index(&self, at: I) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, I> IndexMut<I> for Vec1<T>
where Vec<T>: IndexMut<I>,

Source§

fn index_mut(&mut self, at: I) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, T> IntoIterator for &'a Vec1<T>

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T> IntoIterator for &'a mut Vec1<T>

Source§

type Item = &'a mut T

The type of the elements being iterated over.
Source§

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> IntoIterator for Vec1<T>

Source§

type Item = T

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> IntoIterator1 for &Vec1<T>

Source§

impl<T> IntoIterator1 for &mut Vec1<T>

Source§

impl<T> IntoIterator1 for Vec1<T>

Source§

impl<'a, T> IntoParallelIterator for &'a Vec1<T>
where T: Sync,

Available on crate feature rayon only.
Source§

type Item = &'a T

The type of item that the parallel iterator will produce.
Source§

type Iter = <&'a Vec<T> as IntoParallelIterator>::Iter

The parallel iterator type that will be created.
Source§

fn into_par_iter(self) -> Self::Iter

Converts self into a parallel iterator. Read more
Source§

impl<'a, T> IntoParallelIterator for &'a mut Vec1<T>
where T: Send,

Available on crate feature rayon only.
Source§

type Item = &'a mut T

The type of item that the parallel iterator will produce.
Source§

type Iter = <&'a mut Vec<T> as IntoParallelIterator>::Iter

The parallel iterator type that will be created.
Source§

fn into_par_iter(self) -> Self::Iter

Converts self into a parallel iterator. Read more
Source§

impl<T> IntoParallelIterator for Vec1<T>
where T: Send,

Available on crate feature rayon only.
Source§

type Item = T

The type of item that the parallel iterator will produce.
Source§

type Iter = <Vec<T> as IntoParallelIterator>::Iter

The parallel iterator type that will be created.
Source§

fn into_par_iter(self) -> Self::Iter

Converts self into a parallel iterator. Read more
Source§

impl<T> IntoParallelIterator1 for &Vec1<T>
where T: Sync,

Available on crate feature rayon only.
Source§

impl<T> IntoParallelIterator1 for &mut Vec1<T>
where T: Send,

Available on crate feature rayon only.
Source§

impl<T> IntoParallelIterator1 for Vec1<T>
where T: Send,

Available on crate feature rayon only.
Source§

impl<T> JsonSchema for Vec1<T>
where T: JsonSchema,

Available on crate feature schemars only.
Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

impl<U, T> PartialEq<&[U]> for Vec1<T>
where T: PartialEq<U>,

Source§

fn eq(&self, rhs: &&[U]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<U, T, const N: usize> PartialEq<&[U; N]> for Vec1<T>
where T: PartialEq<U>,

Source§

fn eq(&self, rhs: &&[U; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<U, T> PartialEq<&NonEmpty<[U]>> for Vec1<T>
where T: PartialEq<U>,

Source§

fn eq(&self, rhs: &&Slice1<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<U, T> PartialEq<&mut [U]> for Vec1<T>
where T: PartialEq<U>,

Source§

fn eq(&self, rhs: &&mut [U]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<U, T> PartialEq<&mut NonEmpty<[U]>> for Vec1<T>
where T: PartialEq<U>,

Source§

fn eq(&self, rhs: &&mut Slice1<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<U, T> PartialEq<[U]> for Vec1<T>
where T: PartialEq<U>,

Source§

fn eq(&self, rhs: &[U]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<U, T, const N: usize> PartialEq<[U; N]> for Vec1<T>
where T: PartialEq<U>,

Source§

fn eq(&self, rhs: &[U; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Segmentation for Vec1<T>

Source§

type Kind = NonEmpty<Vec<T>>

Available on crate features alloc or arrayvec or heapless only.
Source§

type Target = Vec<T>

Available on crate features alloc or arrayvec or heapless only.
Source§

impl<'a, T> TryFrom<&'a [T]> for Vec1<T>
where T: Clone,

Source§

type Error = EmptyError<&'a [T]>

The type returned in the event of a conversion error.
Source§

fn try_from(items: &'a [T]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a, T> TryFrom<&'a Vec<T>> for &'a Vec1<T>

Source§

type Error = EmptyError<&'a Vec<T>>

The type returned in the event of a conversion error.
Source§

fn try_from(items: &'a Vec<T>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a, T> TryFrom<&'a mut [T]> for Vec1<T>
where T: Clone,

Source§

type Error = EmptyError<&'a mut [T]>

The type returned in the event of a conversion error.
Source§

fn try_from(items: &'a mut [T]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a, T> TryFrom<&'a mut Vec<T>> for &'a mut Vec1<T>

Source§

type Error = EmptyError<&'a mut Vec<T>>

The type returned in the event of a conversion error.
Source§

fn try_from(items: &'a mut Vec<T>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T> TryFrom<Vec<T>> for Vec1<T>

Source§

type Error = EmptyError<Vec<T>>

The type returned in the event of a conversion error.
Source§

fn try_from(items: Vec<T>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Write for Vec1<u8>

Available on crate feature std only.
Source§

fn write(&mut self, buffer: &[u8]) -> Result<usize>

Writes a buffer into this writer, returning how many bytes were written. Read more
Source§

fn write_vectored(&mut self, buffers: &[IoSlice<'_>]) -> Result<usize>

Like write, except that it writes from a slice of buffers. Read more
Source§

fn write_all(&mut self, buffer: &[u8]) -> Result<()>

Attempts to write an entire buffer into this writer. Read more
Source§

fn flush(&mut self) -> Result<()>

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
Source§

fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
1.0.0 · Source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error encountered. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more
Source§

impl<T> UnsafeHash for Vec1<T>
where T: UnsafeHash,

Source§

impl<T> UnsafeOrd for Vec1<T>
where T: UnsafeOrd,

Source§

impl<T> UnsafeOrdIsomorph<&NonEmpty<[T]>> for Vec1<T>
where T: UnsafeOrd,

Source§

impl<T> UnsafeOrdIsomorph<&mut NonEmpty<[T]>> for Vec1<T>
where T: UnsafeOrd,

Source§

impl<T> UnsafeOrdIsomorph<NonEmpty<[T]>> for Vec1<T>
where T: UnsafeOrd,