Derive

  • derive_copy
    • no_copy
  • derive_debug
    • impl_debug
    • no_debug
  • derive_default
    • no_default
  • derive_hash
    • no_hash
  • derive_partialord
  • derive_ord
  • derive_partialeq
    • impl_partialeq
    • no_partialeq
  • derive_eq

Examples

extern crate bindgen;
bindgen::builder()
    .header_contents("wrapper.h", "#include <time.h>")
    .derive_default(true)
    .allowlist_type("timespec");
/* automatically generated by rust-bindgen 0.69.4 */

pub type time_t = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct timespec {
    pub tv_sec: time_t,
    pub tv_nsec: ::std::os::raw::c_long,
}

// <layout_tests>

References