Skip to main content

TransformPlugin

Trait TransformPlugin 

Source
pub trait TransformPlugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn transform(
        &self,
        records: Vec<GeneratedRecord>,
    ) -> Result<Vec<GeneratedRecord>, SynthError>;

    // Provided methods
    fn version(&self) -> &str { ... }
    fn description(&self) -> &str { ... }
}
Expand description

Trait for data transform plugins.

Transform plugins modify or enrich records in-place.

Required Methods§

Source

fn name(&self) -> &str

Unique name identifying this transform.

Source

fn transform( &self, records: Vec<GeneratedRecord>, ) -> Result<Vec<GeneratedRecord>, SynthError>

Transform a batch of records.

Provided Methods§

Source

fn version(&self) -> &str

Semantic version of this plugin. Defaults to “0.1.0”.

Source

fn description(&self) -> &str

Human-readable description. Defaults to empty string.

Implementors§