Trait vector::topology::schema::ComponentContainer

source ·
pub trait ComponentContainer {
    // Required methods
    fn schema_enabled(&self) -> bool;
    fn source_outputs(&self, key: &ComponentKey) -> Option<Vec<SourceOutput>>;
    fn transform_inputs(&self, key: &ComponentKey) -> Option<&[OutputId]>;
    fn transform_outputs(
        &self,
        key: &ComponentKey,
        enrichment_tables: TableRegistry,
        input_definitions: &[(OutputId, Definition)],
    ) -> Option<Vec<TransformOutput>>;

    // Provided methods
    fn transform_output_for_port(
        &self,
        key: &ComponentKey,
        port: &Option<String>,
        enrichment_tables: TableRegistry,
        input_definitions: &[(OutputId, Definition)],
    ) -> Result<Option<TransformOutput>, ()> { ... }
    fn source_output_for_port(
        &self,
        key: &ComponentKey,
        port: &Option<String>,
    ) -> Result<Option<SourceOutput>, ()> { ... }
}

Required Methods§

source

fn schema_enabled(&self) -> bool

source

fn source_outputs(&self, key: &ComponentKey) -> Option<Vec<SourceOutput>>

source

fn transform_inputs(&self, key: &ComponentKey) -> Option<&[OutputId]>

source

fn transform_outputs( &self, key: &ComponentKey, enrichment_tables: TableRegistry, input_definitions: &[(OutputId, Definition)], ) -> Option<Vec<TransformOutput>>

Provided Methods§

source

fn transform_output_for_port( &self, key: &ComponentKey, port: &Option<String>, enrichment_tables: TableRegistry, input_definitions: &[(OutputId, Definition)], ) -> Result<Option<TransformOutput>, ()>

Gets the transform output for the given port.

Returns Err(()) if there is no transform with the given key Returns Some(None) if the source does not have an output for the port given

source

fn source_output_for_port( &self, key: &ComponentKey, port: &Option<String>, ) -> Result<Option<SourceOutput>, ()>

Gets the source output for the given port.

Returns Err(()) if there is no source with the given key Returns Some(None) if the source does not have an output for the port given

Implementors§