Allow segments_generator to have different to_visit() per type