pub struct UserspaceNetwork { /* private fields */ }Expand description
Userspace NAT manager backed by slirp4netns.
Implementations§
Source§impl UserspaceNetwork
impl UserspaceNetwork
pub fn setup_with_id( pid: u32, config: &BridgeConfig, container_id: &str, rootless: bool, ) -> Result<Self>
pub fn apply_egress_policy( &self, pid: u32, policy: &EgressPolicy, rootless: bool, ) -> Result<()>
pub fn cleanup(self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserspaceNetwork
impl RefUnwindSafe for UserspaceNetwork
impl Send for UserspaceNetwork
impl Sync for UserspaceNetwork
impl Unpin for UserspaceNetwork
impl UnsafeUnpin for UserspaceNetwork
impl UnwindSafe for UserspaceNetwork
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