🎨 Isolate infra and ui components
The src/base.rs is still to be reworked.
This commit is contained in:
34
src/infrastructure/messaging/matrix/worker_tasks.rs
Normal file
34
src/infrastructure/messaging/matrix/worker_tasks.rs
Normal 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(),
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user