Expand description
Compile time checked builder APIs
§(temporary) Checklist for manually writing builders
- struct definition
- impl struct with
builder()
andfinish_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 includingbuild()
(build()
callsfinish_init(..)
) - impl block, same as previous one in headers and stuffs, for the internal fns
Structs§
Traits§
- Initialisation
Status - Compile-time known value for if the current type encodes initialised or not
- IsInit
- IsUninit