We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rustified_non_exhaustive_enum
1 parent 50ec3ee commit dbe8ed9Copy full SHA for dbe8ed9
bindgen/options/mod.rs
@@ -541,6 +541,11 @@ options! {
541
///
542
/// This is similar to the [`Builder::rustified_enum`] style, but the `enum` is
543
/// tagged with the `#[non_exhaustive]` attribute.
544
+ ///
545
+ /// **Use this with caution**, creating an instance of a Rust `enum` with an
546
+ /// invalid value will cause undefined behaviour, even if it's tagged with
547
+ /// `#[non_exhaustive]`. To avoid this, use the [`Builder::newtype_enum`] style
548
+ /// instead.
549
pub fn rustified_non_exhaustive_enum<T: AsRef<str>>(mut self, arg: T) -> Builder {
550
self.options.rustified_non_exhaustive_enums.insert(arg);
551
self
0 commit comments