Skip to main content

ctl_core/
prelude.rs

1//! Import once in a *ctl `main.rs`.
2//!
3//! ```ignore
4//! use ctl_core::prelude::*;
5//!
6//! fn main() -> ExitCode {
7//!     go::<Cli, _>("toy", |cli| {
8//!         let view = cli.format.view(cli.color.color());
9//!         view.show(&report)
10//!     })
11//! }
12//! ```
13
14pub use std::process::ExitCode;
15
16#[cfg(feature = "cli")]
17pub use clap::{Args, Parser, Subcommand};
18pub use indoc::{concatdoc, eprintdoc, formatdoc, indoc, printdoc, writedoc};
19
20#[cfg(feature = "app")]
21pub use crate::app::App;
22pub use crate::color::ColorMode;
23#[cfg(feature = "document")]
24pub use crate::document::{
25    Document, Fields, Notice, NoticeLevel, Role, Rule, Section, Table, Text,
26};
27#[cfg(feature = "cli")]
28pub use crate::flags::{
29    ColorLong, DryRunArgs, FormatArgs, OutputArgs, chassis_warnings, emit_warnings, warn_opposites,
30};
31pub use crate::format::OutputFormat;
32pub use crate::model::{Envelope, ErrorBody, SCHEMA_VERSION};
33#[cfg(feature = "cli")]
34pub use crate::parser::verify;
35#[cfg(feature = "render")]
36pub use crate::render::{RenderOptions, Renderer};
37#[cfg(feature = "help")]
38pub use crate::run::main_with_help;
39#[cfg(feature = "render")]
40pub use crate::table::{grid, kv};
41#[cfg(feature = "usage")]
42pub use crate::usage::{mount_line, spec, spec_bin, take};
43#[cfg(feature = "view")]
44pub use crate::view::{Captured, MessageKind, Present, Stream, View};