pub trait WireSource: Sealed {
type Payload<'a>;
type TypeKey: Hash + Eq + Clone;
// Required methods
fn type_key(payload: &Self::Payload<'_>) -> Self::TypeKey;
fn column_name<'a>(payload: &'a Self::Payload<'_>) -> &'a str;
}Expand description
Per-format marker naming a CDC wire source.
Implementors are unit structs owned by each format module
(PgWalstream, Wal2Json, Maxwell). The associated types describe
the format’s per-column payload and its native type-identity key.
§Type keys
PgWalstream::TypeKey = pg_walstream::Oid(u32 alias).Wal2Json::TypeKey = alloc::sync::Arc<str>(Postgres type name).Maxwell::TypeKey = alloc::sync::Arc<str>(MySQL type name; empty string when the Maxwell daemon runs without--include_types).
Required Associated Types§
Required Methods§
Sourcefn type_key(payload: &Self::Payload<'_>) -> Self::TypeKey
fn type_key(payload: &Self::Payload<'_>) -> Self::TypeKey
Extract the type key from a payload for dispatch.
Sourcefn column_name<'a>(payload: &'a Self::Payload<'_>) -> &'a str
fn column_name<'a>(payload: &'a Self::Payload<'_>) -> &'a str
Extract the column name from a payload for diagnostic messages.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".