(val: Option<&str>)
| 336 | impl WasmtimeOptionValue for String { |
| 337 | const VAL_HELP: &'static str = "=val"; |
| 338 | fn parse(val: Option<&str>) -> Result<Self> { |
| 339 | match val { |
| 340 | Some(val) => Ok(val.to_string()), |
| 341 | None => bail!("value must be specified with `key=val` syntax"), |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | fn display(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 346 | f.write_str(self) |