Moved cache and messages. Added docs.

This commit is contained in:
2024-05-12 14:10:36 -04:00
parent 3955048157
commit bb1cdfa890
5 changed files with 236 additions and 231 deletions

22
src/messages.rs Normal file
View 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>,
}