Skip to main content

lapin/
exchange.rs

1#[derive(Clone, Debug, Default, PartialEq, Eq)]
2pub enum ExchangeKind {
3    Custom(String),
4    #[default]
5    Direct,
6    Fanout,
7    Headers,
8    Topic,
9}
10
11impl ExchangeKind {
12    pub(crate) fn kind(&self) -> &str {
13        match self {
14            Self::Custom(c) => c.as_str(),
15            Self::Direct => "direct",
16            Self::Fanout => "fanout",
17            Self::Headers => "headers",
18            Self::Topic => "topic",
19        }
20    }
21}