network: split nat into separate mods

This commit is contained in:
Alex Zenla
2024-02-13 18:01:52 +00:00
parent 521ee93349
commit 21707daa98
11 changed files with 250 additions and 146 deletions

21
network/src/nat/table.rs Normal file
View File

@ -0,0 +1,21 @@
use std::collections::HashMap;
use super::{handler::NatHandler, key::NatKey};
pub struct NatTable {
pub inner: HashMap<NatKey, Box<dyn NatHandler>>,
}
impl Default for NatTable {
fn default() -> Self {
Self::new()
}
}
impl NatTable {
pub fn new() -> Self {
Self {
inner: HashMap::new(),
}
}
}