Skip to main content

StringLookup

Trait StringLookup 

Source
pub trait StringLookup {
    // Required method
    fn lookup(&mut self, v: &str) -> Option<String>;
}
Expand description

A simple lookup function, used by the StringSource.

Required Methods§

Source

fn lookup(&mut self, v: &str) -> Option<String>

Looks up the variable v and returns its value.

Returns None if the variable cannot be found.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StringLookup for HashMap<String, String>

Source§

fn lookup(&mut self, v: &str) -> Option<String>

Implementors§