(config: DynPortsConfig)
| 52 | |
| 53 | impl<V> DynPorts<V> { |
| 54 | pub fn new(config: DynPortsConfig) -> DynPorts<V> { |
| 55 | DynPorts { |
| 56 | local_key: config.local_key, |
| 57 | target: config.target, |
| 58 | cap: config.cap, |
| 59 | brokers: config |
| 60 | .brokers |
| 61 | .into_iter() |
| 62 | .map(|x| (x.topic().to_owned(), x)) |
| 63 | .collect(), |
| 64 | cache: HashMap::new(), |
| 65 | args: config.args, |
| 66 | _v_holder: Default::default(), |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | pub async fn create( |
| 71 | &mut self, |