]>
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 | ||
bbacb35a | 12 | pub fn get() -> Arc<Mutex<Vec<Box<dyn Middleware>>>> { |
8ab8739c RBR |
13 | Arc::new(Mutex::new(vec![ |
14 | Box::new(FindMailboxesCompatibility::new()), | |
15 | ])) | |
16 | } |