You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
pubstructMessageArgs{pubname:Option<flatbuffers::WIPOffset<&'astr>>,}// ... 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).
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
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:
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).
The text was updated successfully, but these errors were encountered: