pub trait ColorfulVersionExt {
// Required method
fn with_colorful_version(self, version: &ColorfulVersion) -> Self;
}Expand description
Extension trait for clap::Command to add colorful version flag
Required Methods§
Sourcefn with_colorful_version(self, version: &ColorfulVersion) -> Self
fn with_colorful_version(self, version: &ColorfulVersion) -> Self
Adds a version flag that will display colorful output when used
§Examples
use clap::Command;
use clap_version_flag::{ColorfulVersion, ColorfulVersionExt};
let version = ColorfulVersion::new("myapp", "1.0.0", "John Doe");
let cmd = Command::new("myapp").with_colorful_version(&version);Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.