[][src]Enum jail::Jail

pub enum Jail {
    Stopped(StoppedJail),
    Running(RunningJail),
}

Represents a running or stopped jail.

Variants

Stopped(StoppedJail)
Running(RunningJail)

Implementations

impl Jail[src]

pub fn is_started(&self) -> bool[src]

Check if a jail is running

pub fn start(self) -> Result<Self, JailError>[src]

Start the Jail

This calls start() on a stopped Jail, and is a no-op for an already running Jail.

pub fn stop(self) -> Result<Self, JailError>[src]

Stop the jail

This calls stop() on a started Jail, and is a no-op for an already stopped Jail.

pub fn name(&self) -> Result<String, JailError>[src]

Get the name of the Jail

pub fn path(&self) -> Result<PathBuf, JailError>[src]

Get the name of the Jail

pub fn hostname(&self) -> Result<String, JailError>[src]

Get the hostname of the Jail

pub fn ips(&self) -> Result<Vec<IpAddr>, JailError>[src]

Get the IP Addresses of a jail

pub fn param(&self, name: &str) -> Result<Value, JailError>[src]

Get a jail parameter

pub fn params(&self) -> Result<HashMap<String, Value>, JailError>[src]

Trait Implementations

impl Clone for Jail[src]

impl Debug for Jail[src]

impl From<RunningJail> for Jail[src]

impl From<StoppedJail> for Jail[src]

impl PartialEq<Jail> for Jail[src]

impl StructuralPartialEq for Jail[src]

Auto Trait Implementations

impl RefUnwindSafe for Jail

impl Send for Jail

impl Sync for Jail

impl Unpin for Jail

impl UnwindSafe for Jail

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.