I wrote a comment a while ago that has some code examples: <a href="https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;rfcs&#x2F;pull&#x2F;243#issuecomment-82201255" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;rfcs&#x2F;pull&#x2F;243#issuecomment-8220...</a> (and the following two comments)