MCPcopy Create free account
hub / github.com/ccusage/ccusage / parse_cost_mode

Function parse_cost_mode

rust/crates/ccusage-cli/src/parser.rs:864–871  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

862}
863
864fn parse_cost_mode(value: &str) -> Result<CostMode, String> {
865 match value {
866 "auto" => Ok(CostMode::Auto),
867 "calculate" => Ok(CostMode::Calculate),
868 "display" => Ok(CostMode::Display),
869 _ => Err(format!("Invalid cost mode '{value}'")),
870 }
871}
872
873fn parse_sort_order(value: &str) -> Result<SortOrder, String> {
874 match value {

Callers 1

parse_shared_argFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected