INNER CODE UNIT · Rust

usize

abdenlab/oxbow · r-oxbow/src/rust/src/lib.rs:18

pub const BUFFER_SIZE_BYTES: usize = const { 1024 * 1024 };

/// Convert an R character vector (or NULL) to a `Select<String>`.
///
/// - `NULL` (`None`)       → `Select::Omit`  (exclude the column group)
/// - `"*"` (single star)   → `Select::All`   (explicit wildcard, mirrors Python)
/// - any other vector      → `Select::Some`  (include only named items)
fn resolve_r_fields(fields: Option<Vec<String>>) -> Select<String> {
    match fields {
        None => Select::Omit,
        Some(v) if v.len() == 1 && v[0] == "*" => Select::All,
        Some(v) => Select::Some(v),
    }
}

/// Return Arrow IPC format from a FASTQ file.
#[extendr]
fn read_fastq_impl(path: &str, fields: Option<Vec<String>>) -> Vec<u8> {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…