pub struct ConnectorLink {
pub url: ConnectorUrl,
pub config: Vec<(String, String)>,
pub serializer: Option<SerializerFn>,
}Expand description
Configuration for a connector link
Stores the parsed URL and configuration until the record is built. The actual client creation and handler spawning happens during the build phase.
Fields§
§url: ConnectorUrlParsed connector URL
config: Vec<(String, String)>Additional configuration options (protocol-specific)
serializer: Option<SerializerFn>Serialization callback that converts record values to bytes for publishing
This is a type-erased function that takes &dyn Any and returns Result<Vec<u8>, String>.
The connector implementation will downcast to the concrete type and call the serializer.
If None, the connector must provide a default serialization mechanism or fail.
Available in both std and no_std (with alloc feature) environments.
Implementations§
Source§impl ConnectorLink
impl ConnectorLink
Sourcepub fn new(url: ConnectorUrl) -> Self
pub fn new(url: ConnectorUrl) -> Self
Creates a new connector link from a URL
Trait Implementations§
Source§impl Clone for ConnectorLink
impl Clone for ConnectorLink
Source§fn clone(&self) -> ConnectorLink
fn clone(&self) -> ConnectorLink
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConnectorLink
impl !RefUnwindSafe for ConnectorLink
impl Send for ConnectorLink
impl Sync for ConnectorLink
impl Unpin for ConnectorLink
impl !UnwindSafe for ConnectorLink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more