• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vortex-data / vortex / 16004224696

01 Jul 2025 03:53PM UTC coverage: 77.952%. Remained the same
16004224696

push

github

web-flow
chore: rename error => error_out (#3708)

Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>

0 of 24 new or added lines in 4 files covered. (0.0%)

42908 of 55044 relevant lines covered (77.95%)

56219.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/vortex-ffi/src/array_iterator.rs
1
use std::ptr;
2

3
use vortex::iter::ArrayIterator;
4

5
use crate::array::vx_array;
6
use crate::box_dyn_wrapper;
7
use crate::error::{try_or, vx_error};
8

9
box_dyn_wrapper!(
10
    /// A Vortex array iterator.
11
    ///
12
    /// Once the iterator is finished (returns `null` from [`vx_array_iterator_next`]), it may panic
13
    /// on subsequent calls to [`vx_array_iterator_next`].
14
    ///
15
    /// Even after the iterator is finished, an owned iterator must be released by calling
16
    /// [`vx_array_iter_free`].
17
    ///
18
    /// Iterators may be passed between threads, but calls to [`vx_array_iterator_next`] should be
19
    /// serialized and not invoked concurrently.
20
    dyn ArrayIterator,
21
    vx_array_iterator
22
);
23

24
/// Attempt to advance the `current` pointer of the iterator.
25
///
26
/// A return value of `true` indicates that another element was pulled from the iterator, and a return
27
/// of `false` indicates that the iterator is finished.
28
///
29
/// It is an error to call this function again after the iterator is finished.
30
#[unsafe(no_mangle)]
31
pub unsafe extern "C-unwind" fn vx_array_iterator_next(
×
32
    iter: *mut vx_array_iterator,
×
NEW
33
    error_out: *mut *mut vx_error,
×
34
) -> *const vx_array {
×
35
    let iter = vx_array_iterator::as_mut(iter);
×
NEW
36
    try_or(error_out, ptr::null_mut(), || {
×
37
        let element = iter.next();
×
38

39
        if let Some(element) = element {
×
40
            Ok(vx_array::new(element?))
×
41
        } else {
42
            // Drop the iter pointer.
43
            Ok(ptr::null_mut())
×
44
        }
45
    })
×
46
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc