Module builder

Source
Expand description

Compile time checked builder APIs

§(temporary) Checklist for manually writing builders

  • struct definition
  • impl struct with builder() and finish_init(..)
  • submodule for builder impl details
    • imports
    • pub type for init/uninit
    • builder struct def
    • builder state trait def
    • builder state container struct def
    • private mod for sealed trait
    • impl builder state trait
    • impl sealed
    • impl uninit for new() fn
    • impl where S: builder state trait for all the fns including build() (build() calls finish_init(..))
    • impl block, same as previous one in headers and stuffs, for the internal fns

Structs§

Init
Uninit

Traits§

InitialisationStatus
Compile-time known value for if the current type encodes initialised or not
IsInit
IsUninit

Type Aliases§

PhantomDataInvariant

Attribute Macros§

builder