#[repr(i32)]pub enum NotificationChannel {
Unspecified = 0,
InApp = 1,
Email = 2,
WebPush = 3,
}Expand description
Delivery channel for a notification. IN_APP is the always-available channel; EMAIL and WEB_PUSH require the recipient to have registered a destination.
Variants§
Implementations§
Source§impl NotificationChannel
impl NotificationChannel
Sourcepub const fn is_valid(value: i32) -> bool
pub const fn is_valid(value: i32) -> bool
Returns true if value is a variant of NotificationChannel.
Sourcepub fn from_i32(value: i32) -> Option<NotificationChannel>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<NotificationChannel>
Use the TryFrom<i32> implementation instead
Converts an i32 to a NotificationChannel, or None if value is not a valid variant.
Source§impl NotificationChannel
impl NotificationChannel
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for NotificationChannel
impl Clone for NotificationChannel
Source§fn clone(&self) -> NotificationChannel
fn clone(&self) -> NotificationChannel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NotificationChannel
Source§impl Debug for NotificationChannel
impl Debug for NotificationChannel
Source§impl Default for NotificationChannel
impl Default for NotificationChannel
Source§fn default() -> NotificationChannel
fn default() -> NotificationChannel
Returns the “default value” for a type. Read more
impl Eq for NotificationChannel
Source§impl From<NotificationChannel> for i32
impl From<NotificationChannel> for i32
Source§fn from(value: NotificationChannel) -> i32
fn from(value: NotificationChannel) -> i32
Converts to this type from the input type.
Source§impl Hash for NotificationChannel
impl Hash for NotificationChannel
Source§impl Ord for NotificationChannel
impl Ord for NotificationChannel
Source§fn cmp(&self, other: &NotificationChannel) -> Ordering
fn cmp(&self, other: &NotificationChannel) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for NotificationChannel
impl PartialEq for NotificationChannel
Source§impl PartialOrd for NotificationChannel
impl PartialOrd for NotificationChannel
impl StructuralPartialEq for NotificationChannel
Source§impl TryFrom<i32> for NotificationChannel
impl TryFrom<i32> for NotificationChannel
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<NotificationChannel, UnknownEnumValue>
fn try_from(value: i32) -> Result<NotificationChannel, UnknownEnumValue>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for NotificationChannel
impl RefUnwindSafe for NotificationChannel
impl Send for NotificationChannel
impl Sync for NotificationChannel
impl Unpin for NotificationChannel
impl UnsafeUnpin for NotificationChannel
impl UnwindSafe for NotificationChannel
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