Struct unshare::Style [−][src]
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.
Methods
impl Style
[src]
impl Style
pub fn debug() -> Style
[src]
pub fn debug() -> Style
Create a new style object that matches to how fmt::Debug
works for
the command
pub fn short() -> Style
[src]
pub fn short() -> Style
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]
pub fn env(self, enable: bool) -> Style
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]
pub fn path(self, enable: bool) -> Style
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 Clone for Style
fn clone(&self) -> Style
[src]
fn clone(&self) -> Style
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Style
[src]
impl Debug for Style