I&#x27;m currently learning rust and it&#x27;s an interesting experience dealing with libraries where I can&#x27;t judge which parts of libraries are typical rust and which parts are just design decisions by the library developer.<p>Since Rust is so new, perhaps there is no real difference, but the piston example shows some ideas that I&#x27;m not sure I like but I also don&#x27;t know if that is just how things are done in the Rust world.<p><pre><code>    let window: PistonWindow = 
        WindowSettings::new(&quot;Hello Piston!&quot;, [640, 480])
        .exit_on_esc(true).build().unwrap();
    for e in window {
        e.draw_2d(|c, g| {
            clear([1.0; 4], g);
            rectangle([1.0, 0.0, 0.0, 1.0], &#x2F;&#x2F; red
                      [0.0, 0.0, 100.0, 100.0],
                      c.transform, g);
        });
    }
</code></pre>
That&#x27;s iterating on a window which seems an odd choice.  
The functions clear and rectangle seem to me to be things that should be in traits rather than functions that require a parameter to say what the target of the drawing function is.