Skip to main content

AsNamedListExt

Trait AsNamedListExt 

Source
pub trait AsNamedListExt: Sized {
    // Provided method
    fn wrap_named_list(self) -> AsNamedList<Self> { ... }
}
Expand description

Extension trait for wrapping tuple pair collections as AsNamedList.

§Example

let pairs = vec![("x".to_string(), 1i32), ("y".to_string(), 2i32)];
let wrapped = pairs.wrap_named_list();

Provided Methods§

Source

fn wrap_named_list(self) -> AsNamedList<Self>

Wrap self in AsNamedList for named R list conversion.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<K: AsRef<str>, V: Clone + IntoR> AsNamedListExt for &[(K, V)]

Source§

impl<K: AsRef<str>, V: IntoR, const N: usize> AsNamedListExt for [(K, V); N]

Source§

impl<K: AsRef<str>, V: IntoR> AsNamedListExt for Vec<(K, V)>

Implementors§