pub struct ParamInfo {Show 13 fields
pub name: Ident,
pub ty: Type,
pub is_optional: bool,
pub is_bool: bool,
pub is_vec: bool,
pub vec_inner: Option<Type>,
pub is_id: bool,
pub wire_name: Option<String>,
pub location: Option<ParamLocation>,
pub default_value: Option<String>,
pub short_flag: Option<char>,
pub help_text: Option<String>,
pub is_positional: bool,
}Expand description
Parsed parameter information
Fields§
§name: IdentParameter name
ty: TypeParameter type
is_optional: boolWhether this is Option<T>
is_bool: boolWhether this is bool
is_vec: boolWhether this is Vec<T>
vec_inner: Option<Type>Inner type if Vec<T>
is_id: boolWhether this looks like an ID (ends with _id or is named id)
wire_name: Option<String>Custom wire name (from #[param(name = “…”)])
location: Option<ParamLocation>Parameter location override (from #[param(query/path/body/header)])
default_value: Option<String>Default value as a string (from #[param(default = …)])
short_flag: Option<char>Short flag character (from #[param(short = ‘x’)])
help_text: Option<String>Custom help text (from #[param(help = “…”)])
is_positional: boolWhether this is a positional argument (from #[param(positional)] or is_id heuristic)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamInfo
impl RefUnwindSafe for ParamInfo
impl !Send for ParamInfo
impl !Sync for ParamInfo
impl Unpin for ParamInfo
impl UnsafeUnpin for ParamInfo
impl UnwindSafe for ParamInfo
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