pub struct CliFieldHint {
pub shorthand: Option<String>,
pub positional: bool,
pub hidden: bool,
pub skip: bool,
pub env_var: Option<String>,
pub default: Option<Value>,
}Expand description
Define 期的 CLI 字段级配置。
Fields§
§shorthand: Option<String>单字符短名,如 ‘a’。
positional: bool§skip: bool对 CLI 前端不可见(属性等价物:cli = “-”)。
env_var: Option<String>未显式提供时回退到这个环境变量。
default: Option<Value>CLI-only 默认值;对 CLI 前端覆盖全局 default 属性。
Trait Implementations§
Source§impl Clone for CliFieldHint
impl Clone for CliFieldHint
Source§impl Debug for CliFieldHint
impl Debug for CliFieldHint
Auto Trait Implementations§
impl Freeze for CliFieldHint
impl RefUnwindSafe for CliFieldHint
impl Send for CliFieldHint
impl Sync for CliFieldHint
impl Unpin for CliFieldHint
impl UnsafeUnpin for CliFieldHint
impl UnwindSafe for CliFieldHint
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