Skip to main content

NamedArguments

Trait NamedArguments 

Source
pub trait NamedArguments<V: FormatArgument> {
    // Required method
    fn get(&self, key: &str) -> Option<&V>;
}
Expand description

A type that associates an argument with a name.

Required Methods§

Source

fn get(&self, key: &str) -> Option<&V>

Returns a reference to the argument associated with the given name, if any.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<K, V> NamedArguments<V> for HashMap<K, &V>
where K: Borrow<str> + Hash + Eq, V: FormatArgument,

Source§

fn get(&self, key: &str) -> Option<&V>

Source§

impl<K, V> NamedArguments<V> for HashMap<K, V>
where K: Borrow<str> + Hash + Eq, V: FormatArgument,

Source§

fn get(&self, key: &str) -> Option<&V>

Implementors§