[][src]Struct cbindgen::StructConfig

pub struct StructConfig {
    pub rename_fields: Option<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 associated_constants_in_body: bool,
    pub must_use: Option<String>,
}

Settings to apply to generated structs.

Fields

rename_fields: Option<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

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 annotation this struct as #[must_use].

Trait Implementations

impl Clone for StructConfig[src]

impl Default for StructConfig[src]

impl Debug for StructConfig[src]

impl<'de> Deserialize<'de> for StructConfig where
    StructConfig: Default
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]