1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//! Notification channel kinds. /// Delivery channel for a [`crate::Notification`]. #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum Channel { /// SMS (phone number recipient). Sms, /// Mobile push (device token recipient). Push, } impl Channel { /// Stable lowercase name (`sms`, `push`). #[must_use] pub const fn as_str(self) -> &'static str { match self { Self::Sms => "sms", Self::Push => "push", } } }