pub trait PairExt<T, P>: Sized + Into<Pair<T, P>> { // Provided method fn map_item<F, NewItem>(self, op: F) -> Pair<NewItem, P> where F: FnOnce(T) -> NewItem { ... } }