Lines Matching defs:back

2626         assert_eq!(n.back().unwrap(), &2);
2653 assert_eq!(p.back(), Some(&1));
2694 assert_eq!(m.back(), Some(&1));
11228 assert_eq!(*d.back().unwrap(), 137);
11262 assert_eq!((*deq.back().unwrap()).clone(), d.clone());
12875 // Split search (both front & back non-empty):
12913 // Split search (both front & back non-empty):
14767 /// is free to give back more than we asked for.
16343 /// `String` to a [`str`][`&str`], then referencing the [`str`][`&str`] back to
16458 /// [`into_bytes`] method will give back the byte vector that was used in the
16815 /// this is to convert the raw pointer, length, and capacity back
19528 //! children back to their parents.
20258 /// To avoid a memory leak the pointer must be converted back to an `Rc` using
20333 /// // Convert back to an `Rc` to prevent leak.
20692 /// and must return back a (potentially fat)-pointer for the `RcBox<T>`.
20714 /// and must return back a (potentially fat)-pointer for the `RcBox<T>`.
21437 /// pointers from children back to their parents.
21542 /// back into the `Weak<T>` with [`from_raw`].
21572 /// Converts a raw pointer previously created by [`into_raw`] back into `Weak<T>`.
22452 /// The resulting vector can be converted back into a box via
23383 /// pointers from children back to their parents.
23536 /// pointers from children back to their parents.
24031 /// To avoid a memory leak the pointer must be converted back to an `Arc` using
24104 /// // Convert back to an `Arc` to prevent leak.
24344 /// and must return back a (potentially fat)-pointer for the `ArcInner<T>`.
24366 /// and must return back a (potentially fat)-pointer for the `ArcInner<T>`.
24659 // We were the sole reference of either kind; bump back up the
24954 /// back into the `Weak<T>` with [`from_raw`].
24984 /// Converts a raw pointer previously created by [`into_raw`] back into `Weak<T>`.
26159 //! that an error has occurred back up the stack.
27117 /// Adds the given node to the back of the list.
27138 /// Removes and returns the node at the back of the list.
27482 /// Provides a cursor at the back element.
27491 /// Provides a cursor with editing operations at the back element.
27645 /// Provides a reference to the back element, or `None` if the list is
27654 /// assert_eq!(dl.back(), None);
27657 /// assert_eq!(dl.back(), Some(&1));
27661 pub fn back(&self) -> Option<&T> {
27665 /// Provides a mutable reference to the back element, or `None` if the list
27674 /// assert_eq!(dl.back(), None);
27677 /// assert_eq!(dl.back(), Some(&1));
27683 /// assert_eq!(dl.back(), Some(&5));
27737 /// Appends an element to the back of a list.
27749 /// assert_eq!(3, *d.back().unwrap());
28050 /// A `Cursor` is like an iterator, except that it can freely seek back-and-forth.
28081 /// A `Cursor` is like an iterator, except that it can freely seek back-and-forth, and can
30127 /// drop an entire tree without the need to first look up a `back` leaf edge.
31298 Some(unsafe { self.range.back.as_mut().unwrap().deallocating_next_back_unchecked() })
31656 unsafe { self.inner.back.as_mut().unwrap_unchecked().next_back_unchecked() }
31666 Range { inner: LeafRange { front: self.inner.front, back: self.inner.back } }
31715 unsafe { self.inner.back.as_mut().unwrap_unchecked().next_back_unchecked() }
33757 pub back: Option<Handle<NodeRef<BorrowType, K, V, marker::Leaf>, marker::Edge>>,
33762 LeafRange { front: None, back: None }
33766 self.front == self.back
33773 back: self.back.as_ref().map(|b| b.reborrow()),
33783 /// the result and/or calls to `next_back_unchecked` on the `back` of the
33814 (Leaf(f), Leaf(b)) => return LeafRange { front: Some(f), back: Some(b) },
33838 let back = max_node.last_edge();
33839 match (front.force(), back.force()) {
33841 return LeafRange { front: Some(f), back: Some(b) };
35611 // Check the back pointers top-down, before we attempt to rely on
36037 let back = it.next_back().unwrap();
36039 assert_eq!(back, (&1, &mut 1));
36041 *back.1 = 42;
36043 assert_eq!(back, (&1, &mut 42));
37809 // Remove an adjacent KV from its leaf and then put it back in place of
37816 // The internal node may have been stolen from or merged. Go back right
38230 /// no parent, giving back the original `NodeRef`.
39636 // Asserts that the back pointer in each reachable node points to its parent.
40424 /// push onto the back in this manner, and iterating over `VecDeque` goes front
40425 /// to back.
40488 let (front, back) = self.as_mut_slices();
40490 let _back_dropper = Dropper(back);
41237 // `begin <= back.len()` in the first case
41245 let (front, back) = self.as_mut_slices();
41248 let drop_back = back.get_unchecked_mut(begin..) as *mut _;
41252 let drop_back = back as *mut _;
41264 /// Returns a front-to-back iterator.
41284 /// Returns a front-to-back iterator that returns mutable references.
41548 // When finished, the remaining data will be copied back to cover the hole,
41677 /// Provides a reference to the back element, or `None` if the `VecDeque` is
41686 /// assert_eq!(d.back(), None);
41690 /// assert_eq!(d.back(), Some(&2));
41693 pub fn back(&self) -> Option<&T> {
41697 /// Provides a mutable reference to the back element, or `None` if the
41706 /// assert_eq!(d.back(), None);
41714 /// assert_eq!(d.back(), Some(&9));
41798 /// Appends an element to the back of the `VecDeque`.
41808 /// assert_eq!(3, *buf.back().unwrap());
41899 /// greater than or equal to `index` towards the back.
42459 /// either by removing excess elements from the back or by appending
42460 /// elements generated by calling `generator` to the back.
42852 let (front, back) = self.as_slices();
42853 let cmp_back = back.first().map(|elem| f(elem));
42858 back.binary_search_by(f).map(|idx| idx + front.len()).map_err(|idx| idx + front.len())
42949 let (front, back) = self.as_slices();
42951 if let Some(true) = back.first().map(|v| pred(v)) {
42952 back.partition_point(pred) + front.len()
42961 /// either by removing excess elements from the back or by appending clones of `value`
42962 /// to the back.
43114 /// Consumes the `VecDeque` into a front-to-back iterator yielding elements by
43303 let (front, back) = RingSlices::ring_slices(self.ring, self.head, self.tail);
43304 f.debug_tuple("Iter").field(&front).field(&back).finish()
43340 let (front, back) = RingSlices::ring_slices(self.ring, self.head, self.tail);
43342 back.iter().fold(accum, &mut f)
43358 let (front, back) = self.ring.split_at(self.tail);
43359 let mut back_iter = back.iter();
43414 let (front, back) = RingSlices::ring_slices(self.ring, self.head, self.tail);
43415 accum = back.iter().rfold(accum, &mut f);
43432 let (front, back) = self.ring.split_at(self.tail);
43436 iter = back.iter();
43520 fn test(back: bool) {
43529 if back { (0..len).collect() } else { (0..len).rev().collect() };
43533 if back {
44149 let (front, back) = RingSlices::ring_slices(self.ring, self.head, self.tail);
44152 let (front, back) = unsafe { (&*front, &*back) };
44153 f.debug_tuple("IterMut").field(&front).field(&back).finish()
44185 let (front, back) = RingSlices::ring_slices(self.ring, self.head, self.tail);
44188 let (front, back) = unsafe { (&mut *front, &mut *back) };
44190 back.iter_mut().fold(accum, &mut f)
44241 let (front, back) = RingSlices::ring_slices(self.ring, self.head, self.tail);
44244 let (front, back) = unsafe { (&mut *front, &mut *back) };
44245 accum = back.iter_mut().rfold(accum, &mut f);
44466 /// // If we instead pop these scores, they should come back in order.
44496 /// // If we pop these scores now, they should come back in the reverse order.
44791 // hole), shift along the others and move the removed element back into the
44794 // the hole is filled back at the end of its scope, even on panic.
46386 /// Continues dropping the remaining elements in the `Drain`, then moves back the
46399 // memmove back untouched tail, update to new length
46420 // Drop a `DropGuard` to move back the non-drained tail of `self`.
46777 // - it lets us thread the write pointer through its innards and get it back in the end
46797 // write back the result.
47130 /// and then filling it back up to the same [`len`] should incur no calls to
47310 /// // Put everything back together into a Vec
47456 /// // Put everything back together into a Vec
47476 /// this is to convert the raw pointer, length, and capacity back
47513 /// this is to convert the raw pointer, length, and capacity back
48425 /// Appends an element to the back of a collection.
48547 // When finished, remaining tail of the vec is copied back to cover
49671 /// If the length doesn't match, the input comes back in `Err`:
50044 // Let `Drain::drop` move the tail back if necessary and restore `vec.len`.
50187 //! Move a value from a [`Box`] back to the stack by [dereferencing]:
50992 /// do this is to convert the raw pointer back into a `Box` with the
51001 /// Converting the raw pointer back into a `Box` with [`Box::from_raw`]
51037 /// do this is to convert the raw pointer back into a `Box` with the
51046 /// Converting the raw pointer back into a `Box` with [`Box::from_raw_in`]