Adm

Struct Adm 

Source
pub struct Adm { /* private fields */ }
Expand description

Entry point for zoneadm commands.

Implementations§

Source§

impl Adm

Source

pub fn new(name: impl AsRef<str>) -> Self

Instantiate a new zone administration command.

Source

pub fn boot_command(&mut self) -> Command

Source

pub fn parse_boot_output(output: &Output) -> Result<String, ZoneError>

Source

pub fn boot_blocking(&mut self) -> Result<String, ZoneError>

Boots (or activates) the zone.

Source

pub fn clone_command(&mut self, source: impl AsRef<OsStr>) -> Command

Source

pub fn parse_clone_output(output: &Output) -> Result<String, ZoneError>

Source

pub fn clone_blocking( &mut self, source: impl AsRef<OsStr>, ) -> Result<String, ZoneError>

Installs a zone by copying an existing installed zone.

Source

pub fn halt_command(&mut self) -> Command

Source

pub fn parse_halt_output(output: &Output) -> Result<String, ZoneError>

Source

pub fn halt_blocking(&mut self) -> Result<String, ZoneError>

Halts the specified zone.

Source

pub fn mount_command(&mut self) -> Command

Source

pub fn parse_mount_output(output: &Output) -> Result<String, ZoneError>

Source

pub fn mount_blocking(&mut self) -> Result<String, ZoneError>

Source

pub fn unmount_command(&mut self) -> Command

Source

pub fn parse_unmount_output(output: &Output) -> Result<String, ZoneError>

Source

pub fn unmount_blocking(&mut self) -> Result<String, ZoneError>

Source

pub fn install_command(&mut self, brand_specific_options: &[&OsStr]) -> Command

Source

pub fn parse_install_output(output: &Output) -> Result<String, ZoneError>

Source

pub fn install_blocking( &mut self, brand_specific_options: &[&OsStr], ) -> Result<String, ZoneError>

Install the specified zone on the system.

Source

pub fn uninstall_command(&mut self, force: bool) -> Command

Source

pub fn parse_uninstall_output(output: &Output) -> Result<String, ZoneError>

Source

pub fn uninstall_blocking(&mut self, force: bool) -> Result<String, ZoneError>

Uninstalls the zone from the system.

Source

pub fn list_command() -> Command

Source

pub fn parse_list_output(output: &Output) -> Result<Vec<Zone>, ZoneError>

Source

pub fn list_blocking() -> Result<Vec<Zone>, ZoneError>

List all zones.

Auto Trait Implementations§

§

impl Freeze for Adm

§

impl RefUnwindSafe for Adm

§

impl Send for Adm

§

impl Sync for Adm

§

impl Unpin for Adm

§

impl UnwindSafe for Adm

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.