pub enum ConnectorClient {
Mqtt(Arc<dyn Any + Send + Sync>),
Kafka(Arc<dyn Any + Send + Sync>),
Http(Arc<dyn Any + Send + Sync>),
Generic {
protocol: String,
client: Arc<dyn Any + Send + Sync>,
},
}Expand description
Connector client types (type-erased for storage)
This enum allows storing different connector client types in a unified way. Actual protocol implementations will downcast to their concrete types.
§Design Note
This is intentionally minimal - actual client types are defined by user extensions. The core only provides the infrastructure.
Works in both std and no_std (with alloc) environments.
Variants§
Mqtt(Arc<dyn Any + Send + Sync>)
MQTT client (protocol-specific, user-provided)
Kafka(Arc<dyn Any + Send + Sync>)
Kafka producer (protocol-specific, user-provided)
Http(Arc<dyn Any + Send + Sync>)
HTTP client (protocol-specific, user-provided)
Generic
Generic connector for custom protocols
Implementations§
Trait Implementations§
Source§impl Clone for ConnectorClient
impl Clone for ConnectorClient
Source§fn clone(&self) -> ConnectorClient
fn clone(&self) -> ConnectorClient
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 ConnectorClient
impl !RefUnwindSafe for ConnectorClient
impl Send for ConnectorClient
impl Sync for ConnectorClient
impl Unpin for ConnectorClient
impl !UnwindSafe for ConnectorClient
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