Lines Matching +full:foo +full:- +full:supply

1 // SPDX-License-Identifier: Apache-2.0 OR MIT
91 // `core::slice::SliceExt` - we need to supply these functions for the
102 pub fn into_vec<T, A: Allocator>(b: Box<[T], A>) -> Vec<T, A> { in into_vec()
112 pub fn to_vec<T: ConvertVec, A: Allocator>(s: &[T], alloc: A) -> Vec<T, A> { in to_vec()
118 fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> in to_vec()
126 default fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> { in to_vec()
163 fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> { in to_vec()
181 …/// This sort is stable (i.e., does not reorder equal elements) and *O*(*n* \* log(*n*)) worst-cas…
195 /// non-allocating insertion sort is used instead.
200 /// let mut v = [-5, 4, 1, -3, 2];
203 /// assert!(v == [-5, -3, 1, 2, 4]);
218 …/// This sort is stable (i.e., does not reorder equal elements) and *O*(*n* \* log(*n*)) worst-cas…
248 /// non-allocating insertion sort is used instead.
267 F: FnMut(&T, &T) -> Ordering, in sort_by()
275 /// worst-case, where the key function is *O*(*m*).
293 /// non-allocating insertion sort is used instead.
298 /// let mut v = [-5i32, 4, 1, -3, 2];
301 /// assert!(v == [1, 2, -3, 4, -5]);
309 F: FnMut(&T) -> K, in sort_by_key()
323 /// worst-case, where the key function is *O*(*m*).
331 /// The current algorithm is based on [pattern-defeating quicksort][pdqsort] by Orson Peters,
343 /// let mut v = [-5i32, 4, 32, -3, 2];
346 /// assert!(v == [-3, -5, 2, 32, 4]);
356 F: FnMut(&T) -> K, in sort_by_cached_key()
414 pub fn to_vec(&self) -> Vec<T> in to_vec()
438 pub fn to_vec_in<A: Allocator>(&self, alloc: A) -> Vec<T, A> in to_vec_in()
463 pub fn into_vec<A: Allocator>(self: Box<Self, A>) -> Vec<T, A> { in into_vec()
491 pub fn repeat(&self, n: usize) -> Vec<T> in repeat()
508 // `2^expn` repetition is done by doubling `buf` `expn`-times. in repeat()
530 // `rem` (`= n - 2^expn`) repetition is done by copying in repeat()
532 let rem_len = capacity - buf.len(); // `self.len() * rem` in repeat()
536 // This is non-overlapping since `2^expn > rem`. in repeat()
559 pub fn concat<Item: ?Sized>(&self) -> <Self as Concat<Item>>::Output in concat()
578 pub fn join<Separator>(&self, sep: Separator) -> <Self as Join<Separator>>::Output in join()
598 pub fn connect<Separator>(&self, sep: Separator) -> <Self as Join<Separator>>::Output in connect()
612 /// but non-ASCII letters are unchanged.
614 /// To uppercase the value in-place, use [`make_ascii_uppercase`].
623 pub fn to_ascii_uppercase(&self) -> Vec<u8> { in to_ascii_uppercase()
633 /// but non-ASCII letters are unchanged.
635 /// To lowercase the value in-place, use [`make_ascii_lowercase`].
644 pub fn to_ascii_lowercase(&self) -> Vec<u8> { in to_ascii_lowercase()
663 /// --> library/alloc/src/slice.rs:608:6
674 /// pub struct Foo(Vec<u32>, Vec<String>);
676 /// impl std::borrow::Borrow<[u32]> for Foo {
677 /// fn borrow(&self) -> &[u32] { &self.0 }
680 /// impl std::borrow::Borrow<[String]> for Foo {
681 /// fn borrow(&self) -> &[String] { &self.1 }
692 fn concat(slice: &Self) -> Self::Output; in concat()
704 fn join(slice: &Self, sep: Separator) -> Self::Output; in join()
712 fn concat(slice: &Self) -> Vec<T> { in concat()
727 fn join(slice: &Self, sep: &T) -> Vec<T> { in join()
733 let size = slice.iter().map(|v| v.borrow().len()).sum::<usize>() + slice.len() - 1; in join()
750 fn join(slice: &Self, sep: &[T]) -> Vec<T> { in join()
757 slice.iter().map(|v| v.borrow().len()).sum::<usize>() + sep.len() * (slice.len() - 1); in join()
775 fn borrow(&self) -> &[T] { in borrow()
782 fn borrow_mut(&mut self) -> &mut [T] { in borrow_mut()
802 // slices here are always in-bounds. in clone_into()
824 fn to_owned(&self) -> Vec<T> { in to_owned()
829 fn to_owned(&self) -> Vec<T> { in to_owned()
846 F: FnMut(&T, &T) -> bool, in stable_sort()
849 // Sorting has no meaningful behavior on zero-sized types. Do nothing. in stable_sort()
853 let elem_alloc_fn = |len: usize| -> *mut T { in stable_sort()
855 // v.len(). Alloc in general will only be used as 'shadow-region' to store temporary swap in stable_sort()
869 let run_alloc_fn = |len: usize| -> *mut sort::TimSortRun { in stable_sort()