#[non_exhaustive]pub struct UserEvent {
pub kind: u32,
pub int_data: i64,
pub string_data: Option<String>,
}Expand description
Generic user event carried by Observer::on_send_event.
§Construction
Use UserEvent::new to create a value; struct literal syntax is not
available from outside this crate because UserEvent is #[non_exhaustive].
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: u32User-defined event kind.
int_data: i64Numeric payload.
string_data: Option<String>Optional string payload.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserEvent
impl RefUnwindSafe for UserEvent
impl Send for UserEvent
impl Sync for UserEvent
impl Unpin for UserEvent
impl UnsafeUnpin for UserEvent
impl UnwindSafe for UserEvent
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