MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / load_from_str

Method load_from_str

crates/opencode-config/src/loader.rs:31–36  ·  view source on GitHub ↗
(&mut self, content: &str)

Source from the content-addressed store, hash-verified

29 }
30
31 pub fn load_from_str(&mut self, content: &str) -> Result<()> {
32 let config: Config =
33 parse_jsonc(content).with_context(|| "Failed to parse config content")?;
34 self.config.merge(config);
35 Ok(())
36 }
37
38 pub fn load_from_file<P: AsRef<Path>>(&mut self, path: P) -> Result<()> {
39 let path = path.as_ref();

Callers 2

load_from_env_contentMethod · 0.80

Calls 2

parse_jsoncFunction · 0.85
mergeMethod · 0.45

Tested by 1