MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / from_file

Method from_file

guardrail_ffi/src/lib.rs:115–118  ·  view source on GitHub ↗

Load from file.

(path: &Path)

Source from the content-addressed store, hash-verified

113
114 /// Load from file.
115 pub fn from_file(path: &Path) -> Result<Self, String> {
116 let json = std::fs::read_to_string(path).map_err(|e| e.to_string())?;
117 Self::new(&json)
118 }
119
120 /// Load from URL (blocking GET).
121 pub fn from_url(url: &str) -> Result<Self, String> {

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected