pub enum Command {
Show 70 variants
AddUser {
username: String,
password_stdin: bool,
},
WaitShutdown {
pid: u32,
},
WaitRestart {
pid: u32,
port: u16,
},
WaitUpgrade {
pid: u32,
temp_path: PathBuf,
target_path: PathBuf,
port: u16,
},
Base2Base {
args: Vec<String>,
base_args: BaseArgs,
},
Hex2Dec {
string_input: StringInput,
base_args: BaseArgs,
},
Dec2Hex {
string_input: StringInput,
base_args: BaseArgs,
},
Hexfmt {
string_input: StringInput,
base_args: BaseArgs,
},
Hex2Bin(Hex2BinArgs),
Bin2Hex(Bin2HexArgs),
Hexdump(HexDumpArgs),
Xxd(XxdArgs),
ShortDc(ShortDcArgs),
Gid(GidArgs),
ExplainCtbnodes(ExplainCtbnodesArgs),
RangeGen(RangeGenArgs),
CharacterDescription(CharacterDescriptionArgs),
Convert(ConvertArgs),
GdbInstructionsGenerate {},
X86InstructionSets {
path: PathBuf,
},
IA {
command: IACommand,
},
Pan2Csv {
patterns: bool,
keep_multiline: bool,
header: bool,
no_header: bool,
delimiter: String,
encoding: String,
crlf: bool,
replicate_double_encoding: bool,
run_startup_procedure: bool,
pan_file: PathBuf,
},
StagelBootstrapParse {
input_file: PathBuf,
},
StagelBootstrapConvert {
cache_dir: Option<PathBuf>,
no_debug: bool,
no_runtime_type_checks: bool,
input_file: PathBuf,
target_lang: String,
},
Pan2ParseJson {
pan_file: PathBuf,
},
Pan2Macro {
encoding: String,
pan_file: PathBuf,
macro_name: String,
},
Pan2Procedures {
output_dir: Option<PathBuf>,
extension: Option<String>,
encoding: String,
pan_file: PathBuf,
},
PanMacro2Ast {
input_encoding: String,
output_encoding: String,
input_file: PathBuf,
macro_name: Option<String>,
},
Pdf2Txt {
pdf_file: PathBuf,
},
Pdf2Json {
pdf_file: PathBuf,
},
Pdf2Md {
pdf_file: PathBuf,
},
File2MetadataJson {
body: bool,
no_streams: bool,
file: PathBuf,
},
MetadataJson2File {
overwrite: bool,
copy_specials_as_specials: bool,
best_effort_metadata: bool,
metadata_file: PathBuf,
path: PathBuf,
},
Warcat {
args: Vec<String>,
},
CtbAssetBundleExtract {
bundle_path: PathBuf,
output_dir: Option<PathBuf>,
},
JsLint {
cli: JsLintCli,
},
TsCheck {
args: TsCheckArgs,
},
JsTest {
args: JsTestArgs,
},
Python(PythonArgs),
ValidateDockerImage {
file: Option<PathBuf>,
strict: bool,
},
Csc(CscArgs),
Archive(ArchiveArgs),
Cp(CscArgs),
Mv(MvArgs),
CscVerify(CscVerifyArgs),
CscDiff(CscDiffArgs),
Fsindex(FsindexArgs),
Fsearch(FsearchArgs),
Csum {
algo: HashAlgorithm,
file: PathBuf,
prefix_0x: bool,
},
Compress(CliCompressArgs),
Decompress {
format: Option<String>,
file: PathBuf,
output: Option<PathBuf>,
force: bool,
},
File(FileDetectionArgs),
Wfparser {
file: PathBuf,
},
Wfscan {
file: PathBuf,
},
DceutilsPhpToCsv {
php_file: PathBuf,
},
Help,
ShowNode {
id: i128,
},
DevSign {
input_dir: Option<PathBuf>,
output_dir: Option<PathBuf>,
platform: Option<String>,
},
DevGzSha256 {
path: PathBuf,
},
DevKeyCreate {
write: bool,
},
DevReleaseCheck {
manifest: Option<PathBuf>,
chunks_dir: Option<PathBuf>,
platform: Vec<String>,
},
DevReleaseExpire {
older_than: u32,
releases_dir: Option<PathBuf>,
},
Install {
no_gui: bool,
unattended: bool,
},
MakeOfflineInstaller {
output: PathBuf,
platform: Option<String>,
version: Option<String>,
server_url: Option<String>,
},
Update {
unattended: bool,
server_url: Option<String>,
},
Uninstall {
no_gui: bool,
unattended: bool,
},
UpgradeCanary {
backup_path: PathBuf,
target_path: PathBuf,
port: Option<u16>,
},
Jq {
raw_output: bool,
query: String,
file: Option<PathBuf>,
},
JsonEscape {
value: Option<String>,
},
Run(RunArgs),
}Variants§
AddUser
Register a new non-administrator local user
Fields
WaitShutdown
Wait for the provided PID to shutdown, then clean up
WaitRestart
Wait for the provided PID to shutdown, then start ctoolbox with the given port
WaitUpgrade
Wait for the provided PID to shutdown, then upgrade the ctoolbox instance in place, then restart it. (Will need to copy the executable before upgrading it probably because Windows locks running executables.)
Fields
Base2Base
Convert delimited numbers between positional radix numeral systems
(bases 1..=36, or up to 64 with --output-alphabet base64_standard).
NOTE: This performs mathematical place-value conversion on numbers,
not raw binary data armoring. For file or byte stream encoding, see
bin2hex and hex2bin. See also hexdump.
NOTE: This command expects arguments and does not read standard input.
Hex2Dec
Convert from hexadecimal to decimal.
NOTE: Continuous hex strings (e.g. “deadbeef”) are parsed as a single
large scalar integer (3735928559). Pass --bytes to chunk into byte
values (222 173 190 239).
NOTE: This command expects arguments and does not read standard input.
Dec2Hex
Convert from decimal to hexadecimal.
NOTE: This command expects arguments and does not read standard input.
Hexfmt
Reformat hexadecimal number strings (delimiters, prefixes, case, padding).
NOTE: This formats lists of hexadecimal numbers (not hexdump outputs with
line offsets or ASCII sidebars). For generating or formatting actual
hexdumps, see hexdump (or hd / xxd).
NOTE: Continuous hex strings (e.g. “1a2b3c4d”) are treated as a single
number unless --bytes or --limit is passed.
NOTE: This command expects arguments and does not read standard input.
Hex2Bin(Hex2BinArgs)
Convert a hexadecimal string to binary data
Bin2Hex(Bin2HexArgs)
Convert binary data to a hexadecimal string or hex dump
Hexdump(HexDumpArgs)
Format binary data as a hex dump (fancy by default, or –plain / –xxd)
Xxd(XxdArgs)
Format binary data as an xxd hex dump
ShortDc(ShortDcArgs)
Convert Document Character (Dc) shorthand to Global Graph ID or show metadata
Gid(GidArgs)
Convert Global Graph ID to short representation or show full metadata
ExplainCtbnodes(ExplainCtbnodesArgs)
Render a .ctbnodes ledger file with synthesized human-readable explanation comments
RangeGen(RangeGenArgs)
Generate a range of numbers in various bases
CharacterDescription(CharacterDescriptionArgs)
Describe Unicode characters, Dcs, and Graph IDs with annotations, aliases, and meanings. This feature may be changed or simplified in future.
Convert(ConvertArgs)
Convert documents or text between supported formats
GdbInstructionsGenerate
Generate GDB instructions from symbols
X86InstructionSets
Analyze an x86/x64 object or archive file and list CPU instruction set features
IA
Internet Archive utilities.
Pan2Csv
Convert a .pan file to CSV format (writes to stdout)
Fields
patterns: boolFormat data using Panorama output patterns (also strips subsequent lines of text fields by default)
keep_multiline: boolWhen formatting with patterns, keep full multiline text strings instead of truncating at first newline
StagelBootstrapParse
Parse a StageL file to token output
StagelBootstrapConvert
Translate a StageL file using the bootstrap compiler
Fields
Pan2ParseJson
Convert a .pan file to JSON of parse (writes to stdout)
Pan2Macro
Extract a macro/procedure from a .pan file (writes to stdout)
Fields
Pan2Procedures
Export procedures from a .pan file into a directory of individual procedure files
Fields
PanMacro2Ast
Parse a macro/procedure into AST JSON from a macro code file (or whole .pan database if macro_name is provided) and write to stdout
Fields
Pdf2Txt
Convert a PDF file to text output. Not yet implemented.
Pdf2Json
Convert a PDF file to JSON output. Not yet implemented.
Pdf2Md
Convert a PDF file to Markdown output. Not yet implemented.
File2MetadataJson
Read a file and export comprehensive metadata from io/file to JSON
Fields
MetadataJson2File
Read file metadata JSON and rematerialize the file to the given path
Fields
Warcat
WARC archiving tool
CtbAssetBundleExtract
Extract a ctoolbox asset bundle to a directory tree.
Fields
JsLint
Lint JavaScript and TypeScript sources.
TsCheck
Type-check TypeScript code.
Fields
args: TsCheckArgsJsTest
Run JavaScript tests.
Fields
args: JsTestArgsPython(PythonArgs)
Run the embedded Python interpreter or execute Python scripts.
ValidateDockerImage
Validate a docker save image tarball
Fields
Csc(CscArgs)
Checksummed copy with rsync-compatible path resolution and an extra verification step
Archive(ArchiveArgs)
Create, list, verify, or extract a self-contained CSC archive.
Cp(CscArgs)
Copy files or directories with an extra verification step (alias for csc --delete-manifest-after)
Mv(MvArgs)
Move files or directories without copying when possible, or run verified cross-device copy
CscVerify(CscVerifyArgs)
Verify a directory against a manifest recorded by csc
CscDiff(CscDiffArgs)
Compare two filesystem paths with the same verification strictness and logic as csc
Fsindex(FsindexArgs)
Index a directory or csc manifest for quick searching
Fsearch(FsearchArgs)
Fast indexed search against a .cscindex.sqlite database
Csum
Calculate checksum for a file or stdin
Fields
algo: HashAlgorithmHash algorithm type (sha256, xxh32, xxh64, xxh3, xxh128)
Compress(CliCompressArgs)
Compress a file or stdin using single-stream compression format
Decompress
Decompress a compressed file or stdin
Fields
format: Option<String>Optional compression format (e.g. br, gz, deflate, zlib). If omitted, detected from file extension or magic bytes.
File(FileDetectionArgs)
Detect format, MIME type, and characteristics of files (like file)
Wfparser
Process a file using wfparser logic
Wfscan
Process a file using wfscan logic
DceutilsPhpToCsv
Convert PHP data file arrays to CSV files
Help
Show help
ShowNode
Unimplemented, just an example
DevSign
Sign release artifacts for distribution (developer command)
Fields
input_dir: Option<PathBuf>Directory containing release artifacts to sign. Defaults to ~/ctb_release/input if not specified.
DevGzSha256
Compress a tar file with the server’s gzip settings and print its SHA256 hex (developer command)
DevKeyCreate
Generate a signing keypair for ctb-dev-sign.
If --write is provided, writes the generated keys into local
pc_settings.json as dev_signing_private_key and
dev_signing_public_key.
DevReleaseCheck
Verify an uploaded release: check signature and chunk hashes
Fields
manifest: Option<PathBuf>Path to the manifest file to verify.
Defaults to {storage_dir}/releases/ctb-{platform}-latest.json if
not specified.
DevReleaseExpire
Delete old release chunks and manifests to reclaim disk space.
Scans the releases directory for manifest files, builds a set of all chunk hashes referenced by manifests newer than the threshold, then deletes any chunks not in the keep set along with old manifest files.
Fields
Install
Launch the installer GUI (or TUI if –no-gui).
Installs from files in the current directory if present, otherwise downloads from the update server.
Fields
MakeOfflineInstaller
Download and package the latest offline installer bundle.
Fields
Update
Check for updates and optionally apply them.
By default, prompts the user if an update is available. Use –unattended to automatically apply updates without prompting.
Fields
Uninstall
Uninstall ctoolbox from this system.
Reads installation.json to determine installed files, removes them, removes the desktop entry, and removes PATH modifications.
Fields
UpgradeCanary
Internal: Post-upgrade canary validation.
This command is run by the new binary after an upgrade. If the process survives 30 seconds, the backup is deleted and the process exits. If it crashes, the caller’s watchdog logic restores the backup.
Fields
Jq
Lightweight JQ implementation
Fields
JsonEscape
Escape a string to be a valid JSON string value (enclosed in double quotes).
Run(RunArgs)
Compile, execute, and render a Document Character (Dc) document or StageL 3 / StageR 3 program.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
fn exact_from(value: T) -> U
§impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
fn exact_into(self) -> U
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
fn overflowing_into(self) -> (U, bool)
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, U> RoundingInto<U> for Twhere
U: RoundingFrom<T>,
impl<T, U> RoundingInto<U> for Twhere
U: RoundingFrom<T>,
fn rounding_into(self, rm: RoundingMode) -> (U, Ordering)
§impl<T, U> SaturatingInto<U> for Twhere
U: SaturatingFrom<T>,
impl<T, U> SaturatingInto<U> for Twhere
U: SaturatingFrom<T>,
fn saturating_into(self) -> U
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.