Trait lattices::collections::MapMapValues
source · pub trait MapMapValues<OldVal> {
type MapValue<NewVal>;
// Required method
fn map_values<NewVal, MapFn>(self, map_fn: MapFn) -> Self::MapValue<NewVal>
where MapFn: FnMut(OldVal) -> NewVal;
}
Expand description
Trait for transforming the values of a map without changing the overall type of the data structure.
Required Associated Types§
Required Methods§
sourcefn map_values<NewVal, MapFn>(self, map_fn: MapFn) -> Self::MapValue<NewVal>where
MapFn: FnMut(OldVal) -> NewVal,
fn map_values<NewVal, MapFn>(self, map_fn: MapFn) -> Self::MapValue<NewVal>where
MapFn: FnMut(OldVal) -> NewVal,
Map the values into using the map_fn
.
Object Safety§
This trait is not object safe.