Private
Public Access
1
0
Files
Kordophone/kordophoned/src/daemon/events.rs

18 lines
430 B
Rust

use tokio::sync::oneshot;
use kordophone_db::models::Conversation;
pub type Reply<T: Send> = oneshot::Sender<T>;
pub enum Event {
/// Get the version of the daemon.
GetVersion(Reply<String>),
/// Asynchronous event for syncing all conversations with the server.
SyncAllConversations(Reply<()>),
/// Returns all known conversations from the database.
GetAllConversations(Reply<Vec<Conversation>>),
}