pub struct NetworkNamespace();

Implementations§

Add a new network namespace. This is equivalent to ip netns add NS_NAME.

Remove a network namespace This is equivalent to ip netns del NS_NAME.

This is the parent process form the fork, it waits for the child to exit properly

This is the child process, it will actually create the namespace resources. It creates the folder and namespace file. Returns the namespace file path

This function unshare the calling process and move into the given network namespace

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.