]>
Commit | Line | Data |
---|---|---|
573aaf2a RBR |
1 | mod find_mailboxes_compatibility; |
2 | ||
8ab8739c | 3 | use find_mailboxes_compatibility::FindMailboxesCompatibility; |
573aaf2a | 4 | |
8ab8739c | 5 | use std::sync::{Arc, Mutex}; |
573aaf2a | 6 | |
8ab8739c RBR |
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_middleware() -> Arc<Mutex<Vec<Box<dyn Middleware>>>> { | |
13 | Arc::new(Mutex::new(vec![ | |
14 | Box::new(FindMailboxesCompatibility::new()), | |
15 | ])) | |
16 | } |