elements::Section struct hierarchy lacks constructors
The structures in elements/section.rs lack explicit constructor-methods (new-methods) to instantiate them programmatically, for example to extend a list of parsed sections of a module. Sadly, the private members of those structures do not permit to instantiate instances outside of the crate.
The following functions would be helpful: CustomSection::new(name:.., payload:..) -> CustomSection TypeSection::new(types:..) -> TypeSection etc.
All elements derive the Default trait, except the CustomSection. CustomSection should derive the Default trait, so default instances could be created from CustomSection, see https://github.com/paritytech/parity-wasm/pull/169
Pull-Request #169 has been merged, now it will be possible to instantiate CustomSection the following way:
let mut custom_section: CustomSection = Default::default();