pub struct ConnectorLink {
pub url: LinkAddress,
pub config: Vec<(String, String)>,
pub source_factory: SourceFactoryFn,
}Expand description
Configuration for a connector link
Stores the parsed URL, configuration, and the fused source factory until the record is built. The actual client creation and handler spawning happens during the build phase.
Fields§
§url: LinkAddressParsed link address (scheme://resource)
config: Vec<(String, String)>Additional configuration options (protocol-specific)
source_factory: SourceFactoryFnFused source factory (alloc feature)
Takes the live AimDb and returns the SerializedSource whose
readers yield destination + payload directly (subscribe → recv →
resolve topic → serialize, all typed inside). Captures the record
type T at link_to() configuration time — finish() validates the
serializer is present before registering the link, so the factory is
always set.
Available in both std and no_std + alloc environments.
Implementations§
Source§impl ConnectorLink
impl ConnectorLink
Sourcepub fn new(url: LinkAddress, source_factory: SourceFactoryFn) -> Self
pub fn new(url: LinkAddress, source_factory: SourceFactoryFn) -> Self
Creates a new connector link from a link address and source factory
Sourcepub fn create_source(&self, db: &AimDb) -> Box<dyn SerializedSource>
pub fn create_source(&self, db: &AimDb) -> Box<dyn SerializedSource>
Creates the fused serialized source using the stored factory.
Runs once at route-collection time; the readers it hands out are the
per-message path (no Box<dyn Any>).
Available in both std and no_std + alloc environments.
Trait Implementations§
Source§impl Clone for ConnectorLink
impl Clone for ConnectorLink
Source§fn clone(&self) -> ConnectorLink
fn clone(&self) -> ConnectorLink
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more