pub trait Resolver {
// Required methods
fn expand(&self, name: &str) -> String;
fn all(&self) -> HashMap<String, String>;
fn lookup(&self, name: &str) -> Option<String>;
}Expand description
Resolves variable names to string values. Immutable after construction and
safe for concurrent use, once the eventual implementation lands (the Go
original documents this contract on the Resolver interface).
Required Methods§
Sourcefn expand(&self, name: &str) -> String
fn expand(&self, name: &str) -> String
An os.Expand-compatible callback: returns the resolved value for
name, or “” when the name is neither known nor set in the environment.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".