fn layout_self_edges<'a>( rect: Rect, edges: &'a [&EdgeTemplate], ) -> impl Iterator<Item = EdgeGeometry> + 'a