pub struct NetConfig {
pub bridge: String,
pub subnet: Subnet,
pub allow: Vec<Subnet>,
pub cluster: Vec<Subnet>,
pub ingress: Vec<String>,
pub dns: bool,
pub trust: Vec<Subnet>,
pub host_ports: Vec<u16>,
}Fields§
§bridge: String§subnet: Subnet§allow: Vec<Subnet>§cluster: Vec<Subnet>§ingress: Vec<String>§dns: bool§trust: Vec<Subnet>§host_ports: Vec<u16>Implementations§
Source§impl NetConfig
impl NetConfig
pub fn new(bridge: &str, subnet: &str) -> Result<Self>
pub fn with_host_ports(self, ports: &[u16]) -> Self
pub fn with_trust(self, cidrs: &[String]) -> Result<Self>
pub fn with_cluster( self, cidr: &str, ingress: &[String], dns: bool, ) -> Result<Self>
pub fn dns_ip(&self) -> Option<Ipv4Addr>
pub fn with_allow(self, cidrs: &[String]) -> Result<Self>
pub fn table(&self) -> String
pub fn may_reach(&self, ip: Ipv4Addr) -> bool
Trait Implementations§
impl StructuralPartialEq for NetConfig
Auto Trait Implementations§
impl Forget for NetConfig
impl Freeze for NetConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Subnet>: Freeze,
PhantomData<String>: Freeze,
PhantomData<u16>: Freeze,
impl Move for NetConfig
impl RefUnwindSafe for NetConfig
impl Send for NetConfigwhere
RawVecInner: Send,
impl Sync for NetConfigwhere
RawVecInner: Sync,
impl Unpin for NetConfig
impl UnsafeUnpin for NetConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Subnet>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u16>: UnsafeUnpin,
impl UnwindSafe for NetConfigwhere
RawVecInner: UnwindSafe,
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