Open
Description
The current Rust codegen (specifically here) generates an args struct with Option<T>
fields even when those fields are marked as (required)
in the .fbs
definition.
Example:
table Message {
name: string (required);
}
pub struct MessageArgs {
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
}
// ...
let msg = Message::create(&mut builder, &MessageArgs { ..Default::default() }); // panic, oh no
It would be nice for compile-time safety if creating these flatbuffer messages it was a compile-time failure if things were not specified (and I would be prepared to live with a flag that disables the builder style completely in that case).
Metadata
Metadata
Assignees
Labels
No labels