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::usage::mount_line;pub use crate::usage::spec;pub use crate::usage::spec_bin;pub use crate::usage::take;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 stror&'static [u8]. - printdoc
- Unindent and call
print!. - writedoc
- Unindent and call
write!.
Structs§
- Exit
Code - 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
Argsimpl. - Parser
- Generates the
Parserimplementation. - Subcommand
- Generates the
Subcommandimpl.