MCPcopy Create free account
hub / github.com/arraypad/each / set_arguments

Method set_arguments

src/formats/csv.rs:93–108  ·  view source on GitHub ↗
(&mut self, matches: &clap::ArgMatches)

Source from the content-addressed store, hash-verified

91 }
92
93 fn set_arguments(&mut self, matches: &clap::ArgMatches) -> Result<(), Error> {
94 self.delimiter = match matches.value_of("csv-delimiter") {
95 Some(delimiter) => Some(str_to_u8(delimiter)?),
96 None => None,
97 };
98 self.quote = match matches.value_of("csv-quote") {
99 Some(quote) => Some(str_to_u8(quote)?),
100 None => None,
101 };
102 self.escape = match matches.value_of("csv-escape") {
103 Some(escape) => Some(str_to_u8(escape)?),
104 None => None,
105 };
106
107 Ok(())
108 }
109
110 fn get_extensions(&self) -> &'static [&'static str] {
111 &CSV_EXTS

Callers 1

runFunction · 0.45

Calls 1

str_to_u8Function · 0.85

Tested by

no test coverage detected