pub struct ParsedArgs {
pub arguments: Vec<String>,
pub options: HashMap<String, String>,
}Expand description
解析后的命令参数和选项。
Fields§
§arguments: Vec<String>位置参数。
options: HashMap<String, String>提供的选项,例如 –option value。 对于标志(没有值的选项),其值可能为空字符串或占位符。
Trait Implementations§
Source§impl Clone for ParsedArgs
impl Clone for ParsedArgs
Source§fn clone(&self) -> ParsedArgs
fn clone(&self) -> ParsedArgs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParsedArgs
impl Debug for ParsedArgs
Source§impl Default for ParsedArgs
impl Default for ParsedArgs
Source§fn default() -> ParsedArgs
fn default() -> ParsedArgs
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParsedArgs
impl RefUnwindSafe for ParsedArgs
impl Send for ParsedArgs
impl Sync for ParsedArgs
impl Unpin for ParsedArgs
impl UnsafeUnpin for ParsedArgs
impl UnwindSafe for ParsedArgs
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