#[non_exhaustive]pub struct InboundConnectorLink {
pub url: LinkAddress,
pub config: Vec<(String, String)>,
pub ingest_factory: IngestFactoryFn,
pub key: Option<(String, NonZeroU16)>,
pub topic_resolver: Option<TopicResolverFn>,
}Expand description
Configuration for an inbound connector link (External → AimDB)
Stores the parsed URL, configuration, and the fused ingest factory. The factory captures the type T at creation time, allowing type-safe deserialize+produce later without needing PhantomData or type parameters.
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.url: LinkAddressParsed link address (scheme://resource)
config: Vec<(String, String)>Additional configuration options (protocol-specific)
ingest_factory: IngestFactoryFnFused ingest factory (alloc feature)
Takes the live AimDb and returns the IngestFn that
deserializes bytes and produces into the record’s buffer in one typed
closure. Captures the record type T at link_from() call time —
finish() validates the deserializer is present before registering
the link, so the factory is always set.
Available in both std and no_std + alloc environments.
key: Option<(String, NonZeroU16)>Set by .key(..): the keyed capture and the key table’s capacity.
topic_resolver: Option<TopicResolverFn>Optional dynamic topic resolver (late-binding)
Called once at connector startup to determine the subscription topic.
If the resolver returns None, the static topic from the URL is used.
Available in both std and no_std + alloc environments.
Implementations§
Source§impl InboundConnectorLink
impl InboundConnectorLink
Sourcepub fn new(url: LinkAddress, ingest_factory: IngestFactoryFn) -> Self
pub fn new(url: LinkAddress, ingest_factory: IngestFactoryFn) -> Self
Creates a new inbound connector link from a link address and ingest factory
Sourcepub fn create_ingest(&self, db: &AimDb) -> IngestFn
pub fn create_ingest(&self, db: &AimDb) -> IngestFn
Creates the fused ingest callback using the stored factory.
Runs once at route-collection time; the returned IngestFn is the
per-message path (deserialize + produce, no erasure crossing).
Available in both std and no_std + alloc environments.
Sourcepub fn resolve_topic(&self) -> String
pub fn resolve_topic(&self) -> String
Resolves the subscription topic for this link
If a topic resolver is configured, calls it to determine the topic. Otherwise, returns the static topic from the URL.
This is called once at connector startup.