32 lines
481 B
Rust
32 lines
481 B
Rust
use tokio::sync::oneshot;
|
|
use eyre::Result;
|
|
|
|
pub enum InternalEvent {
|
|
Test,
|
|
Shutdown,
|
|
}
|
|
|
|
pub enum EventKind {
|
|
Message,
|
|
Internal(InternalEvent),
|
|
}
|
|
|
|
|
|
pub struct Event {
|
|
pub kind: EventKind,
|
|
pub result_sender: oneshot::Sender<EventResponse>,
|
|
pub sender_name: String,
|
|
}
|
|
|
|
pub struct EventRaw {
|
|
pub kind: EventKind,
|
|
pub sender_name: String,
|
|
}
|
|
|
|
pub enum EventResponse {
|
|
Success,
|
|
SuccessQuery(String),
|
|
//use Error type
|
|
Failed(String),
|
|
}
|