Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Construction

There are two and a half ways to instantiate a struct in FieldX:

  1. By using its default

    • by using its new method, which is just syntax sugar around the Default trait under the hood. If you don't want the implicit new method then just do:

      #[fxstruct(new(off))]
  2. By using the builder pattern.

Since there is nothing more to be added about the new()/default(), let's focus on the builder pattern.