Struct cbindgen::StructConfig
source · 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,
}
Expand description
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
Trait Implementations
sourceimpl Clone for StructConfig
impl Clone for StructConfig
sourcefn clone(&self) -> StructConfig
fn clone(&self) -> StructConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for StructConfig
impl Debug for StructConfig
sourceimpl Default for StructConfig
impl Default for StructConfig
sourcefn default() -> StructConfig
fn default() -> StructConfig
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for StructConfigwhere
StructConfig: Default,
impl<'de> Deserialize<'de> for StructConfigwhere
StructConfig: Default,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for StructConfig
impl Send for StructConfig
impl Sync for StructConfig
impl Unpin for StructConfig
impl UnwindSafe for StructConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more