<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Trait on wid's blog</title><link>https://wid-blog.github.io/en/tags/trait/</link><description>Recent content in Trait on wid's blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 17 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://wid-blog.github.io/en/tags/trait/index.xml" rel="self" type="application/rss+xml"/><item><title>Rust Traits, Generics, and dyn</title><link>https://wid-blog.github.io/en/posts/tech/language/rust-generics-dispatch/</link><pubDate>Tue, 17 Nov 2026 00:00:00 +0000</pubDate><guid>https://wid-blog.github.io/en/posts/tech/language/rust-generics-dispatch/</guid><description>Generics (including argument-position impl Trait) compile a copy of the function for each type it is called with and call it statically. dyn Trait compiles one function that reads the implementation&amp;rsquo;s address from a vtable. I treat the choice as depending on whether types must be mixed, and on whether the cost of extra copies or of indirect calls is the one that hurts. The fifth post in a Rust study series.</description></item></channel></rss>