]>
Commit | Line | Data |
---|---|---|
1 | mod find_mailboxes_compatibility; | |
2 | ||
3 | use find_mailboxes_compatibility::FindMailboxesCompatibility; | |
4 | ||
5 | use std::sync::{Arc, Mutex}; | |
6 | ||
7 | pub trait Middleware: Sync + Send { | |
8 | fn client_message(&mut self, input: &[u8]) -> Vec<u8>; | |
9 | fn server_message(&mut self, input: &[u8]) -> Vec<u8>; | |
10 | } | |
11 | ||
12 | pub fn get() -> Arc<Mutex<Vec<Box<dyn Middleware>>>> { | |
13 | Arc::new(Mutex::new(vec![ | |
14 | Box::new(FindMailboxesCompatibility::new()), | |
15 | ])) | |
16 | } |