Struct smf::Adm[][src]

pub struct Adm { /* fields omitted */ }

Provides tools for changing the state of SMF services.

Acts as a wrapper around the underlying ‘svcadm’ command.

Implementations

impl Adm[src]

pub fn new() -> Adm[src]

Construct a new builder object.

pub fn zone<S: AsRef<str>>(&mut self, zone: S) -> &mut Adm[src]

Requests a command be issued within a specific zone.

pub fn enable(&self) -> AdmEnable<'_>[src]

Builds a AdmEnable object.

use smf::{Adm, AdmSelection};

Adm::new()
    .enable()
    .synchronous()
    .run(AdmSelection::ByPattern(&["service"]))
    .unwrap();

pub fn disable(&self) -> AdmDisable<'_>[src]

Builds a AdmDisable object.

use smf::{Adm, AdmSelection};

Adm::new()
    .disable()
    .synchronous()
    .run(AdmSelection::ByPattern(&["service"]))
    .unwrap();

pub fn restart(&self) -> AdmRestart<'_>[src]

Builds a AdmRestart object.

use smf::{Adm, AdmSelection};

Adm::new()
    .restart()
    .abort()
    .run(AdmSelection::ByPattern(&["service"]))
    .unwrap();

pub fn refresh(&self) -> AdmRefresh<'_>[src]

Builds a AdmRefresh object.

use smf::{Adm, AdmSelection};

Adm::new()
    .refresh()
    .run(AdmSelection::ByPattern(&["service"]))
    .unwrap();

pub fn clear(&self) -> AdmClear<'_>[src]

Builds a AdmClear object.

use smf::{Adm, AdmSelection};

Adm::new()
    .clear()
    .run(AdmSelection::ByPattern(&["service"]))
    .unwrap();

Trait Implementations

impl Default for Adm[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

impl RefUnwindSafe for Adm

impl Send for Adm

impl Sync for Adm

impl Unpin for Adm

impl UnwindSafe for Adm

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.