Connector trait and routing

The plugin-side public API and its typed routing contract. This cluster :satisfies: Connector framework (FEAT_0030).

Feature: Connector trait and routing FEAT_0033
status: open
satisfies: FEAT_0030

The plugin-side public API: a Connector trait every connector implements, parameterised on a typed routing struct so plugin code is compile-time-checked against the protocol it targets.

Requirement: Connector trait REQ_0220
status: open
satisfies: FEAT_0033
is refined by: IMPL_0040
is implemented by: BB_0001

The framework shall define a Connector trait with associated types Routing: Routing and Codec: PayloadCodec, plus methods name, health, subscribe_health, create_writer<T>, and create_reader<T>.

Requirement: ChannelDescriptor carries typed routing REQ_0221
status: implemented
satisfies: FEAT_0033
is refined by: IMPL_0010, ADR_0008
is implemented by: BB_0001
is verified by: TEST_0103
links outgoing: BB_0001, TEST_0103

ChannelDescriptor<R: Routing> shall carry a logical channel name, the per-channel max payload size, and a typed routing struct R declared by the connector crate.

Requirement: Routing is a marker trait with bounds REQ_0222
status: open
satisfies: FEAT_0033
is refined by: IMPL_0010
is implemented by: BB_0001

The Routing trait shall require Clone + Send + Sync + Debug + 'static and shall add no methods of its own.

Requirement: create_writer / create_reader return concrete handles REQ_0223
status: open
satisfies: FEAT_0033
is refined by: IMPL_0040
is verified by: TEST_0120

Connector::create_writer<T> and Connector::create_reader<T> shall return concrete generic types ChannelWriter<T, C, N> and ChannelReader<T, C, N>, not boxed trait objects.

Requirement: Connector ships its own routing struct REQ_0224
status: approved
satisfies: FEAT_0033

Each connector crate (taktora-connector-mqtt, future taktora-connector-opcua, etc.) shall define its own routing struct (MqttRouting, OpcUaRouting, …) implementing the Routing marker trait, exposing protocol-specific fields.