pub type RectanglePainter<'a> = Box<dyn FnOnce(RectangleMetrics) -> Result<()> + 'a>;
pub struct RectanglePainter<'a>(/* private fields */);