pub struct CmdNode {Show 16 fields
pub path: String,
pub segment: String,
pub usage: String,
pub short: String,
pub long: String,
pub aliases: Vec<String>,
pub hidden: bool,
pub leaf: bool,
pub entry: Option<Arc<Entry>>,
pub defs: Vec<FlagDef>,
pub env_only: Vec<FieldMeta>,
pub pos_f: Vec<FieldMeta>,
pub min_pos: usize,
pub max_pos: usize,
pub children: Vec<CmdNode>,
pub default_segment: Option<String>,
}Fields§
§path: String完整点分路径,如 user.add。
segment: String本段命令名(帮助列表与下沉匹配用)。
usage: String§short: String§long: String§aliases: Vec<String>§leaf: bool§entry: Option<Arc<Entry>>§defs: Vec<FlagDef>§env_only: Vec<FieldMeta>#[xyz(skip)] 且配置了 env 的注入字段。
pos_f: Vec<FieldMeta>§min_pos: usize§max_pos: usize§children: Vec<CmdNode>有序子节点(按段名排序;别名不占列表位)。
default_segment: Option<String>默认子命令的末段名(CliHints.default);执行期未匹配命令段时整串 参数转发给它。
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CmdNode
impl !UnwindSafe for CmdNode
impl Freeze for CmdNode
impl Send for CmdNode
impl Sync for CmdNode
impl Unpin for CmdNode
impl UnsafeUnpin for CmdNode
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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