MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / parse_lcm_scope_arg

Function parse_lcm_scope_arg

src/main.rs:386–400  ·  view source on GitHub ↗
(
    value: &str,
)

Source from the content-addressed store, hash-verified

384}
385
386pub(crate) fn parse_lcm_scope_arg(
387 value: &str,
388) -> tracedecay::errors::Result<tracedecay::sessions::lcm::LcmScope> {
389 use tracedecay::sessions::lcm::LcmScope;
390 match value.trim().replace('-', "_").as_str() {
391 "all" => Ok(LcmScope::All),
392 "session" => Ok(LcmScope::Session),
393 "current" => Ok(LcmScope::Current),
394 other => Err(tracedecay::errors::TraceDecayError::Config {
395 message: format!(
396 "invalid session-reflection --scope '{other}'; expected all, session, or current"
397 ),
398 }),
399 }
400}
401
402async fn dispatch_command(command: Commands) -> tracedecay::errors::Result<()> {
403 match command {

Callers 1

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected