Home
last modified time | relevance | path

Searched refs:StyledStr (Results 1 – 19 of 19) sorted by relevance

/third_party/rust/crates/clap/src/error/
Dmod.rs20 use crate::builder::StyledStr;
274 pub fn render(&self) -> StyledStr { in render() argument
279 fn for_app(kind: ErrorKind, cmd: &Command, styled: StyledStr) -> Self { in for_app()
331 pub(crate) fn display_help(cmd: &Command, styled: StyledStr) -> Self { in display_help()
335 pub(crate) fn display_help_error(cmd: &Command, styled: StyledStr) -> Self { in display_help_error()
343 pub(crate) fn display_version(cmd: &Command, styled: StyledStr) -> Self { in display_version()
351 usage: Option<StyledStr>, in argument_conflict() argument
368 .insert_context_unchecked(ContextKind::Usage, ContextValue::StyledStr(usage)); in argument_conflict()
379 pub(crate) fn no_equals(cmd: &Command, arg: String, usage: Option<StyledStr>) -> Self { in no_equals()
388 .insert_context_unchecked(ContextKind::Usage, ContextValue::StyledStr(usage)); in no_equals()
[all …]
Dformat.rs7 use crate::builder::StyledStr;
18 fn format_error(error: &crate::error::Error<Self>) -> StyledStr; in format_error() argument
31 fn format_error(error: &crate::error::Error<Self>) -> StyledStr { in format_error() argument
32 let mut styled = StyledStr::new(); in format_error()
55 fn format_error(error: &crate::error::Error<Self>) -> StyledStr { in format_error() argument
56 let mut styled = StyledStr::new(); in format_error()
108 if let Some(ContextValue::StyledStr(usage)) = usage { in format_error()
118 fn start_error(styled: &mut StyledStr) { in start_error() argument
125 fn write_dynamic_context(error: &crate::error::Error, styled: &mut StyledStr) -> bool { in write_dynamic_context()
380 usage: Option<StyledStr>, in format_error_message() argument
[all …]
Dcontext.rs87 StyledStr(crate::builder::StyledStr), enumerator
89 StyledStrs(Vec<crate::builder::StyledStr>),
101 Self::StyledStr(v) => v.fmt(f), in fmt()
/third_party/rust/crates/clap/src/builder/
Dstyled_str.rs6 pub struct StyledStr { struct
13 impl StyledStr { implementation
239 impl Default for &'_ StyledStr { implementation
241 static DEFAULT: StyledStr = StyledStr::new(); in default()
246 impl From<std::string::String> for StyledStr { implementation
248 let mut styled = StyledStr::new(); in from()
254 impl From<&'_ std::string::String> for StyledStr { implementation
256 let mut styled = StyledStr::new(); in from()
262 impl From<&'static str> for StyledStr { implementation
264 let mut styled = StyledStr::new(); in from()
[all …]
Dcommand.rs18 use crate::builder::StyledStr;
80 about: Option<StyledStr>,
81 long_about: Option<StyledStr>,
82 before_help: Option<StyledStr>,
83 before_long_help: Option<StyledStr>,
84 after_help: Option<StyledStr>,
85 after_long_help: Option<StyledStr>,
89 usage_str: Option<StyledStr>,
91 help_str: Option<StyledStr>,
96 template: Option<StyledStr>,
[all …]
Dpossible_value.rs3 use crate::builder::StyledStr;
37 help: Option<StyledStr>,
82 pub fn help(mut self, help: impl IntoResettable<StyledStr>) -> Self { in help()
155 pub fn get_help(&self) -> Option<&StyledStr> { in get_help() argument
163 pub(crate) fn get_visible_help(&self) -> Option<&StyledStr> { in get_visible_help() argument
Dresettable.rs7 use crate::builder::StyledStr;
114 impl IntoResettable<StyledStr> for Option<&'static str> {
115 fn into_resettable(self) -> Resettable<StyledStr> { in into_resettable() argument
189 impl<I: Into<StyledStr>> IntoResettable<StyledStr> for I {
190 fn into_resettable(self) -> Resettable<StyledStr> { in into_resettable() argument
Darg.rs19 use crate::builder::StyledStr;
56 pub(crate) help: Option<StyledStr>,
57 pub(crate) long_help: Option<StyledStr>,
2043 pub fn help(mut self, h: impl IntoResettable<StyledStr>) -> Self { in help()
2105 pub fn long_help(mut self, h: impl IntoResettable<StyledStr>) -> Self { in long_help()
3704 pub fn get_help(&self) -> Option<&StyledStr> { in get_help() argument
3719 pub fn get_long_help(&self) -> Option<&StyledStr> { in get_long_help() argument
4141 pub(crate) fn stylized(&self, required: Option<bool>) -> StyledStr { in stylized() argument
4142 let mut styled = StyledStr::new(); in stylized()
4155 pub(crate) fn stylize_arg_suffix(&self, required: Option<bool>) -> StyledStr { in stylize_arg_suffix() argument
[all …]
Dmod.rs36 pub use styled_str::StyledStr;
/third_party/rust/crates/clap/src/output/
Dusage.rs7 use crate::builder::StyledStr;
36 pub(crate) fn create_usage_with_title(&self, used: &[Id]) -> Option<StyledStr> { in create_usage_with_title() argument
40 let mut styled = StyledStr::new(); in create_usage_with_title()
48 pub(crate) fn create_usage_no_title(&self, used: &[Id]) -> Option<StyledStr> { in create_usage_no_title() argument
73 fn create_help_usage(&self, incl_reqs: bool) -> StyledStr { in create_help_usage() argument
75 let mut styled = StyledStr::new(); in create_help_usage()
128 fn create_smart_usage(&self, used: &[Id]) -> StyledStr { in create_smart_usage() argument
130 let mut styled = StyledStr::new(); in create_smart_usage()
190 pub(crate) fn write_args(&self, incls: &[Id], force_optional: bool, styled: &mut StyledStr) { in write_args() argument
197 pub(crate) fn get_args(&self, incls: &[Id], force_optional: bool) -> Vec<StyledStr> { in get_args() argument
[all …]
Dfmt.rs1 use crate::builder::StyledStr;
15 content: StyledStr,
27 pub(crate) fn with_content(mut self, content: StyledStr) -> Self { in with_content()
Dhelp.rs5 use crate::builder::StyledStr;
9 pub(crate) fn write_help(writer: &mut StyledStr, cmd: &Command, usage: &Usage<'_>, use_long: bool) { in write_help() argument
Dhelp_template.rs9 use crate::builder::StyledStr;
27 writer: &'writer mut StyledStr, in new() argument
75 writer: &'writer mut StyledStr,
87 writer: &'writer mut StyledStr, in new() argument
551 about: &StyledStr, in help() argument
834 let mut styled = StyledStr::new(); in write_subcommands()
881 sc_str: StyledStr, in write_subcommand() argument
941 fn subcmd(&mut self, sc_str: StyledStr, next_line_help: bool, longest: usize) { in subcmd() argument
1018 fn replace_newline_var(styled: &mut StyledStr) { in replace_newline_var() argument
/third_party/rust/crates/clap/clap_complete/src/shells/
Delvish.rs3 use clap::builder::StyledStr;
62 fn get_tooltip<T: ToString>(help: Option<&StyledStr>, data: T) -> String { in get_tooltip() argument
Dpowershell.rs3 use clap::builder::StyledStr;
67 fn get_tooltip<T: ToString>(help: Option<&StyledStr>, data: T) -> String { in get_tooltip() argument
/third_party/rust/crates/clap/src/parser/
Dvalidator.rs2 use crate::builder::StyledStr;
195 ) -> Option<StyledStr> { in build_conflict_err_usage() argument
/third_party/rust/crates/clap/src/
Dmacros.rs642 let mut styled = $crate::builder::StyledStr::new();
/third_party/rust/crates/clap/clap_mangen/src/
Drender.rs283 fn option_help(opt: &clap::Arg) -> Option<&clap::builder::StyledStr> { in option_help() argument
/third_party/rust/crates/clap/
DCHANGELOG.md511 - *(help)* `Command::render_usage` now returns a `StyledStr` (#4248)
556 - Added `StyledStr::ansi()` to `Display` with ANSI escape codes (#4248)
558 - *(error)* `Error::render`for formatting the error into a `StyledStr`
561 …er_help` and `Command::render_long_help` for formatting the error into a `StyledStr` (#3873, #4248)
562 - *(help)* `Command::render_usage` now returns a `StyledStr` (#4248)