2025-03-27 07:18:19 -04:00
|
|
|
mod client;
|
2025-03-26 17:42:34 -04:00
|
|
|
mod field;
|
2025-03-29 09:22:53 -04:00
|
|
|
mod queue;
|
2025-04-05 09:50:54 -04:00
|
|
|
mod session;
|
2025-04-02 14:26:09 -04:00
|
|
|
mod utils;
|
2024-05-05 23:18:42 -04:00
|
|
|
|
2025-04-02 14:26:09 -04:00
|
|
|
use client::{Client, ClientLink, Reply, Request};
|
2025-03-26 17:42:34 -04:00
|
|
|
use field::Field;
|
2025-04-03 21:48:16 -04:00
|
|
|
use queue::Queue;
|
2025-02-10 08:05:59 -05:00
|
|
|
|
2025-02-22 10:53:05 -05:00
|
|
|
#[derive(Clone)]
|
2025-03-27 07:18:19 -04:00
|
|
|
pub struct MoreThanText {
|
2025-04-02 14:26:09 -04:00
|
|
|
client_link: ClientLink,
|
2025-03-27 07:18:19 -04:00
|
|
|
}
|
2025-02-22 10:53:05 -05:00
|
|
|
|
2025-03-26 17:42:34 -04:00
|
|
|
impl MoreThanText {
|
|
|
|
pub fn new() -> Self {
|
2025-04-03 21:48:16 -04:00
|
|
|
let queue = Queue::new();
|
2025-03-30 11:38:41 -04:00
|
|
|
Self {
|
2025-04-03 21:48:16 -04:00
|
|
|
client_link: Client::start(queue.clone()),
|
2025-03-30 11:38:41 -04:00
|
|
|
}
|
2025-02-11 11:33:54 -05:00
|
|
|
}
|
|
|
|
|
2025-04-02 14:26:09 -04:00
|
|
|
pub fn request<F>(&mut self, _session: Option<F>) -> Reply
|
2025-02-11 11:33:54 -05:00
|
|
|
where
|
|
|
|
F: Into<Field>,
|
|
|
|
{
|
2025-04-02 14:26:09 -04:00
|
|
|
let req = Request::new();
|
2025-04-02 22:10:16 -04:00
|
|
|
let rx = self.client_link.send(req);
|
|
|
|
rx.recv().unwrap()
|
2024-11-06 21:28:44 -05:00
|
|
|
}
|
2024-05-05 23:18:42 -04:00
|
|
|
}
|