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