Struct cbindgen::StructConfig[][src]

pub struct StructConfig {
    pub rename_fields: RenameRule,
    pub derive_constructor: bool,
    pub derive_eq: bool,
    pub derive_neq: bool,
    pub derive_lt: bool,
    pub derive_lte: bool,
    pub derive_gt: bool,
    pub derive_gte: bool,
    pub derive_ostream: bool,
    pub associated_constants_in_body: bool,
    pub must_use: Option<String>,
}
Expand description

Settings to apply to generated structs.

Fields

rename_fields: RenameRule

The rename rule to apply to the name of struct fields

derive_constructor: bool

Whether to generate a constructor for the struct (which takes arguments to initialize all the members)

derive_eq: bool

Whether to generate a piecewise equality operator

derive_neq: bool

Whether to generate a piecewise inequality operator

derive_lt: bool

Whether to generate a less than operator on structs with one field

derive_lte: bool

Whether to generate a less than or equal to operator on structs with one field

derive_gt: bool

Whether to generate a greater than operator on structs with one field

derive_gte: bool

Whether to generate a greater than or equal to operator on structs with one field

derive_ostream: bool

Whether to generate a ostream serializer for the struct

associated_constants_in_body: bool

Whether associated constants should be in the body. Only applicable to non-transparent structs, and in C++-only.

must_use: Option<String>

The way to annotate this struct as #[must_use].

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.