Trait uucore::Args[][src]

pub trait Args: Iterator<Item = OsString> + Sized {
    fn collect_str(self, handling: InvalidEncodingHandling) -> ConversionResult { ... }
fn collect_str_lossy(self) -> ConversionResult { ... } }

Provided methods

Converts each iterator item to a String and collects these into a vector On invalid encoding, the result will depend on the argument. This method allows to either drop entries with illegal encoding completely (InvalidEncodingHandling::Ignore), convert them using lossy-conversion (InvalidEncodingHandling::Lossy) which will result in strange strings or can chosen to panic (InvalidEncodingHandling::Panic).

Arguments

  • handling - This switch allows to switch the behavior, when invalid encoding is encountered

Panics

  • Occurs, when invalid encoding is encountered and handling is set to InvalidEncodingHandling::Panic

convenience function for a more slim interface

Implementors