MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / valid_protocol_or_error

Function valid_protocol_or_error

crates/cli/src/subcommands/server.rs:182–188  ·  view source on GitHub ↗
(protocol: &str)

Source from the content-addressed store, hash-verified

180}
181
182fn valid_protocol_or_error(protocol: &str) -> anyhow::Result<()> {
183 if !VALID_PROTOCOLS.contains(&protocol) {
184 Err(anyhow::anyhow!("Invalid protocol: {protocol}"))
185 } else {
186 Ok(())
187 }
188}
189
190pub async fn exec_add(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::Error> {
191 // Trim trailing `/`s because otherwise we end up with a double `//` in some later codepaths.

Callers 2

exec_addFunction · 0.85
exec_editFunction · 0.85

Calls 3

ErrFunction · 0.50
OkFunction · 0.50
containsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…