<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>orhan.cn - builder</title>
    <link rel="self" type="application/atom+xml" href="https://orhan.cn/tags/builder/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://orhan.cn"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-06-10T00:00:00+00:00</updated>
    <id>https://orhan.cn/tags/builder/atom.xml</id>
    <entry xml:lang="en">
        <title>Rust derive_builder crate：用宏生成 Builder 模式</title>
        <published>2026-06-10T00:00:00+00:00</published>
        <updated>2026-06-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              menzil
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://orhan.cn/posts/rust-derive-builder-crate/"/>
        <id>https://orhan.cn/posts/rust-derive-builder-crate/</id>
        
        <summary type="html">&lt;p&gt;如果你在找 &lt;code&gt;drive_builder&lt;&#x2F;code&gt;，crates.io 上目前没有这个 Rust crate。更常见、也更符合这个名字含义的 crate 是 &lt;a href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;derive_builder&quot;&gt;&lt;code&gt;derive_builder&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;：它通过 &lt;code&gt;#[derive(Builder)]&lt;&#x2F;code&gt; 为结构体自动生成 Builder 模式代码，减少大量重复 setter、默认值和校验逻辑。&lt;&#x2F;p&gt;</summary>
        
    </entry>
</feed>
