Env

Trait Env 

Source
pub trait Env {
    // Required method
    fn persist_dir(&self) -> PathBuf;

    // Provided methods
    fn contains<P: AsRef<Path>>(&self, p: P) -> bool { ... }
    fn init(&self) -> Result<()> { ... }
}
Expand description

Defines a NetNs environment behavior.

Required Methods§

Source

fn persist_dir(&self) -> PathBuf

The persist directory of the NetNs environment.

Provided Methods§

Source

fn contains<P: AsRef<Path>>(&self, p: P) -> bool

Returns true if the given path is in this Env.

Source

fn init(&self) -> Result<()>

Initialize the environment.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§