Skip to content

Commit

Permalink
docs(derive): Specify Parser::update_from semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Aug 16, 2024
1 parent df165a2 commit a3a4764
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clap_builder/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized {
}

/// Update from iterator, [exit][Error::exit] on error.
///
/// Unlike [`Parser::parse`], this works with an existing instance of `self`.
/// The assumption is that all required fields are already provided and any [`Args`] or
/// [`Subcommand`]s provided by the user will modify only what is specified.
fn update_from<I, T>(&mut self, itr: I)
where
I: IntoIterator<Item = T>,
Expand Down

0 comments on commit a3a4764

Please sign in to comment.