MCPcopy Create free account
hub / github.com/apache/arrow-rs / next_back

Method next_back

arrow-array/src/iterator.rs:140–156  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

138
139impl<T: ArrayAccessor> DoubleEndedIterator for ArrayIter<T> {
140 fn next_back(&mut self) -> Option<Self::Item> {
141 if self.current_end == self.current {
142 None
143 } else {
144 self.current_end -= 1;
145 Some(if self.is_null(self.current_end) {
146 None
147 } else {
148 // Safety:
149 // we just checked bounds in `self.current_end == self.current`
150 // this is safe on the premise that this struct is initialized with
151 // current = array.len()
152 // and that current_end is ever only decremented
153 unsafe { Some(self.array.value_unchecked(self.current_end)) }
154 })
155 }
156 }
157
158 #[inline]
159 fn nth_back(&mut self, n: usize) -> Option<Self::Item> {

Callers 4

lastMethod · 0.45
nth_backMethod · 0.45
setupMethod · 0.45
assert_lastFunction · 0.45

Calls 2

is_nullMethod · 0.45
value_uncheckedMethod · 0.45

Tested by 1

assert_lastFunction · 0.36