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

Method alias

crates/cli/src/spacetime_config.rs:615–618  ·  view source on GitHub ↗

Add an alias for a clap argument name that also maps to this key. This is useful for backwards compatibility when renaming arguments. Example: Key::new("module-path").alias("project-path") This allows both --module-path and --project-path to map to the same config key. The value should then be accessed by using `module-path` The difference between from_clap and alias is that from_clap will work

(mut self, alias_name: impl Into<String>)

Source from the content-addressed store, hash-verified

613 /// The difference between from_clap and alias is that from_clap will work by mapping
614 /// a single value from clap, whereas alias will check both of them in the CLI args
615 pub fn alias(mut self, alias_name: impl Into<String>) -> Self {
616 self.clap_alias = Some(alias_name.into());
617 self
618 }
619
620 /// Mark this key as module-specific. For example, the `js-bin` config option makes sense
621 /// only when applied to a single module. The `server` config option makes sense for

Callers 10

test_alias_supportFunction · 0.80
clear_databaseFunction · 0.80
cliFunction · 0.80
cliFunction · 0.80

Calls

no outgoing calls