pub struct FieldSpec {Show 16 fields
pub rust_name: &'static str,
pub json_name: &'static str,
pub kind: FieldKind,
pub desc: &'static str,
pub required: bool,
pub secret: bool,
pub skip: bool,
pub validate_s: &'static str,
pub enum_s: &'static str,
pub default_s: &'static str,
pub cli_s: &'static str,
pub http_s: &'static str,
pub http_name: Option<&'static str>,
pub elem: Option<Box<FieldSpec>>,
pub children: Vec<FieldSpec>,
pub union: Option<UnionSpec>,
}Expand description
静态字段描述(宏按声明序生成的字段树节点)。
Fields§
§rust_name: &'static strRust 字段名(json:“-” 注入字段的投递键)。
json_name: &'static str线上名。
kind: FieldKind§desc: &'static str§required: bool§secret: bool§skip: booljson:“-” 对应物:不进绑定与 schema(env/header 仍可按 rust_name 注入)。
validate_s: &'static strvalidate tag 原串(注册期解析)。
enum_s: &'static strenum tag 原串(注册期解析)。
default_s: &'static strdefault tag 原串(注册期按 kind 解析成 typed Value)。
cli_s: &'static strcli tag 原串(register 期解析:shorthand/positional/hidden/env/-)。
http_s: &'static strhttp location 原串(query/path/header/form/body/空)。
http_name: Option<&'static str>httpName 覆盖(header 名等)。
elem: Option<Box<FieldSpec>>Ptr/Slice 的元素形状。
children: Vec<FieldSpec>struct 的子字段。
union: Option<UnionSpec>联合的静态树(kind == Union 时填充)。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldSpec
impl RefUnwindSafe for FieldSpec
impl Send for FieldSpec
impl Sync for FieldSpec
impl Unpin for FieldSpec
impl UnsafeUnpin for FieldSpec
impl UnwindSafe for FieldSpec
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