pub trait EnrichmentTableConfig:
NamedComponent
+ Debug
+ Send
+ Sync {
// Required method
async fn build(
&self,
globals: &GlobalOptions,
prev_state: Option<Box<dyn Any + Send + Sync>>,
) -> Result<Box<dyn Table + Send + Sync>>;
// Provided methods
fn wants_previous_state(&self) -> bool { ... }
fn sink_config(
&self,
_default_key: &ComponentKey,
) -> Option<(ComponentKey, Box<dyn SinkConfig>)> { ... }
fn source_config(
&self,
_default_key: &ComponentKey,
) -> Option<(ComponentKey, Box<dyn SourceConfig>)> { ... }
}Expand description
Generalized interface for describing and building enrichment table components.
Required Methods§
Sourceasync fn build(
&self,
globals: &GlobalOptions,
prev_state: Option<Box<dyn Any + Send + Sync>>,
) -> Result<Box<dyn Table + Send + Sync>>
async fn build( &self, globals: &GlobalOptions, prev_state: Option<Box<dyn Any + Send + Sync>>, ) -> Result<Box<dyn Table + Send + Sync>>
Builds the enrichment table with the given globals and previous table state.
If the enrichment table is built successfully, Ok(...) is returned containing the
enrichment table.
§Errors
If an error occurs while building the enrichment table, an error variant explaining the issue is returned.
Provided Methods§
Sourcefn wants_previous_state(&self) -> bool
fn wants_previous_state(&self) -> bool
Checks whether this table wants previous state, to try and restore it.
fn sink_config( &self, _default_key: &ComponentKey, ) -> Option<(ComponentKey, Box<dyn SinkConfig>)>
fn source_config( &self, _default_key: &ComponentKey, ) -> Option<(ComponentKey, Box<dyn SourceConfig>)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.