Enum cargo::core::shell::ShellOut

source ·
enum ShellOut {
    Write(Box<dyn Write>),
    Stream {
        stdout: StandardStream,
        stderr: StandardStream,
        stderr_tty: bool,
        color_choice: ColorChoice,
    },
}
Expand description

A Writeable object, either with or without color support

Variants§

§

Write(Box<dyn Write>)

A plain write object without color support

§

Stream

Fields

§stdout: StandardStream
§stderr: StandardStream
§stderr_tty: bool
§color_choice: ColorChoice

Color-enabled stdio, with information on whether color should be used

Implementations§

Prints out a message with a status. The status comes first, and is bold plus the given color. The status can be justified, in which case the max width that will right align is 12 chars.

Write a styled fragment

Write a styled fragment

Gets stdout as a io::Write.

Gets stderr as a io::Write.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 120 bytes

Size for each variant:

  • Write: 16 bytes
  • Stream: 120 bytes