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§
Sourcefn into_sources(self) -> Vec<PathBuf>
fn into_sources(self) -> Vec<PathBuf>
Convert this type into a vector of file paths.