Skip to main content

InputAdapter

Trait InputAdapter 

Source
pub trait InputAdapter: Send + Sync {
    // Required methods
    fn format(&self) -> &'static str;
    fn read_input_columns(
        &self,
        entity: &EntityConfig,
        input_file: &InputFile,
        columns: &[ColumnConfig],
    ) -> Result<Vec<String>, FileReadError>;
    fn read_inputs(
        &self,
        entity: &EntityConfig,
        files: &[InputFile],
        columns: &[ColumnConfig],
        normalize_strategy: Option<&str>,
        collect_raw: bool,
    ) -> FloeResult<Vec<ReadInput>>;

    // Provided methods
    fn default_globs(&self) -> FloeResult<Vec<String>> { ... }
    fn suffixes(&self) -> FloeResult<Vec<String>> { ... }
    fn resolve_local_inputs(
        &self,
        config_dir: &Path,
        entity_name: &str,
        source: &SourceConfig,
        storage: &str,
    ) -> FloeResult<ResolvedLocalInputs> { ... }
}

Required Methods§

Source

fn format(&self) -> &'static str

Source

fn read_input_columns( &self, entity: &EntityConfig, input_file: &InputFile, columns: &[ColumnConfig], ) -> Result<Vec<String>, FileReadError>

Source

fn read_inputs( &self, entity: &EntityConfig, files: &[InputFile], columns: &[ColumnConfig], normalize_strategy: Option<&str>, collect_raw: bool, ) -> FloeResult<Vec<ReadInput>>

Provided Methods§

Source

fn default_globs(&self) -> FloeResult<Vec<String>>

Source

fn suffixes(&self) -> FloeResult<Vec<String>>

Source

fn resolve_local_inputs( &self, config_dir: &Path, entity_name: &str, source: &SourceConfig, storage: &str, ) -> FloeResult<ResolvedLocalInputs>

Implementors§