pub struct InterfaceConfig {
pub local_subnets: Vec<IpRange>,
pub named: Vec<(IpRange, String)>,
}Expand description
Runtime configuration of the interface classifier.
Built by the user at participant start and passed to the
PolicyEngine. Empty configuration → every non-
loopback address lands in NetInterface::Wan.
The named list allows patterns like “all addresses in the tun0 subnet
should become NetInterface::Named("vpn".into())”. The list
is processed in order — first match wins.
Fields§
§local_subnets: Vec<IpRange>Private subnets classified as NetInterface::LocalSubnet.
named: Vec<(IpRange, String)>Named-interface mappings: (range, name) — first match
yields NetInterface::Named.
Trait Implementations§
Source§impl Clone for InterfaceConfig
impl Clone for InterfaceConfig
Source§fn clone(&self) -> InterfaceConfig
fn clone(&self) -> InterfaceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InterfaceConfig
impl Debug for InterfaceConfig
Source§impl Default for InterfaceConfig
impl Default for InterfaceConfig
Source§fn default() -> InterfaceConfig
fn default() -> InterfaceConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InterfaceConfig
impl RefUnwindSafe for InterfaceConfig
impl Send for InterfaceConfig
impl Sync for InterfaceConfig
impl Unpin for InterfaceConfig
impl UnsafeUnpin for InterfaceConfig
impl UnwindSafe for InterfaceConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more