Trait Mappablepub

Source
:trait(pub) Mappable mapped
  .map ( (Self a) [a  b ]  (mapped b) )
Description

Trait for collections whose elements can be transformed element-wise. The mapped associated type determines the output collection so that length-preserving maps over Vec n can preserve n while maps over HashSet fall back to a Vec.

Required Methods

.map ( (Self a) [a b ] (mapped b) )

Apply f to each element, collecting results into (mapped b). ( (Self a) [a -> b] -> (mapped b) )

Implementors

impl Mappable for Vec