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

Method update_table

crates/cli/src/config.rs:39–44  ·  view source on GitHub ↗

Update an existing [`Table`] with the values of a [`ServerConfig`].

(edit: &mut toml_edit::Table, from: &ServerConfig)

Source from the content-addressed store, hash-verified

37
38 /// Update an existing [`Table`] with the values of a [`ServerConfig`].
39 pub fn update_table(edit: &mut toml_edit::Table, from: &ServerConfig) {
40 set_table_opt_value(edit, NICKNAME_KEY, from.nickname.as_deref());
41 set_table_opt_value(edit, HOST_KEY, Some(&from.host));
42 set_table_opt_value(edit, PROTOCOL_KEY, Some(&from.protocol));
43 set_table_opt_value(edit, ECDSA_PUBLIC_KEY, from.ecdsa_public_key.as_deref());
44 }
45
46 fn nick_or_host(&self) -> &str {
47 if let Some(nick) = &self.nickname {

Callers

nothing calls this directly

Calls 1

set_table_opt_valueFunction · 0.85

Tested by

no test coverage detected