Lines Matching defs:current

500                 current: self.first,
511 current: self.first,
537 /// * The `current` pointer is null or points at a value in that [`List`].
541 current: *mut ListLinksFields,
550 if self.current.is_null() {
554 let current = self.current;
556 // SAFETY: We just checked that `current` is not null, so it is in a list, and hence not
558 let next = unsafe { (*current).next };
559 // INVARIANT: If `current` was the last element of the list, then this updates it to null.
561 self.current = if next != self.stop {
567 // SAFETY: The `current` pointer points at a value in the list.
568 let item = unsafe { T::view_value(ListLinks::from_fields(current)) };
584 /// The `current` pointer points a value in `list`.
586 current: *mut ListLinksFields,
591 /// Access the current element of this cursor.
592 pub fn current(&self) -> ArcBorrow<'_, T> {
593 // SAFETY: The `current` pointer points a value in the list.
594 let me = unsafe { T::view_value(ListLinks::from_fields(self.current)) };
609 // SAFETY: The `current` field is always in a list.
610 let next = unsafe { (*self.current).next };
615 // INVARIANT: Since `self.current` is in the `list`, its `next` pointer is also in the
618 current: next,
626 // SAFETY: The `current` field is always in a list.
627 let prev = unsafe { (*self.current).prev };
629 if self.current == self.list.first {
632 // INVARIANT: Since `self.current` is in the `list`, its `prev` pointer is also in the
635 current: prev,
641 /// Remove the current element from the list.
643 // SAFETY: The `current` pointer always points at a member of the list.
644 unsafe { self.list.remove_internal(self.current) }