MCPcopy Create free account
hub / github.com/AI45Lab/Code / parse_lane

Function parse_lane

sdk/node/src/lib.rs:2138–2149  ·  view source on GitHub ↗
(lane: &str)

Source from the content-addressed store, hash-verified

2136}
2137
2138fn parse_lane(lane: &str) -> napi::Result<RustSessionLane> {
2139 match lane.trim().to_ascii_lowercase().as_str() {
2140 "control" => Ok(RustSessionLane::Control),
2141 "query" => Ok(RustSessionLane::Query),
2142 "execute" => Ok(RustSessionLane::Execute),
2143 "generate" => Ok(RustSessionLane::Generate),
2144 _ => Err(napi::Error::from_reason(format!(
2145 "Invalid lane '{}'. Must be: control, query, execute, or generate",
2146 lane
2147 ))),
2148 }
2149}
2150
2151fn parse_handler_mode(mode: &str) -> napi::Result<RustTaskHandlerMode> {
2152 match mode.trim().to_ascii_lowercase().as_str() {

Callers 3

js_queue_config_to_rustFunction · 0.70
set_lane_handlerMethod · 0.70

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected