#[non_exhaustive]pub struct ConnectorConfig {
pub timeout_ms: Option<u32>,
pub protocol_options: Vec<(String, String)>,
}Expand description
Protocol-agnostic connector configuration
Carries the route’s key/value options to the connector
(RouteInfo::config). Only the
genuinely protocol-agnostic timeout_ms is a typed field; every
protocol-specific knob (e.g. MQTT’s qos/retain) travels in
protocol_options and is interpreted
by the connector with its own defaults. Connector crates expose typed
setters as extension traits over the link builders (e.g. the MQTT
connector’s MqttLinkExt).
The record a route belongs to is not part of it: core sets that on the
route (RouteInfo::record_index), out of
reach of a link’s query.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.timeout_ms: Option<u32>Optional timeout in milliseconds for the publish/operation, as interpreted by the connector
protocol_options: Vec<(String, String)>Protocol-specific options as key-value pairs Allows custom configuration without polluting the base struct
Implementations§
Source§impl ConnectorConfig
impl ConnectorConfig
Sourcepub fn from_query(query: &[(String, String)]) -> ConnectorConfig
pub fn from_query(query: &[(String, String)]) -> ConnectorConfig
Build a config from a route’s URL-query key/value pairs.
Only the protocol-agnostic timeout_ms (the last occurrence wins) is
lifted into a typed field; every other key is passed through verbatim in
protocol_options for the
connector to interpret with its own defaults.