Skip to main content

MapLike

Trait MapLike 

Source
pub trait MapLike<T: Clone>: Sized {
    // Required method
    fn for_each(&self, cb: impl FnMut(&T, &T));

    // Provided method
    fn to_values(&self) -> Box<[(T, T)]> { ... }
}

Required Methods§

Source

fn for_each(&self, cb: impl FnMut(&T, &T))

Provided Methods§

Source

fn to_values(&self) -> Box<[(T, T)]>

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 MapLike<NbtTag> for NbtCompound

Source§

fn for_each(&self, cb: impl FnMut(&NbtTag, &NbtTag))

Source§

impl MapLike<Value> for Map<String, Value>

Source§

fn for_each(&self, cb: impl FnMut(&Value, &Value))

Source§

impl MapLike<Value> for Object

Source§

fn for_each(&self, cb: impl FnMut(&Value, &Value))

Source§

impl<T: Clone> MapLike<T> for Vec<(T, T)>

Source§

fn for_each(&self, cb: impl FnMut(&T, &T))

Implementors§