pub trait SourceConnection:
Debug
+ Clone
+ PartialEq
+ AlterCompatible {
// Required methods
fn name(&self) -> &'static str;
fn external_reference(&self) -> Option<&str>;
fn default_key_desc(&self) -> RelationDesc;
fn default_value_desc(&self) -> RelationDesc;
fn timestamp_desc(&self) -> RelationDesc;
fn connection_id(&self) -> Option<CatalogItemId>;
fn primary_export_details(&self) -> SourceExportDetails;
fn supports_read_only(&self) -> bool;
fn prefers_single_replica(&self) -> bool;
}
Expand description
A connection to an external system
Required Methods§
Sourcefn external_reference(&self) -> Option<&str>
fn external_reference(&self) -> Option<&str>
The name of the resource in the external system (e.g kafka topic) if any
Sourcefn default_key_desc(&self) -> RelationDesc
fn default_key_desc(&self) -> RelationDesc
Defines the key schema to use by default for this source connection type. This will be used for the primary export of the source and as the default pre-encoding key schema for the source.
Sourcefn default_value_desc(&self) -> RelationDesc
fn default_value_desc(&self) -> RelationDesc
Defines the value schema to use by default for this source connection type. This will be used for the primary export of the source and as the default pre-encoding value schema for the source.
Sourcefn timestamp_desc(&self) -> RelationDesc
fn timestamp_desc(&self) -> RelationDesc
The schema of this connection’s timestamp type. This will also be the schema of the progress relation.
Sourcefn connection_id(&self) -> Option<CatalogItemId>
fn connection_id(&self) -> Option<CatalogItemId>
The id of the connection object (i.e the one obtained from running CREATE CONNECTION
) in
the catalog, if any.
Sourcefn primary_export_details(&self) -> SourceExportDetails
fn primary_export_details(&self) -> SourceExportDetails
If this source connection can output to a primary collection, contains the source-specific
details of that export, else is set to SourceExportDetails::None
to indicate that
this source should not export to the primary collection.
Sourcefn supports_read_only(&self) -> bool
fn supports_read_only(&self) -> bool
Whether the source type supports read only mode.
Sourcefn prefers_single_replica(&self) -> bool
fn prefers_single_replica(&self) -> bool
Whether the source type prefers to run on only one replica of a multi-replica cluster.
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.