[][src]Struct unshare::Style

pub struct Style { /* fields omitted */ }

This is a builder for various settings of how command may be printed

Use format!("{}", cmd.display(style)) to actually print a command.

Implementations

impl Style[src]

pub fn debug() -> Style[src]

Create a new style object that matches to how fmt::Debug works for the command

pub fn short() -> Style[src]

Create a simple clean user-friendly display of the command

Note: this kind of pretty-printing omit many important parts of command and may be ambiguous.

pub fn env(self, enable: bool) -> Style[src]

Toggle printing of environment

When false is passed we only show environ[12], i.e. a number of environment variables. Default is true for Style::debug constructor.

This method does nothing when using Style::short construtor

pub fn path(self, enable: bool) -> Style[src]

Toggle printing of full path to the executable

By default we don't print full executable path in Style::short mode.

Note: if this flag is disabled (default) we only show a name from arg0, instead of executable path. When flag is enabled, the arg0 is shown alongside with executable path in parethesis if the values differ.

This method does nothing when using Style::debug constructor

Trait Implementations

impl Clone for Style[src]

impl Debug for Style[src]

Auto Trait Implementations

impl RefUnwindSafe for Style

impl Send for Style

impl Sync for Style

impl Unpin for Style

impl UnwindSafe for Style

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.