mirror of https://github.com/Trivernis/bromine.git
parent
4f573f55c1
commit
e088680f68
@ -0,0 +1,13 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub static ERROR_EVENT_NAME: &str = "error";
|
||||
|
||||
/// Data returned on error event.
|
||||
/// The error event has a default handler that just logs that
|
||||
/// an error occurred. For a custom handler, register a handler on
|
||||
/// the [ERROR_EVENT_NAME] event.
|
||||
#[derive(Clone, Deserialize, Serialize, Debug)]
|
||||
pub struct ErrorEventData {
|
||||
pub code: u16,
|
||||
pub message: String,
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
pub mod error_event;
|
||||
pub mod event;
|
||||
pub mod event_handler;
|
||||
|
Loading…
Reference in New Issue