pub struct InboundConnectorLink {
pub url: ConnectorUrl,
pub config: Vec<(String, String)>,
pub deserializer: DeserializerFn,
pub producer_factory: Option<ProducerFactoryFn>,
}Expand description
Configuration for an inbound connector link (External → AimDB)
Stores the parsed URL, configuration, deserializer, and a producer creation callback. The callback captures the type T at creation time, allowing type-safe producer creation later without needing PhantomData or type parameters.
Fields§
§url: ConnectorUrlParsed connector URL
config: Vec<(String, String)>Additional configuration options (protocol-specific)
deserializer: DeserializerFnDeserialization callback that converts bytes to typed values
This is a type-erased function that takes &[u8] and returns
Result<Box<dyn Any + Send>, String>. The spawned task will
downcast to the concrete type before producing.
Available in both std and no_std (with alloc feature) environments.
producer_factory: Option<ProducerFactoryFn>Producer creation callback (alloc feature)
Takes Arc<AimDb
Available in both std and no_std + alloc environments.
Implementations§
Source§impl InboundConnectorLink
impl InboundConnectorLink
Sourcepub fn new(url: ConnectorUrl, deserializer: DeserializerFn) -> Self
pub fn new(url: ConnectorUrl, deserializer: DeserializerFn) -> Self
Creates a new inbound connector link from a URL and deserializer
Sourcepub fn with_producer_factory<F>(self, factory: F) -> Self
pub fn with_producer_factory<F>(self, factory: F) -> Self
Sets the producer factory callback (alloc feature)
Available in both std and no_std + alloc environments.
Sourcepub fn create_producer(
&self,
db_any: Arc<dyn Any + Send + Sync>,
) -> Option<Box<dyn ProducerTrait>>
pub fn create_producer( &self, db_any: Arc<dyn Any + Send + Sync>, ) -> Option<Box<dyn ProducerTrait>>
Creates a producer using the stored factory (alloc feature)
Available in both std and no_std + alloc environments.