@override Function get encoder => (M self) => self.map( (key, value) => MapEntry(mapper.toValue(key), mapper.toValue(value)));