pub enum EndpointType {
Show 17 variants
Aws(AwsConfig),
Kafka(KafkaConfig),
Nats(NatsConfig),
File(FileConfig),
Static(String),
Memory(MemoryConfig),
Amqp(AmqpConfig),
MongoDb(MongoDbConfig),
Mqtt(MqttConfig),
Http(HttpConfig),
IbmMq(IbmMqConfig),
ZeroMq(ZeroMqConfig),
Fanout(Vec<Endpoint>),
Switch(SwitchConfig),
Response(ResponseConfig),
Custom {
name: String,
config: Value,
},
Null,
}Expand description
An enumeration of all supported endpoint types.
#[serde(rename_all = "lowercase")] ensures that the keys in the config (e.g., “kafka”)
match the enum variants.
§Examples
Configuring a Fanout endpoint in YAML:
use mq_bridge::models::{Endpoint, EndpointType};
let yaml = r#"
fanout:
- memory: { topic: "out1" }
- memory: { topic: "out2" }
"#;
let endpoint: Endpoint = serde_yaml_ng::from_str(yaml).unwrap();
if let EndpointType::Fanout(targets) = endpoint.endpoint_type {
assert_eq!(targets.len(), 2);
}Variants§
Aws(AwsConfig)
Kafka(KafkaConfig)
Nats(NatsConfig)
File(FileConfig)
Static(String)
Memory(MemoryConfig)
Amqp(AmqpConfig)
MongoDb(MongoDbConfig)
Mqtt(MqttConfig)
Http(HttpConfig)
IbmMq(IbmMqConfig)
ZeroMq(ZeroMqConfig)
Fanout(Vec<Endpoint>)
Switch(SwitchConfig)
Response(ResponseConfig)
Custom
Null
Implementations§
Trait Implementations§
Source§impl Clone for EndpointType
impl Clone for EndpointType
Source§fn clone(&self) -> EndpointType
fn clone(&self) -> EndpointType
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 moreSource§impl Debug for EndpointType
impl Debug for EndpointType
Source§impl Default for EndpointType
impl Default for EndpointType
Source§fn default() -> EndpointType
fn default() -> EndpointType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EndpointType
impl<'de> Deserialize<'de> for EndpointType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EndpointType
impl !RefUnwindSafe for EndpointType
impl Send for EndpointType
impl Sync for EndpointType
impl Unpin for EndpointType
impl !UnwindSafe for EndpointType
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