Skip to content

Builder Pattern

This project uses consuming-self builders with const fn:

#[must_use]
pub const fn with_field(mut self, value: T) -> Self {
self.field = value;
self
}
  • Config::new() is const fn and #[must_use].
  • Default impl delegates to new().
  • Every builder method is const fn and #[must_use].