🎨 Isolate infra and ui components

The src/base.rs is still to be reworked.
This commit is contained in:
2024-04-04 14:27:58 +02:00
parent 92bf860101
commit 0ce0764204
67 changed files with 64 additions and 59 deletions

View File

@@ -0,0 +1,34 @@
use std::fmt::{Debug, Formatter};
use crate::utils::Sender;
#[derive(Debug)]
pub enum LoginStyle {
// SessionRestore(Session),
Password(String, String),
}
pub enum WorkerTask {
// Init(AsyncProgramStore, ClientReply<()>),
// Init(ClientReply<()>),
Init(Sender<()>),
//Login(LoginStyle, ClientReply<EditInfo>),
Login(LoginStyle, Sender<anyhow::Result<()>>),
}
impl Debug for WorkerTask {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
match self {
WorkerTask::Init(_) => f
.debug_tuple("WorkerTask::Init")
.field(&format_args!("_"))
// .field(&format_args!("_"))
.finish(),
WorkerTask::Login(style, _) => f
.debug_tuple("WorkerTask::Login")
.field(style)
// .field(&format_args!("_"))
.finish(),
}
}
}