#[non_exhaustive]pub enum HaNotificationType {
PreEvent,
PostEvent,
}Expand description
Whether the notification fires before (pre) or after (post) the event.
Mirrors enum ha_notification_type in mysql-server/sql/handler.h. The
pre-event variant is the engine’s chance to veto by returning an error from
the notification trait method; post-event is informational.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PreEvent
HA_NOTIFY_PRE_EVENT: the engine is asked before the event happens.
PostEvent
HA_NOTIFY_POST_EVENT: the event already occurred.
Implementations§
Source§impl HaNotificationType
impl HaNotificationType
Sourcepub const fn from_raw(value: i32) -> Self
pub const fn from_raw(value: i32) -> Self
Decode the C enum ha_notification_type value. Unknown values fall back
to HaNotificationType::PostEvent so the engine still observes a
defined variant.
Trait Implementations§
Source§impl Clone for HaNotificationType
impl Clone for HaNotificationType
Source§fn clone(&self) -> HaNotificationType
fn clone(&self) -> HaNotificationType
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 HaNotificationType
Source§impl Debug for HaNotificationType
impl Debug for HaNotificationType
impl Eq for HaNotificationType
Source§impl PartialEq for HaNotificationType
impl PartialEq for HaNotificationType
Source§fn eq(&self, other: &HaNotificationType) -> bool
fn eq(&self, other: &HaNotificationType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HaNotificationType
Auto Trait Implementations§
impl Freeze for HaNotificationType
impl RefUnwindSafe for HaNotificationType
impl Send for HaNotificationType
impl Sync for HaNotificationType
impl Unpin for HaNotificationType
impl UnsafeUnpin for HaNotificationType
impl UnwindSafe for HaNotificationType
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