Skip to content

feat: custom final build( build_into, "build hook", etc) can be manual #306

@dzmitry-lahoda

Description

@dzmitry-lahoda
  1. i declared big complicated struct
  2. i set all needed fields
  3. build does not actually to instantiate the exact struct with bon macro, but something else

options:

  • for example it can inject fields into set of arrays under some index (see how this allows to work with struct as SoA or Aos https://github.com/tim-harding/soa-rs)
  • write it to some binary stream

why is needed:

  • may be better performance (why would I allocate struct on stack if i will immediately split and inject it into vectors). so not sure if it is case.

i guess feature can be closed as not planned if no more usecases found tbh.
may be it is just edge case, so it would replicate something what I would do manually without builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting on authorWaiting for action from the author of the issue/PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions