MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / from_str

Method from_str

gql-cli/src/cli/commands.rs:187–194  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

185 type Err = String;
186
187 fn from_str(s: &str) -> Result<Self, Self::Err> {
188 match s.to_lowercase().as_str() {
189 "table" => Ok(OutputFormat::Table),
190 "json" => Ok(OutputFormat::Json),
191 "csv" => Ok(OutputFormat::Csv),
192 _ => Err(format!("Unknown output format: {}", s)),
193 }
194 }
195}

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected