pub fn resolve(raw: &str) -> Result<Resolved, String>Expand description
Resolve a raw option value through the file: / text: schemes.
ยงExamples
use coding_tools::payload::resolve;
// No recognised prefix: the value is literal as-is.
assert_eq!(resolve("http://example.com").unwrap().text, "http://example.com");
assert!(!resolve("std::fmt").unwrap().from_file);
// text: strips the prefix and nothing else.
assert_eq!(resolve("text:file:not-a-path").unwrap().text, "file:not-a-path");