Moved cache and messages. Added docs.
This commit is contained in:
22
src/messages.rs
Normal file
22
src/messages.rs
Normal file
@ -0,0 +1,22 @@
|
||||
/// These are the nessages that are used by the database.
|
||||
use std::sync::mpsc::Sender;
|
||||
use uuid::Uuid;
|
||||
|
||||
/// Requests of the database.
|
||||
pub enum SendMsg {
|
||||
OpenSession(SessionRequest),
|
||||
}
|
||||
|
||||
/// Responses to database requests
|
||||
pub enum ReceiveMsg {
|
||||
Session(Uuid),
|
||||
}
|
||||
|
||||
|
||||
/// Items needed for a session request.
|
||||
pub struct SessionRequest {
|
||||
/// Optional string reprosentation of the session id.
|
||||
pub id: Option<String>,
|
||||
/// Channel Sender for the reply.
|
||||
pub tx: Sender<ReceiveMsg>,
|
||||
}
|
Reference in New Issue
Block a user