[−][src]Struct unshare::Style
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,