mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
Merge pull request #6515 from Its-Just-Nans/document-args
document uucore::Args #5068
This commit is contained in:
commit
ff389491cc
1 changed files with 4 additions and 0 deletions
|
@ -181,6 +181,10 @@ pub fn execution_phrase() -> &'static str {
|
|||
&EXECUTION_PHRASE
|
||||
}
|
||||
|
||||
/// Args contains arguments passed to the utility.
|
||||
/// It is a trait that extends `Iterator<Item = OsString>`.
|
||||
/// It provides utility functions to collect the arguments into a `Vec<String>`.
|
||||
/// The collected `Vec<String>` can be lossy or ignore invalid encoding.
|
||||
pub trait Args: Iterator<Item = OsString> + Sized {
|
||||
/// Collects the iterator into a `Vec<String>`, lossily converting the `OsString`s to `Strings`.
|
||||
fn collect_lossy(self) -> Vec<String> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue