Skip to main content

IntoFileSources

Trait IntoFileSources 

Source
pub trait IntoFileSources {
    // Required method
    fn into_sources(self) -> Vec<PathBuf>;
}
Expand description

Trait for types that can be converted to a collection of file sources.

This trait enables the parallel import functions to accept both single paths and collections of paths, providing a flexible API.

§Example

use std::path::PathBuf;
use exarrow_rs::import::IntoFileSources;

// Single path
let single = PathBuf::from("/data/file.csv");
let sources: Vec<PathBuf> = single.into_sources();
assert_eq!(sources.len(), 1);

// Multiple paths
let multiple = vec![
    PathBuf::from("/data/file1.csv"),
    PathBuf::from("/data/file2.csv"),
];
let sources: Vec<PathBuf> = multiple.into_sources();
assert_eq!(sources.len(), 2);

Required Methods§

Source

fn into_sources(self) -> Vec<PathBuf>

Convert this type into a vector of file paths.

Implementations on Foreign Types§

Source§

impl IntoFileSources for &str

Source§

impl IntoFileSources for &Path

Source§

impl IntoFileSources for &PathBuf

Source§

impl IntoFileSources for &[PathBuf]

Source§

impl IntoFileSources for String

Source§

impl IntoFileSources for Vec<&str>

Source§

impl IntoFileSources for Vec<String>

Source§

impl IntoFileSources for Vec<PathBuf>

Source§

impl IntoFileSources for PathBuf

Source§

impl<const N: usize> IntoFileSources for &[PathBuf; N]

Source§

impl<const N: usize> IntoFileSources for [PathBuf; N]

Implementors§