Skip to main content

Module prelude

Module prelude 

Source
Expand description

One-import surface for a *ctl binary (use ctl_core::prelude::*). Import once in a *ctl main.rs.

use ctl_core::prelude::*;

fn main() -> ExitCode {
    go::<Cli, _>("toy", |cli| {
        let view = cli.format.view(cli.color.color());
        view.show(&report)
    })
}

Re-exports§

pub use crate::color::ColorMode;
pub use crate::flags::ColorLong;
pub use crate::flags::DryRunArgs;
pub use crate::flags::FormatArgs;
pub use crate::flags::OutputArgs;
pub use crate::flags::chassis_warnings;
pub use crate::flags::emit_warnings;
pub use crate::flags::warn_opposites;
pub use crate::format::OutputFormat;
pub use crate::model::Envelope;
pub use crate::model::ErrorBody;
pub use crate::model::SCHEMA_VERSION;
pub use crate::parser::verify;
pub use crate::run::go;
pub use crate::run::main_with_help;
pub use crate::table::grid;
pub use crate::table::kv;
pub use crate::view::Pretty;
pub use crate::view::Render;
pub use crate::view::View;
pub use crate::view::render_template;

Macros§

concatdoc
Unindent and call concat!.
eprintdoc
Unindent and call eprint!.
formatdoc
Unindent and call format!.
indoc
Unindent and produce &'static str or &'static [u8].
printdoc
Unindent and call print!.
writedoc
Unindent and call write!.

Structs§

ExitCode
This type represents the status code the current process can return to its parent under normal termination.

Traits§

Args
Parse a set of arguments into a user-defined container.
Parser
Parse command-line arguments into Self.
Subcommand
Parse a sub-command into a user-defined enum.

Derive Macros§

Args
Generates the Args impl.
Parser
Generates the Parser implementation.
Subcommand
Generates the Subcommand impl.