pub type size_t = ::std::os::raw::c_ulong;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type char16_t = u16;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_env__ {
_unused: [u8; 0],
}
pub type napi_env = *mut napi_env__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_value__ {
_unused: [u8; 0],
}
pub type napi_value = *mut napi_value__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_ref__ {
_unused: [u8; 0],
}
pub type napi_ref = *mut napi_ref__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_handle_scope__ {
_unused: [u8; 0],
}
pub type napi_handle_scope = *mut napi_handle_scope__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_escapable_handle_scope__ {
_unused: [u8; 0],
}
pub type napi_escapable_handle_scope = *mut napi_escapable_handle_scope__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_callback_info__ {
_unused: [u8; 0],
}
pub type napi_callback_info = *mut napi_callback_info__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_deferred__ {
_unused: [u8; 0],
}
pub type napi_deferred = *mut napi_deferred__;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_property_attributes {
napi_default = 0,
napi_writable = 1,
napi_enumerable = 2,
napi_configurable = 4,
napi_static = 1024,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_valuetype {
napi_undefined = 0,
napi_null = 1,
napi_boolean = 2,
napi_number = 3,
napi_string = 4,
napi_symbol = 5,
napi_object = 6,
napi_function = 7,
napi_external = 8,
napi_bigint = 9,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_typedarray_type {
napi_int8_array = 0,
napi_uint8_array = 1,
napi_uint8_clamped_array = 2,
napi_int16_array = 3,
napi_uint16_array = 4,
napi_int32_array = 5,
napi_uint32_array = 6,
napi_float32_array = 7,
napi_float64_array = 8,
napi_bigint64_array = 9,
napi_biguint64_array = 10,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_status {
napi_ok = 0,
napi_invalid_arg = 1,
napi_object_expected = 2,
napi_string_expected = 3,
napi_name_expected = 4,
napi_function_expected = 5,
napi_number_expected = 6,
napi_boolean_expected = 7,
napi_array_expected = 8,
napi_generic_failure = 9,
napi_pending_exception = 10,
napi_cancelled = 11,
napi_escape_called_twice = 12,
napi_handle_scope_mismatch = 13,
napi_callback_scope_mismatch = 14,
napi_queue_full = 15,
napi_closing = 16,
napi_bigint_expected = 17,
napi_date_expected = 18,
napi_arraybuffer_expected = 19,
napi_detachable_arraybuffer_expected = 20,
}
pub type napi_callback = ::std::option::Option<
unsafe extern "C" fn(env: napi_env, info: napi_callback_info) -> napi_value,
>;
pub type napi_finalize = ::std::option::Option<
unsafe extern "C" fn(
env: napi_env,
finalize_data: *mut ::std::os::raw::c_void,
finalize_hint: *mut ::std::os::raw::c_void,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_property_descriptor {
pub utf8name: *const ::std::os::raw::c_char,
pub name: napi_value,
pub method: napi_callback,
pub getter: napi_callback,
pub setter: napi_callback,
pub value: napi_value,
pub attributes: napi_property_attributes,
pub data: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_napi_property_descriptor() {
assert_eq!(
::std::mem::size_of::<napi_property_descriptor>(),
64usize,
concat!("Size of: ", stringify!(napi_property_descriptor))
);
assert_eq!(
::std::mem::align_of::<napi_property_descriptor>(),
8usize,
concat!("Alignment of ", stringify!(napi_property_descriptor))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<napi_property_descriptor>())).utf8name as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(napi_property_descriptor),
"::",
stringify!(utf8name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_property_descriptor>())).name as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(napi_property_descriptor),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_property_descriptor>())).method as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(napi_property_descriptor),
"::",
stringify!(method)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_property_descriptor>())).getter as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(napi_property_descriptor),
"::",
stringify!(getter)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_property_descriptor>())).setter as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(napi_property_descriptor),
"::",
stringify!(setter)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_property_descriptor>())).value as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(napi_property_descriptor),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<napi_property_descriptor>())).attributes as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(napi_property_descriptor),
"::",
stringify!(attributes)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_property_descriptor>())).data as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(napi_property_descriptor),
"::",
stringify!(data)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_extended_error_info {
pub error_message: *const ::std::os::raw::c_char,
pub engine_reserved: *mut ::std::os::raw::c_void,
pub engine_error_code: u32,
pub error_code: napi_status,
}
#[test]
fn bindgen_test_layout_napi_extended_error_info() {
assert_eq!(
::std::mem::size_of::<napi_extended_error_info>(),
24usize,
concat!("Size of: ", stringify!(napi_extended_error_info))
);
assert_eq!(
::std::mem::align_of::<napi_extended_error_info>(),
8usize,
concat!("Alignment of ", stringify!(napi_extended_error_info))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<napi_extended_error_info>())).error_message as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(napi_extended_error_info),
"::",
stringify!(error_message)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<napi_extended_error_info>())).engine_reserved as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(napi_extended_error_info),
"::",
stringify!(engine_reserved)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<napi_extended_error_info>())).engine_error_code as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(napi_extended_error_info),
"::",
stringify!(engine_error_code)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<napi_extended_error_info>())).error_code as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(napi_extended_error_info),
"::",
stringify!(error_code)
)
);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_key_collection_mode {
napi_key_include_prototypes = 0,
napi_key_own_only = 1,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_key_filter {
napi_key_all_properties = 0,
napi_key_writable = 1,
napi_key_enumerable = 2,
napi_key_configurable = 4,
napi_key_skip_strings = 8,
napi_key_skip_symbols = 16,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_key_conversion {
napi_key_keep_numbers = 0,
napi_key_numbers_to_strings = 1,
}
extern "C" {
pub fn napi_get_last_error_info(
env: napi_env,
result: *mut *const napi_extended_error_info,
) -> napi_status;
}
extern "C" {
pub fn napi_get_undefined(env: napi_env, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_get_null(env: napi_env, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_get_global(env: napi_env, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_get_boolean(env: napi_env, value: bool, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_create_object(env: napi_env, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_create_array(env: napi_env, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_create_array_with_length(
env: napi_env,
length: size_t,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_double(env: napi_env, value: f64, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_create_int32(env: napi_env, value: i32, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_create_uint32(env: napi_env, value: u32, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_create_int64(env: napi_env, value: i64, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_create_string_latin1(
env: napi_env,
str_: *const ::std::os::raw::c_char,
length: size_t,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_string_utf8(
env: napi_env,
str_: *const ::std::os::raw::c_char,
length: size_t,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_string_utf16(
env: napi_env,
str_: *const char16_t,
length: size_t,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_symbol(
env: napi_env,
description: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_function(
env: napi_env,
utf8name: *const ::std::os::raw::c_char,
length: size_t,
cb: napi_callback,
data: *mut ::std::os::raw::c_void,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_error(
env: napi_env,
code: napi_value,
msg: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_type_error(
env: napi_env,
code: napi_value,
msg: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_range_error(
env: napi_env,
code: napi_value,
msg: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_typeof(
env: napi_env,
value: napi_value,
result: *mut napi_valuetype,
) -> napi_status;
}
extern "C" {
pub fn napi_get_value_double(env: napi_env, value: napi_value, result: *mut f64)
-> napi_status;
}
extern "C" {
pub fn napi_get_value_int32(env: napi_env, value: napi_value, result: *mut i32) -> napi_status;
}
extern "C" {
pub fn napi_get_value_uint32(env: napi_env, value: napi_value, result: *mut u32)
-> napi_status;
}
extern "C" {
pub fn napi_get_value_int64(env: napi_env, value: napi_value, result: *mut i64) -> napi_status;
}
extern "C" {
pub fn napi_get_value_bool(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_get_value_string_latin1(
env: napi_env,
value: napi_value,
buf: *mut ::std::os::raw::c_char,
bufsize: size_t,
result: *mut size_t,
) -> napi_status;
}
extern "C" {
pub fn napi_get_value_string_utf8(
env: napi_env,
value: napi_value,
buf: *mut ::std::os::raw::c_char,
bufsize: size_t,
result: *mut size_t,
) -> napi_status;
}
extern "C" {
pub fn napi_get_value_string_utf16(
env: napi_env,
value: napi_value,
buf: *mut char16_t,
bufsize: size_t,
result: *mut size_t,
) -> napi_status;
}
extern "C" {
pub fn napi_coerce_to_bool(
env: napi_env,
value: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_coerce_to_number(
env: napi_env,
value: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_coerce_to_object(
env: napi_env,
value: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_coerce_to_string(
env: napi_env,
value: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_get_prototype(
env: napi_env,
object: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_get_property_names(
env: napi_env,
object: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_set_property(
env: napi_env,
object: napi_value,
key: napi_value,
value: napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_has_property(
env: napi_env,
object: napi_value,
key: napi_value,
result: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_get_property(
env: napi_env,
object: napi_value,
key: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_delete_property(
env: napi_env,
object: napi_value,
key: napi_value,
result: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_has_own_property(
env: napi_env,
object: napi_value,
key: napi_value,
result: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_set_named_property(
env: napi_env,
object: napi_value,
utf8name: *const ::std::os::raw::c_char,
value: napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_has_named_property(
env: napi_env,
object: napi_value,
utf8name: *const ::std::os::raw::c_char,
result: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_get_named_property(
env: napi_env,
object: napi_value,
utf8name: *const ::std::os::raw::c_char,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_set_element(
env: napi_env,
object: napi_value,
index: u32,
value: napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_has_element(
env: napi_env,
object: napi_value,
index: u32,
result: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_get_element(
env: napi_env,
object: napi_value,
index: u32,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_delete_element(
env: napi_env,
object: napi_value,
index: u32,
result: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_define_properties(
env: napi_env,
object: napi_value,
property_count: size_t,
properties: *const napi_property_descriptor,
) -> napi_status;
}
extern "C" {
pub fn napi_is_array(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_get_array_length(env: napi_env, value: napi_value, result: *mut u32)
-> napi_status;
}
extern "C" {
pub fn napi_strict_equals(
env: napi_env,
lhs: napi_value,
rhs: napi_value,
result: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_call_function(
env: napi_env,
recv: napi_value,
func: napi_value,
argc: size_t,
argv: *const napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_new_instance(
env: napi_env,
constructor: napi_value,
argc: size_t,
argv: *const napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_instanceof(
env: napi_env,
object: napi_value,
constructor: napi_value,
result: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_get_cb_info(
env: napi_env,
cbinfo: napi_callback_info,
argc: *mut size_t,
argv: *mut napi_value,
this_arg: *mut napi_value,
data: *mut *mut ::std::os::raw::c_void,
) -> napi_status;
}
extern "C" {
pub fn napi_get_new_target(
env: napi_env,
cbinfo: napi_callback_info,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_define_class(
env: napi_env,
utf8name: *const ::std::os::raw::c_char,
length: size_t,
constructor: napi_callback,
data: *mut ::std::os::raw::c_void,
property_count: size_t,
properties: *const napi_property_descriptor,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_wrap(
env: napi_env,
js_object: napi_value,
native_object: *mut ::std::os::raw::c_void,
finalize_cb: napi_finalize,
finalize_hint: *mut ::std::os::raw::c_void,
result: *mut napi_ref,
) -> napi_status;
}
extern "C" {
pub fn napi_unwrap(
env: napi_env,
js_object: napi_value,
result: *mut *mut ::std::os::raw::c_void,
) -> napi_status;
}
extern "C" {
pub fn napi_remove_wrap(
env: napi_env,
js_object: napi_value,
result: *mut *mut ::std::os::raw::c_void,
) -> napi_status;
}
extern "C" {
pub fn napi_create_external(
env: napi_env,
data: *mut ::std::os::raw::c_void,
finalize_cb: napi_finalize,
finalize_hint: *mut ::std::os::raw::c_void,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_get_value_external(
env: napi_env,
value: napi_value,
result: *mut *mut ::std::os::raw::c_void,
) -> napi_status;
}
extern "C" {
pub fn napi_create_reference(
env: napi_env,
value: napi_value,
initial_refcount: u32,
result: *mut napi_ref,
) -> napi_status;
}
extern "C" {
pub fn napi_delete_reference(env: napi_env, ref_: napi_ref) -> napi_status;
}
extern "C" {
pub fn napi_reference_ref(env: napi_env, ref_: napi_ref, result: *mut u32) -> napi_status;
}
extern "C" {
pub fn napi_reference_unref(env: napi_env, ref_: napi_ref, result: *mut u32) -> napi_status;
}
extern "C" {
pub fn napi_get_reference_value(
env: napi_env,
ref_: napi_ref,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_open_handle_scope(env: napi_env, result: *mut napi_handle_scope) -> napi_status;
}
extern "C" {
pub fn napi_close_handle_scope(env: napi_env, scope: napi_handle_scope) -> napi_status;
}
extern "C" {
pub fn napi_open_escapable_handle_scope(
env: napi_env,
result: *mut napi_escapable_handle_scope,
) -> napi_status;
}
extern "C" {
pub fn napi_close_escapable_handle_scope(
env: napi_env,
scope: napi_escapable_handle_scope,
) -> napi_status;
}
extern "C" {
pub fn napi_escape_handle(
env: napi_env,
scope: napi_escapable_handle_scope,
escapee: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_throw(env: napi_env, error: napi_value) -> napi_status;
}
extern "C" {
pub fn napi_throw_error(
env: napi_env,
code: *const ::std::os::raw::c_char,
msg: *const ::std::os::raw::c_char,
) -> napi_status;
}
extern "C" {
pub fn napi_throw_type_error(
env: napi_env,
code: *const ::std::os::raw::c_char,
msg: *const ::std::os::raw::c_char,
) -> napi_status;
}
extern "C" {
pub fn napi_throw_range_error(
env: napi_env,
code: *const ::std::os::raw::c_char,
msg: *const ::std::os::raw::c_char,
) -> napi_status;
}
extern "C" {
pub fn napi_is_error(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_is_exception_pending(env: napi_env, result: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_get_and_clear_last_exception(env: napi_env, result: *mut napi_value)
-> napi_status;
}
extern "C" {
pub fn napi_is_arraybuffer(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_create_arraybuffer(
env: napi_env,
byte_length: size_t,
data: *mut *mut ::std::os::raw::c_void,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_external_arraybuffer(
env: napi_env,
external_data: *mut ::std::os::raw::c_void,
byte_length: size_t,
finalize_cb: napi_finalize,
finalize_hint: *mut ::std::os::raw::c_void,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_get_arraybuffer_info(
env: napi_env,
arraybuffer: napi_value,
data: *mut *mut ::std::os::raw::c_void,
byte_length: *mut size_t,
) -> napi_status;
}
extern "C" {
pub fn napi_is_typedarray(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_create_typedarray(
env: napi_env,
type_: napi_typedarray_type,
length: size_t,
arraybuffer: napi_value,
byte_offset: size_t,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_get_typedarray_info(
env: napi_env,
typedarray: napi_value,
type_: *mut napi_typedarray_type,
length: *mut size_t,
data: *mut *mut ::std::os::raw::c_void,
arraybuffer: *mut napi_value,
byte_offset: *mut size_t,
) -> napi_status;
}
extern "C" {
pub fn napi_create_dataview(
env: napi_env,
length: size_t,
arraybuffer: napi_value,
byte_offset: size_t,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_is_dataview(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_get_dataview_info(
env: napi_env,
dataview: napi_value,
bytelength: *mut size_t,
data: *mut *mut ::std::os::raw::c_void,
arraybuffer: *mut napi_value,
byte_offset: *mut size_t,
) -> napi_status;
}
extern "C" {
pub fn napi_get_version(env: napi_env, result: *mut u32) -> napi_status;
}
extern "C" {
pub fn napi_create_promise(
env: napi_env,
deferred: *mut napi_deferred,
promise: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_resolve_deferred(
env: napi_env,
deferred: napi_deferred,
resolution: napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_reject_deferred(
env: napi_env,
deferred: napi_deferred,
rejection: napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_is_promise(env: napi_env, value: napi_value, is_promise: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_run_script(
env: napi_env,
script: napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_adjust_external_memory(
env: napi_env,
change_in_bytes: i64,
adjusted_value: *mut i64,
) -> napi_status;
}
extern "C" {
pub fn napi_create_date(env: napi_env, time: f64, result: *mut napi_value) -> napi_status;
}
extern "C" {
pub fn napi_is_date(env: napi_env, value: napi_value, is_date: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_get_date_value(env: napi_env, value: napi_value, result: *mut f64) -> napi_status;
}
extern "C" {
pub fn napi_add_finalizer(
env: napi_env,
js_object: napi_value,
native_object: *mut ::std::os::raw::c_void,
finalize_cb: napi_finalize,
finalize_hint: *mut ::std::os::raw::c_void,
result: *mut napi_ref,
) -> napi_status;
}
extern "C" {
pub fn napi_create_bigint_int64(
env: napi_env,
value: i64,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_bigint_uint64(
env: napi_env,
value: u64,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_bigint_words(
env: napi_env,
sign_bit: ::std::os::raw::c_int,
word_count: size_t,
words: *const u64,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_get_value_bigint_int64(
env: napi_env,
value: napi_value,
result: *mut i64,
lossless: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_get_value_bigint_uint64(
env: napi_env,
value: napi_value,
result: *mut u64,
lossless: *mut bool,
) -> napi_status;
}
extern "C" {
pub fn napi_get_value_bigint_words(
env: napi_env,
value: napi_value,
sign_bit: *mut ::std::os::raw::c_int,
word_count: *mut size_t,
words: *mut u64,
) -> napi_status;
}
extern "C" {
pub fn napi_get_all_property_names(
env: napi_env,
object: napi_value,
key_mode: napi_key_collection_mode,
key_filter: napi_key_filter,
key_conversion: napi_key_conversion,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_set_instance_data(
env: napi_env,
data: *mut ::std::os::raw::c_void,
finalize_cb: napi_finalize,
finalize_hint: *mut ::std::os::raw::c_void,
) -> napi_status;
}
extern "C" {
pub fn napi_get_instance_data(
env: napi_env,
data: *mut *mut ::std::os::raw::c_void,
) -> napi_status;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_callback_scope__ {
_unused: [u8; 0],
}
pub type napi_callback_scope = *mut napi_callback_scope__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_async_context__ {
_unused: [u8; 0],
}
pub type napi_async_context = *mut napi_async_context__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_async_work__ {
_unused: [u8; 0],
}
pub type napi_async_work = *mut napi_async_work__;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_threadsafe_function__ {
_unused: [u8; 0],
}
pub type napi_threadsafe_function = *mut napi_threadsafe_function__;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_threadsafe_function_release_mode {
napi_tsfn_release = 0,
napi_tsfn_abort = 1,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum napi_threadsafe_function_call_mode {
napi_tsfn_nonblocking = 0,
napi_tsfn_blocking = 1,
}
pub type napi_async_execute_callback =
::std::option::Option<unsafe extern "C" fn(env: napi_env, data: *mut ::std::os::raw::c_void)>;
pub type napi_async_complete_callback = ::std::option::Option<
unsafe extern "C" fn(env: napi_env, status: napi_status, data: *mut ::std::os::raw::c_void),
>;
pub type napi_threadsafe_function_call_js = ::std::option::Option<
unsafe extern "C" fn(
env: napi_env,
js_callback: napi_value,
context: *mut ::std::os::raw::c_void,
data: *mut ::std::os::raw::c_void,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_node_version {
pub major: u32,
pub minor: u32,
pub patch: u32,
pub release: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_napi_node_version() {
assert_eq!(
::std::mem::size_of::<napi_node_version>(),
24usize,
concat!("Size of: ", stringify!(napi_node_version))
);
assert_eq!(
::std::mem::align_of::<napi_node_version>(),
8usize,
concat!("Alignment of ", stringify!(napi_node_version))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_node_version>())).major as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(napi_node_version),
"::",
stringify!(major)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_node_version>())).minor as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(napi_node_version),
"::",
stringify!(minor)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_node_version>())).patch as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(napi_node_version),
"::",
stringify!(patch)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_node_version>())).release as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(napi_node_version),
"::",
stringify!(release)
)
);
}
pub type napi_addon_register_func =
::std::option::Option<unsafe extern "C" fn(env: napi_env, exports: napi_value) -> napi_value>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_module {
pub nm_version: ::std::os::raw::c_int,
pub nm_flags: ::std::os::raw::c_uint,
pub nm_filename: *const ::std::os::raw::c_char,
pub nm_register_func: napi_addon_register_func,
pub nm_modname: *const ::std::os::raw::c_char,
pub nm_priv: *mut ::std::os::raw::c_void,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
}
#[test]
fn bindgen_test_layout_napi_module() {
assert_eq!(
::std::mem::size_of::<napi_module>(),
72usize,
concat!("Size of: ", stringify!(napi_module))
);
assert_eq!(
::std::mem::align_of::<napi_module>(),
8usize,
concat!("Alignment of ", stringify!(napi_module))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_module>())).nm_version as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(napi_module),
"::",
stringify!(nm_version)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_module>())).nm_flags as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(napi_module),
"::",
stringify!(nm_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_module>())).nm_filename as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(napi_module),
"::",
stringify!(nm_filename)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_module>())).nm_register_func as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(napi_module),
"::",
stringify!(nm_register_func)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_module>())).nm_modname as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(napi_module),
"::",
stringify!(nm_modname)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_module>())).nm_priv as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(napi_module),
"::",
stringify!(nm_priv)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<napi_module>())).reserved as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(napi_module),
"::",
stringify!(reserved)
)
);
}
extern "C" {
pub fn napi_module_register(mod_: *mut napi_module);
}
extern "C" {
pub fn napi_fatal_error(
location: *const ::std::os::raw::c_char,
location_len: size_t,
message: *const ::std::os::raw::c_char,
message_len: size_t,
);
}
extern "C" {
pub fn napi_async_init(
env: napi_env,
async_resource: napi_value,
async_resource_name: napi_value,
result: *mut napi_async_context,
) -> napi_status;
}
extern "C" {
pub fn napi_async_destroy(env: napi_env, async_context: napi_async_context) -> napi_status;
}
extern "C" {
pub fn napi_make_callback(
env: napi_env,
async_context: napi_async_context,
recv: napi_value,
func: napi_value,
argc: size_t,
argv: *const napi_value,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_buffer(
env: napi_env,
length: size_t,
data: *mut *mut ::std::os::raw::c_void,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_external_buffer(
env: napi_env,
length: size_t,
data: *mut ::std::os::raw::c_void,
finalize_cb: napi_finalize,
finalize_hint: *mut ::std::os::raw::c_void,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_create_buffer_copy(
env: napi_env,
length: size_t,
data: *const ::std::os::raw::c_void,
result_data: *mut *mut ::std::os::raw::c_void,
result: *mut napi_value,
) -> napi_status;
}
extern "C" {
pub fn napi_is_buffer(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
}
extern "C" {
pub fn napi_get_buffer_info(
env: napi_env,
value: napi_value,
data: *mut *mut ::std::os::raw::c_void,
length: *mut size_t,
) -> napi_status;
}
extern "C" {
pub fn napi_create_async_work(
env: napi_env,
async_resource: napi_value,
async_resource_name: napi_value,
execute: napi_async_execute_callback,
complete: napi_async_complete_callback,
data: *mut ::std::os::raw::c_void,
result: *mut napi_async_work,
) -> napi_status;
}
extern "C" {
pub fn napi_delete_async_work(env: napi_env, work: napi_async_work) -> napi_status;
}
extern "C" {
pub fn napi_queue_async_work(env: napi_env, work: napi_async_work) -> napi_status;
}
extern "C" {
pub fn napi_cancel_async_work(env: napi_env, work: napi_async_work) -> napi_status;
}
extern "C" {
pub fn napi_get_node_version(
env: napi_env,
version: *mut *const napi_node_version,
) -> napi_status;
}
extern "C" {
pub fn napi_get_uv_event_loop(env: napi_env, loop_: *mut *mut uv_loop_s) -> napi_status;
}
extern "C" {
pub fn napi_fatal_exception(env: napi_env, err: napi_value) -> napi_status;
}
extern "C" {
pub fn napi_add_env_cleanup_hook(
env: napi_env,
fun: ::std::option::Option<unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void)>,
arg: *mut ::std::os::raw::c_void,
) -> napi_status;
}
extern "C" {
pub fn napi_remove_env_cleanup_hook(
env: napi_env,
fun: ::std::option::Option<unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void)>,
arg: *mut ::std::os::raw::c_void,
) -> napi_status;
}
extern "C" {
pub fn napi_open_callback_scope(
env: napi_env,
resource_object: napi_value,
context: napi_async_context,
result: *mut napi_callback_scope,
) -> napi_status;
}
extern "C" {
pub fn napi_close_callback_scope(env: napi_env, scope: napi_callback_scope) -> napi_status;
}
extern "C" {
pub fn napi_create_threadsafe_function(
env: napi_env,
func: napi_value,
async_resource: napi_value,
async_resource_name: napi_value,
max_queue_size: size_t,
initial_thread_count: size_t,
thread_finalize_data: *mut ::std::os::raw::c_void,
thread_finalize_cb: napi_finalize,
context: *mut ::std::os::raw::c_void,
call_js_cb: napi_threadsafe_function_call_js,
result: *mut napi_threadsafe_function,
) -> napi_status;
}
extern "C" {
pub fn napi_get_threadsafe_function_context(
func: napi_threadsafe_function,
result: *mut *mut ::std::os::raw::c_void,
) -> napi_status;
}
extern "C" {
pub fn napi_call_threadsafe_function(
func: napi_threadsafe_function,
data: *mut ::std::os::raw::c_void,
is_blocking: napi_threadsafe_function_call_mode,
) -> napi_status;
}
extern "C" {
pub fn napi_acquire_threadsafe_function(func: napi_threadsafe_function) -> napi_status;
}
extern "C" {
pub fn napi_release_threadsafe_function(
func: napi_threadsafe_function,
mode: napi_threadsafe_function_release_mode,
) -> napi_status;
}
extern "C" {
pub fn napi_unref_threadsafe_function(
env: napi_env,
func: napi_threadsafe_function,
) -> napi_status;
}
extern "C" {
pub fn napi_ref_threadsafe_function(
env: napi_env,
func: napi_threadsafe_function,
) -> napi_status;
}
pub type FILE = _IO_FILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_marker {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_codecvt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_wide_data {
_unused: [u8; 0],
}
pub type _IO_lock_t = ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_FILE {
pub _flags: ::std::os::raw::c_int,
pub _IO_read_ptr: *mut ::std::os::raw::c_char,
pub _IO_read_end: *mut ::std::os::raw::c_char,
pub _IO_read_base: *mut ::std::os::raw::c_char,
pub _IO_write_base: *mut ::std::os::raw::c_char,
pub _IO_write_ptr: *mut ::std::os::raw::c_char,
pub _IO_write_end: *mut ::std::os::raw::c_char,
pub _IO_buf_base: *mut ::std::os::raw::c_char,
pub _IO_buf_end: *mut ::std::os::raw::c_char,
pub _IO_save_base: *mut ::std::os::raw::c_char,
pub _IO_backup_base: *mut ::std::os::raw::c_char,
pub _IO_save_end: *mut ::std::os::raw::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: ::std::os::raw::c_int,
pub _flags2: ::std::os::raw::c_int,
pub _old_offset: __off_t,
pub _cur_column: ::std::os::raw::c_ushort,
pub _vtable_offset: ::std::os::raw::c_schar,
pub _shortbuf: [::std::os::raw::c_char; 1usize],
pub _lock: *mut _IO_lock_t,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut ::std::os::raw::c_void,
pub __pad5: size_t,
pub _mode: ::std::os::raw::c_int,
pub _unused2: [::std::os::raw::c_char; 20usize],
}
#[test]
fn bindgen_test_layout__IO_FILE() {
assert_eq!(
::std::mem::size_of::<_IO_FILE>(),
216usize,
concat!("Size of: ", stringify!(_IO_FILE))
);
assert_eq!(
::std::mem::align_of::<_IO_FILE>(),
8usize,
concat!("Alignment of ", stringify!(_IO_FILE))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_backup_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_markers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_chain)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_fileno)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_old_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_cur_column)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize },
130usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_vtable_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize },
131usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_shortbuf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_codecvt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_wide_data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_list)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(__pad5)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_unused2)
)
);
}
pub type off_t = __off_t;
pub type ssize_t = __ssize_t;
pub type gid_t = __gid_t;
pub type mode_t = __mode_t;
pub type uid_t = __uid_t;
pub type pid_t = __pid_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
pub __prev: *mut __pthread_internal_list,
pub __next: *mut __pthread_internal_list,
}
#[test]
fn bindgen_test_layout___pthread_internal_list() {
assert_eq!(
::std::mem::size_of::<__pthread_internal_list>(),
16usize,
concat!("Size of: ", stringify!(__pthread_internal_list))
);
assert_eq!(
::std::mem::align_of::<__pthread_internal_list>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_internal_list))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__prev as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_list),
"::",
stringify!(__prev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__next as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_list),
"::",
stringify!(__next)
)
);
}
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
pub __lock: ::std::os::raw::c_int,
pub __count: ::std::os::raw::c_uint,
pub __owner: ::std::os::raw::c_int,
pub __nusers: ::std::os::raw::c_uint,
pub __kind: ::std::os::raw::c_int,
pub __spins: ::std::os::raw::c_short,
pub __elision: ::std::os::raw::c_short,
pub __list: __pthread_list_t,
}
#[test]
fn bindgen_test_layout___pthread_mutex_s() {
assert_eq!(
::std::mem::size_of::<__pthread_mutex_s>(),
40usize,
concat!("Size of: ", stringify!(__pthread_mutex_s))
);
assert_eq!(
::std::mem::align_of::<__pthread_mutex_s>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_mutex_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__lock as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__count as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__owner as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__owner)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__nusers as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__nusers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__kind as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__kind)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__spins as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__spins)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__elision as *const _ as usize },
22usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__elision)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__list as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__list)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_rwlock_arch_t {
pub __readers: ::std::os::raw::c_uint,
pub __writers: ::std::os::raw::c_uint,
pub __wrphase_futex: ::std::os::raw::c_uint,
pub __writers_futex: ::std::os::raw::c_uint,
pub __pad3: ::std::os::raw::c_uint,
pub __pad4: ::std::os::raw::c_uint,
pub __cur_writer: ::std::os::raw::c_int,
pub __shared: ::std::os::raw::c_int,
pub __rwelision: ::std::os::raw::c_schar,
pub __pad1: [::std::os::raw::c_uchar; 7usize],
pub __pad2: ::std::os::raw::c_ulong,
pub __flags: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout___pthread_rwlock_arch_t() {
assert_eq!(
::std::mem::size_of::<__pthread_rwlock_arch_t>(),
56usize,
concat!("Size of: ", stringify!(__pthread_rwlock_arch_t))
);
assert_eq!(
::std::mem::align_of::<__pthread_rwlock_arch_t>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__readers as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__readers)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__writers)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__wrphase_futex as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__wrphase_futex)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers_futex as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__writers_futex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad3 as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad3)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad4 as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad4)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__cur_writer as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__cur_writer)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__shared as *const _ as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__shared)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__rwelision as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__rwelision)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad1 as *const _ as usize },
33usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad1)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad2 as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__flags as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__flags)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1,
pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2,
pub __g_refs: [::std::os::raw::c_uint; 2usize],
pub __g_size: [::std::os::raw::c_uint; 2usize],
pub __g1_orig_size: ::std::os::raw::c_uint,
pub __wrefs: ::std::os::raw::c_uint,
pub __g_signals: [::std::os::raw::c_uint; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __pthread_cond_s__bindgen_ty_1 {
pub __wseq: ::std::os::raw::c_ulonglong,
pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 {
pub __low: ::std::os::raw::c_uint,
pub __high: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__low
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(__low)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__high
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(__high)
)
);
}
#[test]
fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_1),
"::",
stringify!(__wseq)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq32 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_1),
"::",
stringify!(__wseq32)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __pthread_cond_s__bindgen_ty_2 {
pub __g1_start: ::std::os::raw::c_ulonglong,
pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 {
pub __low: ::std::os::raw::c_uint,
pub __high: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__low
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(__low)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__high
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(__high)
)
);
}
#[test]
fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_2))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_2),
"::",
stringify!(__g1_start)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start32 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s__bindgen_ty_2),
"::",
stringify!(__g1_start32)
)
);
}
#[test]
fn bindgen_test_layout___pthread_cond_s() {
assert_eq!(
::std::mem::size_of::<__pthread_cond_s>(),
48usize,
concat!("Size of: ", stringify!(__pthread_cond_s))
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cond_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_refs as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_size as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g1_orig_size as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g1_orig_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__wrefs as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__wrefs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_signals as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_signals)
)
);
}
pub type pthread_t = ::std::os::raw::c_ulong;
pub type pthread_key_t = ::std::os::raw::c_uint;
pub type pthread_once_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
pub __data: __pthread_mutex_s,
pub __size: [::std::os::raw::c_char; 40usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: [u64; 5usize],
}
#[test]
fn bindgen_test_layout_pthread_mutex_t() {
assert_eq!(
::std::mem::size_of::<pthread_mutex_t>(),
40usize,
concat!("Size of: ", stringify!(pthread_mutex_t))
);
assert_eq!(
::std::mem::align_of::<pthread_mutex_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_mutex_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
pub __data: __pthread_cond_s,
pub __size: [::std::os::raw::c_char; 48usize],
pub __align: ::std::os::raw::c_longlong,
_bindgen_union_align: [u64; 6usize],
}
#[test]
fn bindgen_test_layout_pthread_cond_t() {
assert_eq!(
::std::mem::size_of::<pthread_cond_t>(),
48usize,
concat!("Size of: ", stringify!(pthread_cond_t))
);
assert_eq!(
::std::mem::align_of::<pthread_cond_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_cond_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlock_t {
pub __data: __pthread_rwlock_arch_t,
pub __size: [::std::os::raw::c_char; 56usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: [u64; 7usize],
}
#[test]
fn bindgen_test_layout_pthread_rwlock_t() {
assert_eq!(
::std::mem::size_of::<pthread_rwlock_t>(),
56usize,
concat!("Size of: ", stringify!(pthread_rwlock_t))
);
assert_eq!(
::std::mem::align_of::<pthread_rwlock_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_rwlock_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_rwlock_t>())).__data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_rwlock_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_rwlock_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrier_t {
pub __size: [::std::os::raw::c_char; 32usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_pthread_barrier_t() {
assert_eq!(
::std::mem::size_of::<pthread_barrier_t>(),
32usize,
concat!("Size of: ", stringify!(pthread_barrier_t))
);
assert_eq!(
::std::mem::align_of::<pthread_barrier_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_barrier_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_barrier_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrier_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pthread_barrier_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrier_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct dirent {
pub d_ino: __ino_t,
pub d_off: __off_t,
pub d_reclen: ::std::os::raw::c_ushort,
pub d_type: ::std::os::raw::c_uchar,
pub d_name: [::std::os::raw::c_char; 256usize],
}
#[test]
fn bindgen_test_layout_dirent() {
assert_eq!(
::std::mem::size_of::<dirent>(),
280usize,
concat!("Size of: ", stringify!(dirent))
);
assert_eq!(
::std::mem::align_of::<dirent>(),
8usize,
concat!("Alignment of ", stringify!(dirent))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<dirent>())).d_ino as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(dirent),
"::",
stringify!(d_ino)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<dirent>())).d_off as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(dirent),
"::",
stringify!(d_off)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<dirent>())).d_reclen as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(dirent),
"::",
stringify!(d_reclen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<dirent>())).d_type as *const _ as usize },
18usize,
concat!(
"Offset of field: ",
stringify!(dirent),
"::",
stringify!(d_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<dirent>())).d_name as *const _ as usize },
19usize,
concat!(
"Offset of field: ",
stringify!(dirent),
"::",
stringify!(d_name)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __dirstream {
_unused: [u8; 0],
}
pub type DIR = __dirstream;
pub type socklen_t = __socklen_t;
pub type sa_family_t = ::std::os::raw::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr {
pub sa_family: sa_family_t,
pub sa_data: [::std::os::raw::c_char; 14usize],
}
#[test]
fn bindgen_test_layout_sockaddr() {
assert_eq!(
::std::mem::size_of::<sockaddr>(),
16usize,
concat!("Size of: ", stringify!(sockaddr))
);
assert_eq!(
::std::mem::align_of::<sockaddr>(),
2usize,
concat!("Alignment of ", stringify!(sockaddr))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr>())).sa_family as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr),
"::",
stringify!(sa_family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr>())).sa_data as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr),
"::",
stringify!(sa_data)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sockaddr_storage {
pub ss_family: sa_family_t,
pub __ss_padding: [::std::os::raw::c_char; 118usize],
pub __ss_align: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_sockaddr_storage() {
assert_eq!(
::std::mem::size_of::<sockaddr_storage>(),
128usize,
concat!("Size of: ", stringify!(sockaddr_storage))
);
assert_eq!(
::std::mem::align_of::<sockaddr_storage>(),
8usize,
concat!("Alignment of ", stringify!(sockaddr_storage))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_storage>())).ss_family as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_storage),
"::",
stringify!(ss_family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_storage>())).__ss_padding as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_storage),
"::",
stringify!(__ss_padding)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_storage>())).__ss_align as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_storage),
"::",
stringify!(__ss_align)
)
);
}
pub type in_addr_t = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct in_addr {
pub s_addr: in_addr_t,
}
#[test]
fn bindgen_test_layout_in_addr() {
assert_eq!(
::std::mem::size_of::<in_addr>(),
4usize,
concat!("Size of: ", stringify!(in_addr))
);
assert_eq!(
::std::mem::align_of::<in_addr>(),
4usize,
concat!("Alignment of ", stringify!(in_addr))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<in_addr>())).s_addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(in_addr),
"::",
stringify!(s_addr)
)
);
}
pub type in_port_t = u16;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct in6_addr {
pub __in6_u: in6_addr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union in6_addr__bindgen_ty_1 {
pub __u6_addr8: [u8; 16usize],
pub __u6_addr16: [u16; 8usize],
pub __u6_addr32: [u32; 4usize],
_bindgen_union_align: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_in6_addr__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<in6_addr__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(in6_addr__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<in6_addr__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(in6_addr__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<in6_addr__bindgen_ty_1>())).__u6_addr8 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(in6_addr__bindgen_ty_1),
"::",
stringify!(__u6_addr8)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<in6_addr__bindgen_ty_1>())).__u6_addr16 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(in6_addr__bindgen_ty_1),
"::",
stringify!(__u6_addr16)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<in6_addr__bindgen_ty_1>())).__u6_addr32 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(in6_addr__bindgen_ty_1),
"::",
stringify!(__u6_addr32)
)
);
}
#[test]
fn bindgen_test_layout_in6_addr() {
assert_eq!(
::std::mem::size_of::<in6_addr>(),
16usize,
concat!("Size of: ", stringify!(in6_addr))
);
assert_eq!(
::std::mem::align_of::<in6_addr>(),
4usize,
concat!("Alignment of ", stringify!(in6_addr))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<in6_addr>())).__in6_u as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(in6_addr),
"::",
stringify!(__in6_u)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr_in {
pub sin_family: sa_family_t,
pub sin_port: in_port_t,
pub sin_addr: in_addr,
pub sin_zero: [::std::os::raw::c_uchar; 8usize],
}
#[test]
fn bindgen_test_layout_sockaddr_in() {
assert_eq!(
::std::mem::size_of::<sockaddr_in>(),
16usize,
concat!("Size of: ", stringify!(sockaddr_in))
);
assert_eq!(
::std::mem::align_of::<sockaddr_in>(),
4usize,
concat!("Alignment of ", stringify!(sockaddr_in))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in>())).sin_family as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in),
"::",
stringify!(sin_family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in>())).sin_port as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in),
"::",
stringify!(sin_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in>())).sin_addr as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in),
"::",
stringify!(sin_addr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in>())).sin_zero as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in),
"::",
stringify!(sin_zero)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sockaddr_in6 {
pub sin6_family: sa_family_t,
pub sin6_port: in_port_t,
pub sin6_flowinfo: u32,
pub sin6_addr: in6_addr,
pub sin6_scope_id: u32,
}
#[test]
fn bindgen_test_layout_sockaddr_in6() {
assert_eq!(
::std::mem::size_of::<sockaddr_in6>(),
28usize,
concat!("Size of: ", stringify!(sockaddr_in6))
);
assert_eq!(
::std::mem::align_of::<sockaddr_in6>(),
4usize,
concat!("Alignment of ", stringify!(sockaddr_in6))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in6>())).sin6_family as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in6>())).sin6_port as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in6>())).sin6_flowinfo as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_flowinfo)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in6>())).sin6_addr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_addr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sockaddr_in6>())).sin6_scope_id as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_scope_id)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct addrinfo {
pub ai_flags: ::std::os::raw::c_int,
pub ai_family: ::std::os::raw::c_int,
pub ai_socktype: ::std::os::raw::c_int,
pub ai_protocol: ::std::os::raw::c_int,
pub ai_addrlen: socklen_t,
pub ai_addr: *mut sockaddr,
pub ai_canonname: *mut ::std::os::raw::c_char,
pub ai_next: *mut addrinfo,
}
#[test]
fn bindgen_test_layout_addrinfo() {
assert_eq!(
::std::mem::size_of::<addrinfo>(),
48usize,
concat!("Size of: ", stringify!(addrinfo))
);
assert_eq!(
::std::mem::align_of::<addrinfo>(),
8usize,
concat!("Alignment of ", stringify!(addrinfo))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<addrinfo>())).ai_flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(addrinfo),
"::",
stringify!(ai_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<addrinfo>())).ai_family as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(addrinfo),
"::",
stringify!(ai_family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<addrinfo>())).ai_socktype as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(addrinfo),
"::",
stringify!(ai_socktype)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<addrinfo>())).ai_protocol as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(addrinfo),
"::",
stringify!(ai_protocol)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<addrinfo>())).ai_addrlen as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(addrinfo),
"::",
stringify!(ai_addrlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<addrinfo>())).ai_addr as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(addrinfo),
"::",
stringify!(ai_addr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<addrinfo>())).ai_canonname as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(addrinfo),
"::",
stringify!(ai_canonname)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<addrinfo>())).ai_next as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(addrinfo),
"::",
stringify!(ai_next)
)
);
}
pub type cc_t = ::std::os::raw::c_uchar;
pub type speed_t = ::std::os::raw::c_uint;
pub type tcflag_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct termios {
pub c_iflag: tcflag_t,
pub c_oflag: tcflag_t,
pub c_cflag: tcflag_t,
pub c_lflag: tcflag_t,
pub c_line: cc_t,
pub c_cc: [cc_t; 32usize],
pub c_ispeed: speed_t,
pub c_ospeed: speed_t,
}
#[test]
fn bindgen_test_layout_termios() {
assert_eq!(
::std::mem::size_of::<termios>(),
60usize,
concat!("Size of: ", stringify!(termios))
);
assert_eq!(
::std::mem::align_of::<termios>(),
4usize,
concat!("Alignment of ", stringify!(termios))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<termios>())).c_iflag as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(termios),
"::",
stringify!(c_iflag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<termios>())).c_oflag as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(termios),
"::",
stringify!(c_oflag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<termios>())).c_cflag as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(termios),
"::",
stringify!(c_cflag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<termios>())).c_lflag as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(termios),
"::",
stringify!(c_lflag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<termios>())).c_line as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(termios),
"::",
stringify!(c_line)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<termios>())).c_cc as *const _ as usize },
17usize,
concat!(
"Offset of field: ",
stringify!(termios),
"::",
stringify!(c_cc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<termios>())).c_ispeed as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(termios),
"::",
stringify!(c_ispeed)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<termios>())).c_ospeed as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(termios),
"::",
stringify!(c_ospeed)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sem_t {
pub __size: [::std::os::raw::c_char; 32usize],
pub __align: ::std::os::raw::c_long,
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_sem_t() {
assert_eq!(
::std::mem::size_of::<sem_t>(),
32usize,
concat!("Size of: ", stringify!(sem_t))
);
assert_eq!(
::std::mem::align_of::<sem_t>(),
8usize,
concat!("Alignment of ", stringify!(sem_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sem_t>())).__size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sem_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<sem_t>())).__align as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sem_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv__work {
pub work: ::std::option::Option<unsafe extern "C" fn(w: *mut uv__work)>,
pub done: ::std::option::Option<
unsafe extern "C" fn(w: *mut uv__work, status: ::std::os::raw::c_int),
>,
pub loop_: *mut uv_loop_s,
pub wq: [*mut ::std::os::raw::c_void; 2usize],
}
#[test]
fn bindgen_test_layout_uv__work() {
assert_eq!(
::std::mem::size_of::<uv__work>(),
40usize,
concat!("Size of: ", stringify!(uv__work))
);
assert_eq!(
::std::mem::align_of::<uv__work>(),
8usize,
concat!("Alignment of ", stringify!(uv__work))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__work>())).work as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv__work),
"::",
stringify!(work)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__work>())).done as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv__work),
"::",
stringify!(done)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__work>())).loop_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv__work),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__work>())).wq as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv__work),
"::",
stringify!(wq)
)
);
}
pub type uv__io_cb = ::std::option::Option<
unsafe extern "C" fn(loop_: *mut uv_loop_s, w: *mut uv__io_s, events: ::std::os::raw::c_uint),
>;
pub type uv__io_t = uv__io_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv__io_s {
pub cb: uv__io_cb,
pub pending_queue: [*mut ::std::os::raw::c_void; 2usize],
pub watcher_queue: [*mut ::std::os::raw::c_void; 2usize],
pub pevents: ::std::os::raw::c_uint,
pub events: ::std::os::raw::c_uint,
pub fd: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_uv__io_s() {
assert_eq!(
::std::mem::size_of::<uv__io_s>(),
56usize,
concat!("Size of: ", stringify!(uv__io_s))
);
assert_eq!(
::std::mem::align_of::<uv__io_s>(),
8usize,
concat!("Alignment of ", stringify!(uv__io_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__io_s>())).cb as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv__io_s),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__io_s>())).pending_queue as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv__io_s),
"::",
stringify!(pending_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__io_s>())).watcher_queue as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv__io_s),
"::",
stringify!(watcher_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__io_s>())).pevents as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(uv__io_s),
"::",
stringify!(pevents)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__io_s>())).events as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(uv__io_s),
"::",
stringify!(events)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv__io_s>())).fd as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv__io_s),
"::",
stringify!(fd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_buf_t {
pub base: *mut ::std::os::raw::c_char,
pub len: size_t,
}
#[test]
fn bindgen_test_layout_uv_buf_t() {
assert_eq!(
::std::mem::size_of::<uv_buf_t>(),
16usize,
concat!("Size of: ", stringify!(uv_buf_t))
);
assert_eq!(
::std::mem::align_of::<uv_buf_t>(),
8usize,
concat!("Alignment of ", stringify!(uv_buf_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_buf_t>())).base as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_buf_t),
"::",
stringify!(base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_buf_t>())).len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_buf_t),
"::",
stringify!(len)
)
);
}
pub type uv_file = ::std::os::raw::c_int;
pub type uv_os_sock_t = ::std::os::raw::c_int;
pub type uv_os_fd_t = ::std::os::raw::c_int;
pub type uv_pid_t = pid_t;
pub type uv_once_t = pthread_once_t;
pub type uv_thread_t = pthread_t;
pub type uv_mutex_t = pthread_mutex_t;
pub type uv_rwlock_t = pthread_rwlock_t;
pub type uv_sem_t = sem_t;
pub type uv_cond_t = pthread_cond_t;
pub type uv_key_t = pthread_key_t;
pub type uv_barrier_t = pthread_barrier_t;
pub type uv_gid_t = gid_t;
pub type uv_uid_t = uid_t;
pub type uv__dirent_t = dirent;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_lib_t {
pub handle: *mut ::std::os::raw::c_void,
pub errmsg: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_uv_lib_t() {
assert_eq!(
::std::mem::size_of::<uv_lib_t>(),
16usize,
concat!("Size of: ", stringify!(uv_lib_t))
);
assert_eq!(
::std::mem::align_of::<uv_lib_t>(),
8usize,
concat!("Alignment of ", stringify!(uv_lib_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_lib_t>())).handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_lib_t),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_lib_t>())).errmsg as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_lib_t),
"::",
stringify!(errmsg)
)
);
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_errno_t {
UV_E2BIG = -7,
UV_EACCES = -13,
UV_EADDRINUSE = -98,
UV_EADDRNOTAVAIL = -99,
UV_EAFNOSUPPORT = -97,
UV_EAGAIN = -11,
UV_EAI_ADDRFAMILY = -3000,
UV_EAI_AGAIN = -3001,
UV_EAI_BADFLAGS = -3002,
UV_EAI_BADHINTS = -3013,
UV_EAI_CANCELED = -3003,
UV_EAI_FAIL = -3004,
UV_EAI_FAMILY = -3005,
UV_EAI_MEMORY = -3006,
UV_EAI_NODATA = -3007,
UV_EAI_NONAME = -3008,
UV_EAI_OVERFLOW = -3009,
UV_EAI_PROTOCOL = -3014,
UV_EAI_SERVICE = -3010,
UV_EAI_SOCKTYPE = -3011,
UV_EALREADY = -114,
UV_EBADF = -9,
UV_EBUSY = -16,
UV_ECANCELED = -125,
UV_ECHARSET = -4080,
UV_ECONNABORTED = -103,
UV_ECONNREFUSED = -111,
UV_ECONNRESET = -104,
UV_EDESTADDRREQ = -89,
UV_EEXIST = -17,
UV_EFAULT = -14,
UV_EFBIG = -27,
UV_EHOSTUNREACH = -113,
UV_EINTR = -4,
UV_EINVAL = -22,
UV_EIO = -5,
UV_EISCONN = -106,
UV_EISDIR = -21,
UV_ELOOP = -40,
UV_EMFILE = -24,
UV_EMSGSIZE = -90,
UV_ENAMETOOLONG = -36,
UV_ENETDOWN = -100,
UV_ENETUNREACH = -101,
UV_ENFILE = -23,
UV_ENOBUFS = -105,
UV_ENODEV = -19,
UV_ENOENT = -2,
UV_ENOMEM = -12,
UV_ENONET = -64,
UV_ENOPROTOOPT = -92,
UV_ENOSPC = -28,
UV_ENOSYS = -38,
UV_ENOTCONN = -107,
UV_ENOTDIR = -20,
UV_ENOTEMPTY = -39,
UV_ENOTSOCK = -88,
UV_ENOTSUP = -95,
UV_EPERM = -1,
UV_EPIPE = -32,
UV_EPROTO = -71,
UV_EPROTONOSUPPORT = -93,
UV_EPROTOTYPE = -91,
UV_ERANGE = -34,
UV_EROFS = -30,
UV_ESHUTDOWN = -108,
UV_ESPIPE = -29,
UV_ESRCH = -3,
UV_ETIMEDOUT = -110,
UV_ETXTBSY = -26,
UV_EXDEV = -18,
UV_UNKNOWN = -4094,
UV_EOF = -4095,
UV_ENXIO = -6,
UV_EMLINK = -31,
UV_EHOSTDOWN = -112,
UV_EREMOTEIO = -121,
UV_ENOTTY = -25,
UV_EFTYPE = -4028,
UV_EILSEQ = -84,
UV_ERRNO_MAX = -4096,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_handle_type {
UV_UNKNOWN_HANDLE = 0,
UV_ASYNC = 1,
UV_CHECK = 2,
UV_FS_EVENT = 3,
UV_FS_POLL = 4,
UV_HANDLE = 5,
UV_IDLE = 6,
UV_NAMED_PIPE = 7,
UV_POLL = 8,
UV_PREPARE = 9,
UV_PROCESS = 10,
UV_STREAM = 11,
UV_TCP = 12,
UV_TIMER = 13,
UV_TTY = 14,
UV_UDP = 15,
UV_SIGNAL = 16,
UV_FILE = 17,
UV_HANDLE_TYPE_MAX = 18,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_req_type {
UV_UNKNOWN_REQ = 0,
UV_REQ = 1,
UV_CONNECT = 2,
UV_WRITE = 3,
UV_SHUTDOWN = 4,
UV_UDP_SEND = 5,
UV_FS = 6,
UV_WORK = 7,
UV_GETADDRINFO = 8,
UV_GETNAMEINFO = 9,
UV_RANDOM = 10,
UV_REQ_TYPE_MAX = 11,
}
pub type uv_loop_t = uv_loop_s;
pub type uv_handle_t = uv_handle_s;
pub type uv_dir_t = uv_dir_s;
pub type uv_stream_t = uv_stream_s;
pub type uv_tcp_t = uv_tcp_s;
pub type uv_udp_t = uv_udp_s;
pub type uv_pipe_t = uv_pipe_s;
pub type uv_tty_t = uv_tty_s;
pub type uv_poll_t = uv_poll_s;
pub type uv_timer_t = uv_timer_s;
pub type uv_prepare_t = uv_prepare_s;
pub type uv_check_t = uv_check_s;
pub type uv_idle_t = uv_idle_s;
pub type uv_async_t = uv_async_s;
pub type uv_process_t = uv_process_s;
pub type uv_fs_event_t = uv_fs_event_s;
pub type uv_fs_poll_t = uv_fs_poll_s;
pub type uv_signal_t = uv_signal_s;
pub type uv_req_t = uv_req_s;
pub type uv_getaddrinfo_t = uv_getaddrinfo_s;
pub type uv_getnameinfo_t = uv_getnameinfo_s;
pub type uv_shutdown_t = uv_shutdown_s;
pub type uv_write_t = uv_write_s;
pub type uv_connect_t = uv_connect_s;
pub type uv_udp_send_t = uv_udp_send_s;
pub type uv_fs_t = uv_fs_s;
pub type uv_work_t = uv_work_s;
pub type uv_random_t = uv_random_s;
pub type uv_env_item_t = uv_env_item_s;
pub type uv_cpu_info_t = uv_cpu_info_s;
pub type uv_interface_address_t = uv_interface_address_s;
pub type uv_dirent_t = uv_dirent_s;
pub type uv_passwd_t = uv_passwd_s;
pub type uv_utsname_t = uv_utsname_s;
pub type uv_statfs_t = uv_statfs_s;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_loop_option {
UV_LOOP_BLOCK_SIGNAL = 0,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_run_mode {
UV_RUN_DEFAULT = 0,
UV_RUN_ONCE = 1,
UV_RUN_NOWAIT = 2,
}
extern "C" {
pub fn uv_version() -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn uv_version_string() -> *const ::std::os::raw::c_char;
}
pub type uv_malloc_func =
::std::option::Option<unsafe extern "C" fn(size: size_t) -> *mut ::std::os::raw::c_void>;
pub type uv_realloc_func = ::std::option::Option<
unsafe extern "C" fn(
ptr: *mut ::std::os::raw::c_void,
size: size_t,
) -> *mut ::std::os::raw::c_void,
>;
pub type uv_calloc_func = ::std::option::Option<
unsafe extern "C" fn(count: size_t, size: size_t) -> *mut ::std::os::raw::c_void,
>;
pub type uv_free_func =
::std::option::Option<unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void)>;
extern "C" {
pub fn uv_library_shutdown();
}
extern "C" {
pub fn uv_replace_allocator(
malloc_func: uv_malloc_func,
realloc_func: uv_realloc_func,
calloc_func: uv_calloc_func,
free_func: uv_free_func,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_default_loop() -> *mut uv_loop_t;
}
extern "C" {
pub fn uv_loop_init(loop_: *mut uv_loop_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_loop_close(loop_: *mut uv_loop_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_loop_new() -> *mut uv_loop_t;
}
extern "C" {
pub fn uv_loop_delete(arg1: *mut uv_loop_t);
}
extern "C" {
pub fn uv_loop_size() -> size_t;
}
extern "C" {
pub fn uv_loop_alive(loop_: *const uv_loop_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_loop_configure(
loop_: *mut uv_loop_t,
option: uv_loop_option,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_loop_fork(loop_: *mut uv_loop_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_run(arg1: *mut uv_loop_t, mode: uv_run_mode) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_stop(arg1: *mut uv_loop_t);
}
extern "C" {
pub fn uv_ref(arg1: *mut uv_handle_t);
}
extern "C" {
pub fn uv_unref(arg1: *mut uv_handle_t);
}
extern "C" {
pub fn uv_has_ref(arg1: *const uv_handle_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_update_time(arg1: *mut uv_loop_t);
}
extern "C" {
pub fn uv_now(arg1: *const uv_loop_t) -> u64;
}
extern "C" {
pub fn uv_backend_fd(arg1: *const uv_loop_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_backend_timeout(arg1: *const uv_loop_t) -> ::std::os::raw::c_int;
}
pub type uv_alloc_cb = ::std::option::Option<
unsafe extern "C" fn(handle: *mut uv_handle_t, suggested_size: size_t, buf: *mut uv_buf_t),
>;
pub type uv_read_cb = ::std::option::Option<
unsafe extern "C" fn(stream: *mut uv_stream_t, nread: ssize_t, buf: *const uv_buf_t),
>;
pub type uv_write_cb = ::std::option::Option<
unsafe extern "C" fn(req: *mut uv_write_t, status: ::std::os::raw::c_int),
>;
pub type uv_connect_cb = ::std::option::Option<
unsafe extern "C" fn(req: *mut uv_connect_t, status: ::std::os::raw::c_int),
>;
pub type uv_shutdown_cb = ::std::option::Option<
unsafe extern "C" fn(req: *mut uv_shutdown_t, status: ::std::os::raw::c_int),
>;
pub type uv_connection_cb = ::std::option::Option<
unsafe extern "C" fn(server: *mut uv_stream_t, status: ::std::os::raw::c_int),
>;
pub type uv_close_cb = ::std::option::Option<unsafe extern "C" fn(handle: *mut uv_handle_t)>;
pub type uv_poll_cb = ::std::option::Option<
unsafe extern "C" fn(
handle: *mut uv_poll_t,
status: ::std::os::raw::c_int,
events: ::std::os::raw::c_int,
),
>;
pub type uv_timer_cb = ::std::option::Option<unsafe extern "C" fn(handle: *mut uv_timer_t)>;
pub type uv_async_cb = ::std::option::Option<unsafe extern "C" fn(handle: *mut uv_async_t)>;
pub type uv_prepare_cb = ::std::option::Option<unsafe extern "C" fn(handle: *mut uv_prepare_t)>;
pub type uv_check_cb = ::std::option::Option<unsafe extern "C" fn(handle: *mut uv_check_t)>;
pub type uv_idle_cb = ::std::option::Option<unsafe extern "C" fn(handle: *mut uv_idle_t)>;
pub type uv_exit_cb = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut uv_process_t,
exit_status: i64,
term_signal: ::std::os::raw::c_int,
),
>;
pub type uv_walk_cb = ::std::option::Option<
unsafe extern "C" fn(handle: *mut uv_handle_t, arg: *mut ::std::os::raw::c_void),
>;
pub type uv_fs_cb = ::std::option::Option<unsafe extern "C" fn(req: *mut uv_fs_t)>;
pub type uv_work_cb = ::std::option::Option<unsafe extern "C" fn(req: *mut uv_work_t)>;
pub type uv_after_work_cb =
::std::option::Option<unsafe extern "C" fn(req: *mut uv_work_t, status: ::std::os::raw::c_int)>;
pub type uv_getaddrinfo_cb = ::std::option::Option<
unsafe extern "C" fn(
req: *mut uv_getaddrinfo_t,
status: ::std::os::raw::c_int,
res: *mut addrinfo,
),
>;
pub type uv_getnameinfo_cb = ::std::option::Option<
unsafe extern "C" fn(
req: *mut uv_getnameinfo_t,
status: ::std::os::raw::c_int,
hostname: *const ::std::os::raw::c_char,
service: *const ::std::os::raw::c_char,
),
>;
pub type uv_random_cb = ::std::option::Option<
unsafe extern "C" fn(
req: *mut uv_random_t,
status: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_void,
buflen: size_t,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_timespec_t {
pub tv_sec: ::std::os::raw::c_long,
pub tv_nsec: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_uv_timespec_t() {
assert_eq!(
::std::mem::size_of::<uv_timespec_t>(),
16usize,
concat!("Size of: ", stringify!(uv_timespec_t))
);
assert_eq!(
::std::mem::align_of::<uv_timespec_t>(),
8usize,
concat!("Alignment of ", stringify!(uv_timespec_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timespec_t>())).tv_sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_timespec_t),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timespec_t>())).tv_nsec as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_timespec_t),
"::",
stringify!(tv_nsec)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_stat_t {
pub st_dev: u64,
pub st_mode: u64,
pub st_nlink: u64,
pub st_uid: u64,
pub st_gid: u64,
pub st_rdev: u64,
pub st_ino: u64,
pub st_size: u64,
pub st_blksize: u64,
pub st_blocks: u64,
pub st_flags: u64,
pub st_gen: u64,
pub st_atim: uv_timespec_t,
pub st_mtim: uv_timespec_t,
pub st_ctim: uv_timespec_t,
pub st_birthtim: uv_timespec_t,
}
#[test]
fn bindgen_test_layout_uv_stat_t() {
assert_eq!(
::std::mem::size_of::<uv_stat_t>(),
160usize,
concat!("Size of: ", stringify!(uv_stat_t))
);
assert_eq!(
::std::mem::align_of::<uv_stat_t>(),
8usize,
concat!("Alignment of ", stringify!(uv_stat_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_dev as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_dev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_mode as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_nlink as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_nlink)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_uid as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_uid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_gid as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_gid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_rdev as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_rdev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_ino as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_ino)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_size as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_blksize as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_blksize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_blocks as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_blocks)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_flags as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_gen as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_gen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_atim as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_atim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_mtim as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_mtim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_ctim as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_ctim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stat_t>())).st_birthtim as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(uv_stat_t),
"::",
stringify!(st_birthtim)
)
);
}
pub type uv_fs_event_cb = ::std::option::Option<
unsafe extern "C" fn(
handle: *mut uv_fs_event_t,
filename: *const ::std::os::raw::c_char,
events: ::std::os::raw::c_int,
status: ::std::os::raw::c_int,
),
>;
pub type uv_fs_poll_cb = ::std::option::Option<
unsafe extern "C" fn(
handle: *mut uv_fs_poll_t,
status: ::std::os::raw::c_int,
prev: *const uv_stat_t,
curr: *const uv_stat_t,
),
>;
pub type uv_signal_cb = ::std::option::Option<
unsafe extern "C" fn(handle: *mut uv_signal_t, signum: ::std::os::raw::c_int),
>;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_membership {
UV_LEAVE_GROUP = 0,
UV_JOIN_GROUP = 1,
}
extern "C" {
pub fn uv_translate_sys_error(sys_errno: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_strerror(err: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn uv_strerror_r(
err: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
buflen: size_t,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn uv_err_name(err: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn uv_err_name_r(
err: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
buflen: size_t,
) -> *mut ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_req_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
}
#[test]
fn bindgen_test_layout_uv_req_s() {
assert_eq!(
::std::mem::size_of::<uv_req_s>(),
64usize,
concat!("Size of: ", stringify!(uv_req_s))
);
assert_eq!(
::std::mem::align_of::<uv_req_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_req_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_req_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_req_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_req_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_req_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_req_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_req_s),
"::",
stringify!(reserved)
)
);
}
extern "C" {
pub fn uv_shutdown(
req: *mut uv_shutdown_t,
handle: *mut uv_stream_t,
cb: uv_shutdown_cb,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_shutdown_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub handle: *mut uv_stream_t,
pub cb: uv_shutdown_cb,
}
#[test]
fn bindgen_test_layout_uv_shutdown_s() {
assert_eq!(
::std::mem::size_of::<uv_shutdown_s>(),
80usize,
concat!("Size of: ", stringify!(uv_shutdown_s))
);
assert_eq!(
::std::mem::align_of::<uv_shutdown_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_shutdown_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_shutdown_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_shutdown_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_shutdown_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_shutdown_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_shutdown_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_shutdown_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_shutdown_s>())).handle as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_shutdown_s),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_shutdown_s>())).cb as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_shutdown_s),
"::",
stringify!(cb)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_handle_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_handle_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_handle_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_handle_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_handle_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_handle_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_handle_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_handle_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_handle_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_handle_s() {
assert_eq!(
::std::mem::size_of::<uv_handle_s>(),
96usize,
concat!("Size of: ", stringify!(uv_handle_s))
);
assert_eq!(
::std::mem::align_of::<uv_handle_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_handle_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_handle_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_handle_s),
"::",
stringify!(flags)
)
);
}
extern "C" {
pub fn uv_handle_size(type_: uv_handle_type) -> size_t;
}
extern "C" {
pub fn uv_handle_get_type(handle: *const uv_handle_t) -> uv_handle_type;
}
extern "C" {
pub fn uv_handle_type_name(type_: uv_handle_type) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn uv_handle_get_data(handle: *const uv_handle_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn uv_handle_get_loop(handle: *const uv_handle_t) -> *mut uv_loop_t;
}
extern "C" {
pub fn uv_handle_set_data(handle: *mut uv_handle_t, data: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn uv_req_size(type_: uv_req_type) -> size_t;
}
extern "C" {
pub fn uv_req_get_data(req: *const uv_req_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn uv_req_set_data(req: *mut uv_req_t, data: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn uv_req_get_type(req: *const uv_req_t) -> uv_req_type;
}
extern "C" {
pub fn uv_req_type_name(type_: uv_req_type) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn uv_is_active(handle: *const uv_handle_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_walk(loop_: *mut uv_loop_t, walk_cb: uv_walk_cb, arg: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn uv_print_all_handles(loop_: *mut uv_loop_t, stream: *mut FILE);
}
extern "C" {
pub fn uv_print_active_handles(loop_: *mut uv_loop_t, stream: *mut FILE);
}
extern "C" {
pub fn uv_close(handle: *mut uv_handle_t, close_cb: uv_close_cb);
}
extern "C" {
pub fn uv_send_buffer_size(
handle: *mut uv_handle_t,
value: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_recv_buffer_size(
handle: *mut uv_handle_t,
value: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fileno(handle: *const uv_handle_t, fd: *mut uv_os_fd_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_buf_init(base: *mut ::std::os::raw::c_char, len: ::std::os::raw::c_uint) -> uv_buf_t;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_stream_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_stream_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub write_queue_size: size_t,
pub alloc_cb: uv_alloc_cb,
pub read_cb: uv_read_cb,
pub connect_req: *mut uv_connect_t,
pub shutdown_req: *mut uv_shutdown_t,
pub io_watcher: uv__io_t,
pub write_queue: [*mut ::std::os::raw::c_void; 2usize],
pub write_completed_queue: [*mut ::std::os::raw::c_void; 2usize],
pub connection_cb: uv_connection_cb,
pub delayed_error: ::std::os::raw::c_int,
pub accepted_fd: ::std::os::raw::c_int,
pub queued_fds: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_stream_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_stream_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_stream_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_stream_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_stream_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_stream_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_stream_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_stream_s() {
assert_eq!(
::std::mem::size_of::<uv_stream_s>(),
248usize,
concat!("Size of: ", stringify!(uv_stream_s))
);
assert_eq!(
::std::mem::align_of::<uv_stream_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_stream_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).write_queue_size as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(write_queue_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).alloc_cb as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(alloc_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).read_cb as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(read_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).connect_req as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(connect_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).shutdown_req as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(shutdown_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).io_watcher as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(io_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).write_queue as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(write_queue)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_stream_s>())).write_completed_queue as *const _ as usize
},
208usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(write_completed_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).connection_cb as *const _ as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(connection_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).delayed_error as *const _ as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(delayed_error)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).accepted_fd as *const _ as usize },
236usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(accepted_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stream_s>())).queued_fds as *const _ as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(uv_stream_s),
"::",
stringify!(queued_fds)
)
);
}
extern "C" {
pub fn uv_stream_get_write_queue_size(stream: *const uv_stream_t) -> size_t;
}
extern "C" {
pub fn uv_listen(
stream: *mut uv_stream_t,
backlog: ::std::os::raw::c_int,
cb: uv_connection_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_accept(server: *mut uv_stream_t, client: *mut uv_stream_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_read_start(
arg1: *mut uv_stream_t,
alloc_cb: uv_alloc_cb,
read_cb: uv_read_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_read_stop(arg1: *mut uv_stream_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_write(
req: *mut uv_write_t,
handle: *mut uv_stream_t,
bufs: *const uv_buf_t,
nbufs: ::std::os::raw::c_uint,
cb: uv_write_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_write2(
req: *mut uv_write_t,
handle: *mut uv_stream_t,
bufs: *const uv_buf_t,
nbufs: ::std::os::raw::c_uint,
send_handle: *mut uv_stream_t,
cb: uv_write_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_try_write(
handle: *mut uv_stream_t,
bufs: *const uv_buf_t,
nbufs: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_write_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub cb: uv_write_cb,
pub send_handle: *mut uv_stream_t,
pub handle: *mut uv_stream_t,
pub queue: [*mut ::std::os::raw::c_void; 2usize],
pub write_index: ::std::os::raw::c_uint,
pub bufs: *mut uv_buf_t,
pub nbufs: ::std::os::raw::c_uint,
pub error: ::std::os::raw::c_int,
pub bufsml: [uv_buf_t; 4usize],
}
#[test]
fn bindgen_test_layout_uv_write_s() {
assert_eq!(
::std::mem::size_of::<uv_write_s>(),
192usize,
concat!("Size of: ", stringify!(uv_write_s))
);
assert_eq!(
::std::mem::align_of::<uv_write_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_write_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).cb as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).send_handle as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(send_handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).handle as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).queue as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).write_index as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(write_index)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).bufs as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(bufs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).nbufs as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(nbufs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).error as *const _ as usize },
124usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_write_s>())).bufsml as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_write_s),
"::",
stringify!(bufsml)
)
);
}
extern "C" {
pub fn uv_is_readable(handle: *const uv_stream_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_is_writable(handle: *const uv_stream_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_stream_set_blocking(
handle: *mut uv_stream_t,
blocking: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_is_closing(handle: *const uv_handle_t) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_tcp_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_tcp_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub write_queue_size: size_t,
pub alloc_cb: uv_alloc_cb,
pub read_cb: uv_read_cb,
pub connect_req: *mut uv_connect_t,
pub shutdown_req: *mut uv_shutdown_t,
pub io_watcher: uv__io_t,
pub write_queue: [*mut ::std::os::raw::c_void; 2usize],
pub write_completed_queue: [*mut ::std::os::raw::c_void; 2usize],
pub connection_cb: uv_connection_cb,
pub delayed_error: ::std::os::raw::c_int,
pub accepted_fd: ::std::os::raw::c_int,
pub queued_fds: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_tcp_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_tcp_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_tcp_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_tcp_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_tcp_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_tcp_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s__bindgen_ty_1>())).reserved as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_tcp_s() {
assert_eq!(
::std::mem::size_of::<uv_tcp_s>(),
248usize,
concat!("Size of: ", stringify!(uv_tcp_s))
);
assert_eq!(
::std::mem::align_of::<uv_tcp_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_tcp_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).write_queue_size as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(write_queue_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).alloc_cb as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(alloc_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).read_cb as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(read_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).connect_req as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(connect_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).shutdown_req as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(shutdown_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).io_watcher as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(io_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).write_queue as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(write_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).write_completed_queue as *const _ as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(write_completed_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).connection_cb as *const _ as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(connection_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).delayed_error as *const _ as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(delayed_error)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).accepted_fd as *const _ as usize },
236usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(accepted_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tcp_s>())).queued_fds as *const _ as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(uv_tcp_s),
"::",
stringify!(queued_fds)
)
);
}
extern "C" {
pub fn uv_tcp_init(arg1: *mut uv_loop_t, handle: *mut uv_tcp_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_init_ex(
arg1: *mut uv_loop_t,
handle: *mut uv_tcp_t,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_open(handle: *mut uv_tcp_t, sock: uv_os_sock_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_nodelay(
handle: *mut uv_tcp_t,
enable: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_keepalive(
handle: *mut uv_tcp_t,
enable: ::std::os::raw::c_int,
delay: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_simultaneous_accepts(
handle: *mut uv_tcp_t,
enable: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_tcp_flags {
UV_TCP_IPV6ONLY = 1,
}
extern "C" {
pub fn uv_tcp_bind(
handle: *mut uv_tcp_t,
addr: *const sockaddr,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_getsockname(
handle: *const uv_tcp_t,
name: *mut sockaddr,
namelen: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_getpeername(
handle: *const uv_tcp_t,
name: *mut sockaddr,
namelen: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_close_reset(
handle: *mut uv_tcp_t,
close_cb: uv_close_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tcp_connect(
req: *mut uv_connect_t,
handle: *mut uv_tcp_t,
addr: *const sockaddr,
cb: uv_connect_cb,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_connect_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub cb: uv_connect_cb,
pub handle: *mut uv_stream_t,
pub queue: [*mut ::std::os::raw::c_void; 2usize],
}
#[test]
fn bindgen_test_layout_uv_connect_s() {
assert_eq!(
::std::mem::size_of::<uv_connect_s>(),
96usize,
concat!("Size of: ", stringify!(uv_connect_s))
);
assert_eq!(
::std::mem::align_of::<uv_connect_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_connect_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_connect_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_connect_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_connect_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_connect_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_connect_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_connect_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_connect_s>())).cb as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_connect_s),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_connect_s>())).handle as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_connect_s),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_connect_s>())).queue as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_connect_s),
"::",
stringify!(queue)
)
);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_udp_flags {
UV_UDP_IPV6ONLY = 1,
UV_UDP_PARTIAL = 2,
UV_UDP_REUSEADDR = 4,
UV_UDP_MMSG_CHUNK = 8,
UV_UDP_RECVMMSG = 256,
}
pub type uv_udp_send_cb = ::std::option::Option<
unsafe extern "C" fn(req: *mut uv_udp_send_t, status: ::std::os::raw::c_int),
>;
pub type uv_udp_recv_cb = ::std::option::Option<
unsafe extern "C" fn(
handle: *mut uv_udp_t,
nread: ssize_t,
buf: *const uv_buf_t,
addr: *const sockaddr,
flags: ::std::os::raw::c_uint,
),
>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_udp_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_udp_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub send_queue_size: size_t,
pub send_queue_count: size_t,
pub alloc_cb: uv_alloc_cb,
pub recv_cb: uv_udp_recv_cb,
pub io_watcher: uv__io_t,
pub write_queue: [*mut ::std::os::raw::c_void; 2usize],
pub write_completed_queue: [*mut ::std::os::raw::c_void; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_udp_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_udp_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_udp_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_udp_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_udp_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_udp_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s__bindgen_ty_1>())).reserved as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_udp_s() {
assert_eq!(
::std::mem::size_of::<uv_udp_s>(),
216usize,
concat!("Size of: ", stringify!(uv_udp_s))
);
assert_eq!(
::std::mem::align_of::<uv_udp_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_udp_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).send_queue_size as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(send_queue_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).send_queue_count as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(send_queue_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).alloc_cb as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(alloc_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).recv_cb as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(recv_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).io_watcher as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(io_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).write_queue as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(write_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_s>())).write_completed_queue as *const _ as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_s),
"::",
stringify!(write_completed_queue)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_udp_send_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub handle: *mut uv_udp_t,
pub cb: uv_udp_send_cb,
pub queue: [*mut ::std::os::raw::c_void; 2usize],
pub addr: sockaddr_storage,
pub nbufs: ::std::os::raw::c_uint,
pub bufs: *mut uv_buf_t,
pub status: ssize_t,
pub send_cb: uv_udp_send_cb,
pub bufsml: [uv_buf_t; 4usize],
}
#[test]
fn bindgen_test_layout_uv_udp_send_s() {
assert_eq!(
::std::mem::size_of::<uv_udp_send_s>(),
320usize,
concat!("Size of: ", stringify!(uv_udp_send_s))
);
assert_eq!(
::std::mem::align_of::<uv_udp_send_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_udp_send_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).handle as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).cb as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).queue as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).addr as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).nbufs as *const _ as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(nbufs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).bufs as *const _ as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(bufs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).status as *const _ as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).send_cb as *const _ as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(send_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_udp_send_s>())).bufsml as *const _ as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(uv_udp_send_s),
"::",
stringify!(bufsml)
)
);
}
extern "C" {
pub fn uv_udp_init(arg1: *mut uv_loop_t, handle: *mut uv_udp_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_init_ex(
arg1: *mut uv_loop_t,
handle: *mut uv_udp_t,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_open(handle: *mut uv_udp_t, sock: uv_os_sock_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_bind(
handle: *mut uv_udp_t,
addr: *const sockaddr,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_connect(handle: *mut uv_udp_t, addr: *const sockaddr) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_getpeername(
handle: *const uv_udp_t,
name: *mut sockaddr,
namelen: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_getsockname(
handle: *const uv_udp_t,
name: *mut sockaddr,
namelen: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_set_membership(
handle: *mut uv_udp_t,
multicast_addr: *const ::std::os::raw::c_char,
interface_addr: *const ::std::os::raw::c_char,
membership: uv_membership,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_set_source_membership(
handle: *mut uv_udp_t,
multicast_addr: *const ::std::os::raw::c_char,
interface_addr: *const ::std::os::raw::c_char,
source_addr: *const ::std::os::raw::c_char,
membership: uv_membership,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_set_multicast_loop(
handle: *mut uv_udp_t,
on: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_set_multicast_ttl(
handle: *mut uv_udp_t,
ttl: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_set_multicast_interface(
handle: *mut uv_udp_t,
interface_addr: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_set_broadcast(
handle: *mut uv_udp_t,
on: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_set_ttl(
handle: *mut uv_udp_t,
ttl: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_send(
req: *mut uv_udp_send_t,
handle: *mut uv_udp_t,
bufs: *const uv_buf_t,
nbufs: ::std::os::raw::c_uint,
addr: *const sockaddr,
send_cb: uv_udp_send_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_try_send(
handle: *mut uv_udp_t,
bufs: *const uv_buf_t,
nbufs: ::std::os::raw::c_uint,
addr: *const sockaddr,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_recv_start(
handle: *mut uv_udp_t,
alloc_cb: uv_alloc_cb,
recv_cb: uv_udp_recv_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_recv_stop(handle: *mut uv_udp_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_udp_get_send_queue_size(handle: *const uv_udp_t) -> size_t;
}
extern "C" {
pub fn uv_udp_get_send_queue_count(handle: *const uv_udp_t) -> size_t;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_tty_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_tty_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub write_queue_size: size_t,
pub alloc_cb: uv_alloc_cb,
pub read_cb: uv_read_cb,
pub connect_req: *mut uv_connect_t,
pub shutdown_req: *mut uv_shutdown_t,
pub io_watcher: uv__io_t,
pub write_queue: [*mut ::std::os::raw::c_void; 2usize],
pub write_completed_queue: [*mut ::std::os::raw::c_void; 2usize],
pub connection_cb: uv_connection_cb,
pub delayed_error: ::std::os::raw::c_int,
pub accepted_fd: ::std::os::raw::c_int,
pub queued_fds: *mut ::std::os::raw::c_void,
pub orig_termios: termios,
pub mode: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_tty_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_tty_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_tty_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_tty_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_tty_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_tty_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s__bindgen_ty_1>())).reserved as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_tty_s() {
assert_eq!(
::std::mem::size_of::<uv_tty_s>(),
312usize,
concat!("Size of: ", stringify!(uv_tty_s))
);
assert_eq!(
::std::mem::align_of::<uv_tty_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_tty_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).write_queue_size as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(write_queue_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).alloc_cb as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(alloc_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).read_cb as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(read_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).connect_req as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(connect_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).shutdown_req as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(shutdown_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).io_watcher as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(io_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).write_queue as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(write_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).write_completed_queue as *const _ as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(write_completed_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).connection_cb as *const _ as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(connection_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).delayed_error as *const _ as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(delayed_error)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).accepted_fd as *const _ as usize },
236usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(accepted_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).queued_fds as *const _ as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(queued_fds)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).orig_termios as *const _ as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(orig_termios)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_tty_s>())).mode as *const _ as usize },
308usize,
concat!(
"Offset of field: ",
stringify!(uv_tty_s),
"::",
stringify!(mode)
)
);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_tty_mode_t {
UV_TTY_MODE_NORMAL = 0,
UV_TTY_MODE_RAW = 1,
UV_TTY_MODE_IO = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_tty_vtermstate_t {
UV_TTY_SUPPORTED = 0,
UV_TTY_UNSUPPORTED = 1,
}
extern "C" {
pub fn uv_tty_init(
arg1: *mut uv_loop_t,
arg2: *mut uv_tty_t,
fd: uv_file,
readable: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tty_set_mode(arg1: *mut uv_tty_t, mode: uv_tty_mode_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tty_reset_mode() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tty_get_winsize(
arg1: *mut uv_tty_t,
width: *mut ::std::os::raw::c_int,
height: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_tty_set_vterm_state(state: uv_tty_vtermstate_t);
}
extern "C" {
pub fn uv_tty_get_vterm_state(state: *mut uv_tty_vtermstate_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_guess_handle(file: uv_file) -> uv_handle_type;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_pipe_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_pipe_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub write_queue_size: size_t,
pub alloc_cb: uv_alloc_cb,
pub read_cb: uv_read_cb,
pub connect_req: *mut uv_connect_t,
pub shutdown_req: *mut uv_shutdown_t,
pub io_watcher: uv__io_t,
pub write_queue: [*mut ::std::os::raw::c_void; 2usize],
pub write_completed_queue: [*mut ::std::os::raw::c_void; 2usize],
pub connection_cb: uv_connection_cb,
pub delayed_error: ::std::os::raw::c_int,
pub accepted_fd: ::std::os::raw::c_int,
pub queued_fds: *mut ::std::os::raw::c_void,
pub ipc: ::std::os::raw::c_int,
pub pipe_fname: *const ::std::os::raw::c_char,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_pipe_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_pipe_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_pipe_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_pipe_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_pipe_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_pipe_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_pipe_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_pipe_s() {
assert_eq!(
::std::mem::size_of::<uv_pipe_s>(),
264usize,
concat!("Size of: ", stringify!(uv_pipe_s))
);
assert_eq!(
::std::mem::align_of::<uv_pipe_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_pipe_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).write_queue_size as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(write_queue_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).alloc_cb as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(alloc_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).read_cb as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(read_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).connect_req as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(connect_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).shutdown_req as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(shutdown_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).io_watcher as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(io_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).write_queue as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(write_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).write_completed_queue as *const _ as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(write_completed_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).connection_cb as *const _ as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(connection_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).delayed_error as *const _ as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(delayed_error)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).accepted_fd as *const _ as usize },
236usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(accepted_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).queued_fds as *const _ as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(queued_fds)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).ipc as *const _ as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(ipc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_pipe_s>())).pipe_fname as *const _ as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(uv_pipe_s),
"::",
stringify!(pipe_fname)
)
);
}
extern "C" {
pub fn uv_pipe_init(
arg1: *mut uv_loop_t,
handle: *mut uv_pipe_t,
ipc: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_pipe_open(arg1: *mut uv_pipe_t, file: uv_file) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_pipe_bind(
handle: *mut uv_pipe_t,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_pipe_connect(
req: *mut uv_connect_t,
handle: *mut uv_pipe_t,
name: *const ::std::os::raw::c_char,
cb: uv_connect_cb,
);
}
extern "C" {
pub fn uv_pipe_getsockname(
handle: *const uv_pipe_t,
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_pipe_getpeername(
handle: *const uv_pipe_t,
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_pipe_pending_instances(handle: *mut uv_pipe_t, count: ::std::os::raw::c_int);
}
extern "C" {
pub fn uv_pipe_pending_count(handle: *mut uv_pipe_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_pipe_pending_type(handle: *mut uv_pipe_t) -> uv_handle_type;
}
extern "C" {
pub fn uv_pipe_chmod(
handle: *mut uv_pipe_t,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_poll_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_poll_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub poll_cb: uv_poll_cb,
pub io_watcher: uv__io_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_poll_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_poll_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_poll_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_poll_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_poll_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_poll_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_poll_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_poll_s() {
assert_eq!(
::std::mem::size_of::<uv_poll_s>(),
160usize,
concat!("Size of: ", stringify!(uv_poll_s))
);
assert_eq!(
::std::mem::align_of::<uv_poll_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_poll_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).poll_cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(poll_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_poll_s>())).io_watcher as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_poll_s),
"::",
stringify!(io_watcher)
)
);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_poll_event {
UV_READABLE = 1,
UV_WRITABLE = 2,
UV_DISCONNECT = 4,
UV_PRIORITIZED = 8,
}
extern "C" {
pub fn uv_poll_init(
loop_: *mut uv_loop_t,
handle: *mut uv_poll_t,
fd: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_poll_init_socket(
loop_: *mut uv_loop_t,
handle: *mut uv_poll_t,
socket: uv_os_sock_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_poll_start(
handle: *mut uv_poll_t,
events: ::std::os::raw::c_int,
cb: uv_poll_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_poll_stop(handle: *mut uv_poll_t) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_prepare_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_prepare_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub prepare_cb: uv_prepare_cb,
pub queue: [*mut ::std::os::raw::c_void; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_prepare_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_prepare_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_prepare_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_prepare_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_prepare_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_prepare_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_prepare_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_prepare_s() {
assert_eq!(
::std::mem::size_of::<uv_prepare_s>(),
120usize,
concat!("Size of: ", stringify!(uv_prepare_s))
);
assert_eq!(
::std::mem::align_of::<uv_prepare_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_prepare_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).prepare_cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(prepare_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_prepare_s>())).queue as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_prepare_s),
"::",
stringify!(queue)
)
);
}
extern "C" {
pub fn uv_prepare_init(
arg1: *mut uv_loop_t,
prepare: *mut uv_prepare_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_prepare_start(prepare: *mut uv_prepare_t, cb: uv_prepare_cb)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_prepare_stop(prepare: *mut uv_prepare_t) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_check_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_check_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub check_cb: uv_check_cb,
pub queue: [*mut ::std::os::raw::c_void; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_check_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_check_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_check_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_check_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_check_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_check_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_check_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_check_s() {
assert_eq!(
::std::mem::size_of::<uv_check_s>(),
120usize,
concat!("Size of: ", stringify!(uv_check_s))
);
assert_eq!(
::std::mem::align_of::<uv_check_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_check_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).check_cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(check_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_check_s>())).queue as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_check_s),
"::",
stringify!(queue)
)
);
}
extern "C" {
pub fn uv_check_init(arg1: *mut uv_loop_t, check: *mut uv_check_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_check_start(check: *mut uv_check_t, cb: uv_check_cb) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_check_stop(check: *mut uv_check_t) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_idle_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_idle_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub idle_cb: uv_idle_cb,
pub queue: [*mut ::std::os::raw::c_void; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_idle_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_idle_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_idle_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_idle_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_idle_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_idle_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_idle_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_idle_s() {
assert_eq!(
::std::mem::size_of::<uv_idle_s>(),
120usize,
concat!("Size of: ", stringify!(uv_idle_s))
);
assert_eq!(
::std::mem::align_of::<uv_idle_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_idle_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).idle_cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(idle_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_idle_s>())).queue as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_idle_s),
"::",
stringify!(queue)
)
);
}
extern "C" {
pub fn uv_idle_init(arg1: *mut uv_loop_t, idle: *mut uv_idle_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_idle_start(idle: *mut uv_idle_t, cb: uv_idle_cb) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_idle_stop(idle: *mut uv_idle_t) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_async_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_async_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub async_cb: uv_async_cb,
pub queue: [*mut ::std::os::raw::c_void; 2usize],
pub pending: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_async_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_async_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_async_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_async_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_async_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_async_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_async_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_async_s() {
assert_eq!(
::std::mem::size_of::<uv_async_s>(),
128usize,
concat!("Size of: ", stringify!(uv_async_s))
);
assert_eq!(
::std::mem::align_of::<uv_async_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_async_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).async_cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(async_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).queue as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_async_s>())).pending as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_async_s),
"::",
stringify!(pending)
)
);
}
extern "C" {
pub fn uv_async_init(
arg1: *mut uv_loop_t,
async_: *mut uv_async_t,
async_cb: uv_async_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_async_send(async_: *mut uv_async_t) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_timer_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_timer_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub timer_cb: uv_timer_cb,
pub heap_node: [*mut ::std::os::raw::c_void; 3usize],
pub timeout: u64,
pub repeat: u64,
pub start_id: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_timer_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_timer_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_timer_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_timer_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_timer_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_timer_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_timer_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_timer_s() {
assert_eq!(
::std::mem::size_of::<uv_timer_s>(),
152usize,
concat!("Size of: ", stringify!(uv_timer_s))
);
assert_eq!(
::std::mem::align_of::<uv_timer_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_timer_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).timer_cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(timer_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).heap_node as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(heap_node)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).timeout as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(timeout)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).repeat as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(repeat)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timer_s>())).start_id as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(uv_timer_s),
"::",
stringify!(start_id)
)
);
}
extern "C" {
pub fn uv_timer_init(arg1: *mut uv_loop_t, handle: *mut uv_timer_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_timer_start(
handle: *mut uv_timer_t,
cb: uv_timer_cb,
timeout: u64,
repeat: u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_timer_stop(handle: *mut uv_timer_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_timer_again(handle: *mut uv_timer_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_timer_set_repeat(handle: *mut uv_timer_t, repeat: u64);
}
extern "C" {
pub fn uv_timer_get_repeat(handle: *const uv_timer_t) -> u64;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_getaddrinfo_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub loop_: *mut uv_loop_t,
pub work_req: uv__work,
pub cb: uv_getaddrinfo_cb,
pub hints: *mut addrinfo,
pub hostname: *mut ::std::os::raw::c_char,
pub service: *mut ::std::os::raw::c_char,
pub addrinfo: *mut addrinfo,
pub retcode: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_uv_getaddrinfo_s() {
assert_eq!(
::std::mem::size_of::<uv_getaddrinfo_s>(),
160usize,
concat!("Size of: ", stringify!(uv_getaddrinfo_s))
);
assert_eq!(
::std::mem::align_of::<uv_getaddrinfo_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_getaddrinfo_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).loop_ as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).work_req as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(work_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).cb as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).hints as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(hints)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).hostname as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(hostname)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).service as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(service)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).addrinfo as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(addrinfo)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getaddrinfo_s>())).retcode as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(uv_getaddrinfo_s),
"::",
stringify!(retcode)
)
);
}
extern "C" {
pub fn uv_getaddrinfo(
loop_: *mut uv_loop_t,
req: *mut uv_getaddrinfo_t,
getaddrinfo_cb: uv_getaddrinfo_cb,
node: *const ::std::os::raw::c_char,
service: *const ::std::os::raw::c_char,
hints: *const addrinfo,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_freeaddrinfo(ai: *mut addrinfo);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_getnameinfo_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub loop_: *mut uv_loop_t,
pub work_req: uv__work,
pub getnameinfo_cb: uv_getnameinfo_cb,
pub storage: sockaddr_storage,
pub flags: ::std::os::raw::c_int,
pub host: [::std::os::raw::c_char; 1025usize],
pub service: [::std::os::raw::c_char; 32usize],
pub retcode: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_uv_getnameinfo_s() {
assert_eq!(
::std::mem::size_of::<uv_getnameinfo_s>(),
1320usize,
concat!("Size of: ", stringify!(uv_getnameinfo_s))
);
assert_eq!(
::std::mem::align_of::<uv_getnameinfo_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_getnameinfo_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).loop_ as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).work_req as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(work_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).getnameinfo_cb as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(getnameinfo_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).storage as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(storage)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).flags as *const _ as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).host as *const _ as usize },
252usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(host)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).service as *const _ as usize },
1277usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(service)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_getnameinfo_s>())).retcode as *const _ as usize },
1312usize,
concat!(
"Offset of field: ",
stringify!(uv_getnameinfo_s),
"::",
stringify!(retcode)
)
);
}
extern "C" {
pub fn uv_getnameinfo(
loop_: *mut uv_loop_t,
req: *mut uv_getnameinfo_t,
getnameinfo_cb: uv_getnameinfo_cb,
addr: *const sockaddr,
flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_stdio_flags {
UV_IGNORE = 0,
UV_CREATE_PIPE = 1,
UV_INHERIT_FD = 2,
UV_INHERIT_STREAM = 4,
UV_READABLE_PIPE = 16,
UV_WRITABLE_PIPE = 32,
UV_OVERLAPPED_PIPE = 64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_stdio_container_s {
pub flags: uv_stdio_flags,
pub data: uv_stdio_container_s__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_stdio_container_s__bindgen_ty_1 {
pub stream: *mut uv_stream_t,
pub fd: ::std::os::raw::c_int,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_uv_stdio_container_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_stdio_container_s__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(uv_stdio_container_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_stdio_container_s__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(uv_stdio_container_s__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_stdio_container_s__bindgen_ty_1>())).stream as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_stdio_container_s__bindgen_ty_1),
"::",
stringify!(stream)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_stdio_container_s__bindgen_ty_1>())).fd as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_stdio_container_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
}
#[test]
fn bindgen_test_layout_uv_stdio_container_s() {
assert_eq!(
::std::mem::size_of::<uv_stdio_container_s>(),
16usize,
concat!("Size of: ", stringify!(uv_stdio_container_s))
);
assert_eq!(
::std::mem::align_of::<uv_stdio_container_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_stdio_container_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stdio_container_s>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_stdio_container_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_stdio_container_s>())).data as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_stdio_container_s),
"::",
stringify!(data)
)
);
}
pub type uv_stdio_container_t = uv_stdio_container_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_process_options_s {
pub exit_cb: uv_exit_cb,
pub file: *const ::std::os::raw::c_char,
pub args: *mut *mut ::std::os::raw::c_char,
pub env: *mut *mut ::std::os::raw::c_char,
pub cwd: *const ::std::os::raw::c_char,
pub flags: ::std::os::raw::c_uint,
pub stdio_count: ::std::os::raw::c_int,
pub stdio: *mut uv_stdio_container_t,
pub uid: uv_uid_t,
pub gid: uv_gid_t,
}
#[test]
fn bindgen_test_layout_uv_process_options_s() {
assert_eq!(
::std::mem::size_of::<uv_process_options_s>(),
64usize,
concat!("Size of: ", stringify!(uv_process_options_s))
);
assert_eq!(
::std::mem::align_of::<uv_process_options_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_process_options_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).exit_cb as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(exit_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).file as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(file)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).args as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(args)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).env as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(env)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).cwd as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(cwd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).flags as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_process_options_s>())).stdio_count as *const _ as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(stdio_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).stdio as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(stdio)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).uid as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(uid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_options_s>())).gid as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(uv_process_options_s),
"::",
stringify!(gid)
)
);
}
pub type uv_process_options_t = uv_process_options_s;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_process_flags {
UV_PROCESS_SETUID = 1,
UV_PROCESS_SETGID = 2,
UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = 4,
UV_PROCESS_DETACHED = 8,
UV_PROCESS_WINDOWS_HIDE = 16,
UV_PROCESS_WINDOWS_HIDE_CONSOLE = 32,
UV_PROCESS_WINDOWS_HIDE_GUI = 64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_process_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_process_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub exit_cb: uv_exit_cb,
pub pid: ::std::os::raw::c_int,
pub queue: [*mut ::std::os::raw::c_void; 2usize],
pub status: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_process_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_process_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_process_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_process_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_process_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_process_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_process_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_process_s() {
assert_eq!(
::std::mem::size_of::<uv_process_s>(),
136usize,
concat!("Size of: ", stringify!(uv_process_s))
);
assert_eq!(
::std::mem::align_of::<uv_process_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_process_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).exit_cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(exit_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).pid as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(pid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).queue as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_process_s>())).status as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_process_s),
"::",
stringify!(status)
)
);
}
extern "C" {
pub fn uv_spawn(
loop_: *mut uv_loop_t,
handle: *mut uv_process_t,
options: *const uv_process_options_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_process_kill(
arg1: *mut uv_process_t,
signum: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_kill(
pid: ::std::os::raw::c_int,
signum: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_process_get_pid(arg1: *const uv_process_t) -> uv_pid_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_work_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub loop_: *mut uv_loop_t,
pub work_cb: uv_work_cb,
pub after_work_cb: uv_after_work_cb,
pub work_req: uv__work,
}
#[test]
fn bindgen_test_layout_uv_work_s() {
assert_eq!(
::std::mem::size_of::<uv_work_s>(),
128usize,
concat!("Size of: ", stringify!(uv_work_s))
);
assert_eq!(
::std::mem::align_of::<uv_work_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_work_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_work_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_work_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_work_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_work_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_work_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_work_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_work_s>())).loop_ as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_work_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_work_s>())).work_cb as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_work_s),
"::",
stringify!(work_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_work_s>())).after_work_cb as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_work_s),
"::",
stringify!(after_work_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_work_s>())).work_req as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_work_s),
"::",
stringify!(work_req)
)
);
}
extern "C" {
pub fn uv_queue_work(
loop_: *mut uv_loop_t,
req: *mut uv_work_t,
work_cb: uv_work_cb,
after_work_cb: uv_after_work_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_cancel(req: *mut uv_req_t) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_cpu_times_s {
pub user: u64,
pub nice: u64,
pub sys: u64,
pub idle: u64,
pub irq: u64,
}
#[test]
fn bindgen_test_layout_uv_cpu_times_s() {
assert_eq!(
::std::mem::size_of::<uv_cpu_times_s>(),
40usize,
concat!("Size of: ", stringify!(uv_cpu_times_s))
);
assert_eq!(
::std::mem::align_of::<uv_cpu_times_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_cpu_times_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_cpu_times_s>())).user as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_cpu_times_s),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_cpu_times_s>())).nice as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_cpu_times_s),
"::",
stringify!(nice)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_cpu_times_s>())).sys as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_cpu_times_s),
"::",
stringify!(sys)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_cpu_times_s>())).idle as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_cpu_times_s),
"::",
stringify!(idle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_cpu_times_s>())).irq as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_cpu_times_s),
"::",
stringify!(irq)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_cpu_info_s {
pub model: *mut ::std::os::raw::c_char,
pub speed: ::std::os::raw::c_int,
pub cpu_times: uv_cpu_times_s,
}
#[test]
fn bindgen_test_layout_uv_cpu_info_s() {
assert_eq!(
::std::mem::size_of::<uv_cpu_info_s>(),
56usize,
concat!("Size of: ", stringify!(uv_cpu_info_s))
);
assert_eq!(
::std::mem::align_of::<uv_cpu_info_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_cpu_info_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_cpu_info_s>())).model as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_cpu_info_s),
"::",
stringify!(model)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_cpu_info_s>())).speed as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_cpu_info_s),
"::",
stringify!(speed)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_cpu_info_s>())).cpu_times as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_cpu_info_s),
"::",
stringify!(cpu_times)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_interface_address_s {
pub name: *mut ::std::os::raw::c_char,
pub phys_addr: [::std::os::raw::c_char; 6usize],
pub is_internal: ::std::os::raw::c_int,
pub address: uv_interface_address_s__bindgen_ty_1,
pub netmask: uv_interface_address_s__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_interface_address_s__bindgen_ty_1 {
pub address4: sockaddr_in,
pub address6: sockaddr_in6,
_bindgen_union_align: [u32; 7usize],
}
#[test]
fn bindgen_test_layout_uv_interface_address_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_interface_address_s__bindgen_ty_1>(),
28usize,
concat!(
"Size of: ",
stringify!(uv_interface_address_s__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<uv_interface_address_s__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(uv_interface_address_s__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_interface_address_s__bindgen_ty_1>())).address4 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s__bindgen_ty_1),
"::",
stringify!(address4)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_interface_address_s__bindgen_ty_1>())).address6 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s__bindgen_ty_1),
"::",
stringify!(address6)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_interface_address_s__bindgen_ty_2 {
pub netmask4: sockaddr_in,
pub netmask6: sockaddr_in6,
_bindgen_union_align: [u32; 7usize],
}
#[test]
fn bindgen_test_layout_uv_interface_address_s__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<uv_interface_address_s__bindgen_ty_2>(),
28usize,
concat!(
"Size of: ",
stringify!(uv_interface_address_s__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<uv_interface_address_s__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(uv_interface_address_s__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_interface_address_s__bindgen_ty_2>())).netmask4 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s__bindgen_ty_2),
"::",
stringify!(netmask4)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_interface_address_s__bindgen_ty_2>())).netmask6 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s__bindgen_ty_2),
"::",
stringify!(netmask6)
)
);
}
#[test]
fn bindgen_test_layout_uv_interface_address_s() {
assert_eq!(
::std::mem::size_of::<uv_interface_address_s>(),
80usize,
concat!("Size of: ", stringify!(uv_interface_address_s))
);
assert_eq!(
::std::mem::align_of::<uv_interface_address_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_interface_address_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_interface_address_s>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_interface_address_s>())).phys_addr as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s),
"::",
stringify!(phys_addr)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_interface_address_s>())).is_internal as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s),
"::",
stringify!(is_internal)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_interface_address_s>())).address as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s),
"::",
stringify!(address)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_interface_address_s>())).netmask as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_interface_address_s),
"::",
stringify!(netmask)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_passwd_s {
pub username: *mut ::std::os::raw::c_char,
pub uid: ::std::os::raw::c_long,
pub gid: ::std::os::raw::c_long,
pub shell: *mut ::std::os::raw::c_char,
pub homedir: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_uv_passwd_s() {
assert_eq!(
::std::mem::size_of::<uv_passwd_s>(),
40usize,
concat!("Size of: ", stringify!(uv_passwd_s))
);
assert_eq!(
::std::mem::align_of::<uv_passwd_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_passwd_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_passwd_s>())).username as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_passwd_s),
"::",
stringify!(username)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_passwd_s>())).uid as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_passwd_s),
"::",
stringify!(uid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_passwd_s>())).gid as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_passwd_s),
"::",
stringify!(gid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_passwd_s>())).shell as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_passwd_s),
"::",
stringify!(shell)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_passwd_s>())).homedir as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_passwd_s),
"::",
stringify!(homedir)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_utsname_s {
pub sysname: [::std::os::raw::c_char; 256usize],
pub release: [::std::os::raw::c_char; 256usize],
pub version: [::std::os::raw::c_char; 256usize],
pub machine: [::std::os::raw::c_char; 256usize],
}
#[test]
fn bindgen_test_layout_uv_utsname_s() {
assert_eq!(
::std::mem::size_of::<uv_utsname_s>(),
1024usize,
concat!("Size of: ", stringify!(uv_utsname_s))
);
assert_eq!(
::std::mem::align_of::<uv_utsname_s>(),
1usize,
concat!("Alignment of ", stringify!(uv_utsname_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_utsname_s>())).sysname as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_utsname_s),
"::",
stringify!(sysname)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_utsname_s>())).release as *const _ as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(uv_utsname_s),
"::",
stringify!(release)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_utsname_s>())).version as *const _ as usize },
512usize,
concat!(
"Offset of field: ",
stringify!(uv_utsname_s),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_utsname_s>())).machine as *const _ as usize },
768usize,
concat!(
"Offset of field: ",
stringify!(uv_utsname_s),
"::",
stringify!(machine)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_statfs_s {
pub f_type: u64,
pub f_bsize: u64,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_spare: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_statfs_s() {
assert_eq!(
::std::mem::size_of::<uv_statfs_s>(),
88usize,
concat!("Size of: ", stringify!(uv_statfs_s))
);
assert_eq!(
::std::mem::align_of::<uv_statfs_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_statfs_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_statfs_s>())).f_type as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_statfs_s),
"::",
stringify!(f_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_statfs_s>())).f_bsize as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_statfs_s),
"::",
stringify!(f_bsize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_statfs_s>())).f_blocks as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_statfs_s),
"::",
stringify!(f_blocks)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_statfs_s>())).f_bfree as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_statfs_s),
"::",
stringify!(f_bfree)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_statfs_s>())).f_bavail as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_statfs_s),
"::",
stringify!(f_bavail)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_statfs_s>())).f_files as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(uv_statfs_s),
"::",
stringify!(f_files)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_statfs_s>())).f_ffree as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_statfs_s),
"::",
stringify!(f_ffree)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_statfs_s>())).f_spare as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(uv_statfs_s),
"::",
stringify!(f_spare)
)
);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_dirent_type_t {
UV_DIRENT_UNKNOWN = 0,
UV_DIRENT_FILE = 1,
UV_DIRENT_DIR = 2,
UV_DIRENT_LINK = 3,
UV_DIRENT_FIFO = 4,
UV_DIRENT_SOCKET = 5,
UV_DIRENT_CHAR = 6,
UV_DIRENT_BLOCK = 7,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_dirent_s {
pub name: *const ::std::os::raw::c_char,
pub type_: uv_dirent_type_t,
}
#[test]
fn bindgen_test_layout_uv_dirent_s() {
assert_eq!(
::std::mem::size_of::<uv_dirent_s>(),
16usize,
concat!("Size of: ", stringify!(uv_dirent_s))
);
assert_eq!(
::std::mem::align_of::<uv_dirent_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_dirent_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_dirent_s>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_dirent_s),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_dirent_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_dirent_s),
"::",
stringify!(type_)
)
);
}
extern "C" {
pub fn uv_setup_args(
argc: ::std::os::raw::c_int,
argv: *mut *mut ::std::os::raw::c_char,
) -> *mut *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn uv_get_process_title(
buffer: *mut ::std::os::raw::c_char,
size: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_set_process_title(title: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_resident_set_memory(rss: *mut size_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_uptime(uptime: *mut f64) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_get_osfhandle(fd: ::std::os::raw::c_int) -> uv_os_fd_t;
}
extern "C" {
pub fn uv_open_osfhandle(os_fd: uv_os_fd_t) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_timeval_t {
pub tv_sec: ::std::os::raw::c_long,
pub tv_usec: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_uv_timeval_t() {
assert_eq!(
::std::mem::size_of::<uv_timeval_t>(),
16usize,
concat!("Size of: ", stringify!(uv_timeval_t))
);
assert_eq!(
::std::mem::align_of::<uv_timeval_t>(),
8usize,
concat!("Alignment of ", stringify!(uv_timeval_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timeval_t>())).tv_sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_timeval_t),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timeval_t>())).tv_usec as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_timeval_t),
"::",
stringify!(tv_usec)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_timeval64_t {
pub tv_sec: i64,
pub tv_usec: i32,
}
#[test]
fn bindgen_test_layout_uv_timeval64_t() {
assert_eq!(
::std::mem::size_of::<uv_timeval64_t>(),
16usize,
concat!("Size of: ", stringify!(uv_timeval64_t))
);
assert_eq!(
::std::mem::align_of::<uv_timeval64_t>(),
8usize,
concat!("Alignment of ", stringify!(uv_timeval64_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timeval64_t>())).tv_sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_timeval64_t),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_timeval64_t>())).tv_usec as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_timeval64_t),
"::",
stringify!(tv_usec)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_rusage_t {
pub ru_utime: uv_timeval_t,
pub ru_stime: uv_timeval_t,
pub ru_maxrss: u64,
pub ru_ixrss: u64,
pub ru_idrss: u64,
pub ru_isrss: u64,
pub ru_minflt: u64,
pub ru_majflt: u64,
pub ru_nswap: u64,
pub ru_inblock: u64,
pub ru_oublock: u64,
pub ru_msgsnd: u64,
pub ru_msgrcv: u64,
pub ru_nsignals: u64,
pub ru_nvcsw: u64,
pub ru_nivcsw: u64,
}
#[test]
fn bindgen_test_layout_uv_rusage_t() {
assert_eq!(
::std::mem::size_of::<uv_rusage_t>(),
144usize,
concat!("Size of: ", stringify!(uv_rusage_t))
);
assert_eq!(
::std::mem::align_of::<uv_rusage_t>(),
8usize,
concat!("Alignment of ", stringify!(uv_rusage_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_utime as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_utime)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_stime as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_stime)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_maxrss as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_maxrss)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_ixrss as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_ixrss)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_idrss as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_idrss)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_isrss as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_isrss)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_minflt as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_minflt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_majflt as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_majflt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_nswap as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_nswap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_inblock as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_inblock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_oublock as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_oublock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_msgsnd as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_msgsnd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_msgrcv as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_msgrcv)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_nsignals as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_nsignals)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_nvcsw as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_nvcsw)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_rusage_t>())).ru_nivcsw as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(uv_rusage_t),
"::",
stringify!(ru_nivcsw)
)
);
}
extern "C" {
pub fn uv_getrusage(rusage: *mut uv_rusage_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_homedir(
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_tmpdir(
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_get_passwd(pwd: *mut uv_passwd_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_free_passwd(pwd: *mut uv_passwd_t);
}
extern "C" {
pub fn uv_os_getpid() -> uv_pid_t;
}
extern "C" {
pub fn uv_os_getppid() -> uv_pid_t;
}
extern "C" {
pub fn uv_os_getpriority(
pid: uv_pid_t,
priority: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_setpriority(
pid: uv_pid_t,
priority: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_cpu_info(
cpu_infos: *mut *mut uv_cpu_info_t,
count: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_free_cpu_info(cpu_infos: *mut uv_cpu_info_t, count: ::std::os::raw::c_int);
}
extern "C" {
pub fn uv_interface_addresses(
addresses: *mut *mut uv_interface_address_t,
count: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_free_interface_addresses(
addresses: *mut uv_interface_address_t,
count: ::std::os::raw::c_int,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_env_item_s {
pub name: *mut ::std::os::raw::c_char,
pub value: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_uv_env_item_s() {
assert_eq!(
::std::mem::size_of::<uv_env_item_s>(),
16usize,
concat!("Size of: ", stringify!(uv_env_item_s))
);
assert_eq!(
::std::mem::align_of::<uv_env_item_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_env_item_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_env_item_s>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_env_item_s),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_env_item_s>())).value as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_env_item_s),
"::",
stringify!(value)
)
);
}
extern "C" {
pub fn uv_os_environ(
envitems: *mut *mut uv_env_item_t,
count: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_free_environ(envitems: *mut uv_env_item_t, count: ::std::os::raw::c_int);
}
extern "C" {
pub fn uv_os_getenv(
name: *const ::std::os::raw::c_char,
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_setenv(
name: *const ::std::os::raw::c_char,
value: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_unsetenv(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_gethostname(
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_os_uname(buffer: *mut uv_utsname_t) -> ::std::os::raw::c_int;
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_fs_type {
UV_FS_UNKNOWN = -1,
UV_FS_CUSTOM = 0,
UV_FS_OPEN = 1,
UV_FS_CLOSE = 2,
UV_FS_READ = 3,
UV_FS_WRITE = 4,
UV_FS_SENDFILE = 5,
UV_FS_STAT = 6,
UV_FS_LSTAT = 7,
UV_FS_FSTAT = 8,
UV_FS_FTRUNCATE = 9,
UV_FS_UTIME = 10,
UV_FS_FUTIME = 11,
UV_FS_ACCESS = 12,
UV_FS_CHMOD = 13,
UV_FS_FCHMOD = 14,
UV_FS_FSYNC = 15,
UV_FS_FDATASYNC = 16,
UV_FS_UNLINK = 17,
UV_FS_RMDIR = 18,
UV_FS_MKDIR = 19,
UV_FS_MKDTEMP = 20,
UV_FS_RENAME = 21,
UV_FS_SCANDIR = 22,
UV_FS_LINK = 23,
UV_FS_SYMLINK = 24,
UV_FS_READLINK = 25,
UV_FS_CHOWN = 26,
UV_FS_FCHOWN = 27,
UV_FS_REALPATH = 28,
UV_FS_COPYFILE = 29,
UV_FS_LCHOWN = 30,
UV_FS_OPENDIR = 31,
UV_FS_READDIR = 32,
UV_FS_CLOSEDIR = 33,
UV_FS_STATFS = 34,
UV_FS_MKSTEMP = 35,
UV_FS_LUTIME = 36,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_dir_s {
pub dirents: *mut uv_dirent_t,
pub nentries: size_t,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
pub dir: *mut DIR,
}
#[test]
fn bindgen_test_layout_uv_dir_s() {
assert_eq!(
::std::mem::size_of::<uv_dir_s>(),
56usize,
concat!("Size of: ", stringify!(uv_dir_s))
);
assert_eq!(
::std::mem::align_of::<uv_dir_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_dir_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_dir_s>())).dirents as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_dir_s),
"::",
stringify!(dirents)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_dir_s>())).nentries as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_dir_s),
"::",
stringify!(nentries)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_dir_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_dir_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_dir_s>())).dir as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_dir_s),
"::",
stringify!(dir)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_fs_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub fs_type: uv_fs_type,
pub loop_: *mut uv_loop_t,
pub cb: uv_fs_cb,
pub result: ssize_t,
pub ptr: *mut ::std::os::raw::c_void,
pub path: *const ::std::os::raw::c_char,
pub statbuf: uv_stat_t,
pub new_path: *const ::std::os::raw::c_char,
pub file: uv_file,
pub flags: ::std::os::raw::c_int,
pub mode: mode_t,
pub nbufs: ::std::os::raw::c_uint,
pub bufs: *mut uv_buf_t,
pub off: off_t,
pub uid: uv_uid_t,
pub gid: uv_gid_t,
pub atime: f64,
pub mtime: f64,
pub work_req: uv__work,
pub bufsml: [uv_buf_t; 4usize],
}
#[test]
fn bindgen_test_layout_uv_fs_s() {
assert_eq!(
::std::mem::size_of::<uv_fs_s>(),
440usize,
concat!("Size of: ", stringify!(uv_fs_s))
);
assert_eq!(
::std::mem::align_of::<uv_fs_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_fs_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).fs_type as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(fs_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).loop_ as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).cb as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).result as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(result)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).ptr as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).path as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(path)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).statbuf as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(statbuf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).new_path as *const _ as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(new_path)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).file as *const _ as usize },
280usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(file)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).flags as *const _ as usize },
284usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).mode as *const _ as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).nbufs as *const _ as usize },
292usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(nbufs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).bufs as *const _ as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(bufs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).off as *const _ as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(off)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).uid as *const _ as usize },
312usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(uid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).gid as *const _ as usize },
316usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(gid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).atime as *const _ as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(atime)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).mtime as *const _ as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(mtime)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).work_req as *const _ as usize },
336usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(work_req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_s>())).bufsml as *const _ as usize },
376usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_s),
"::",
stringify!(bufsml)
)
);
}
extern "C" {
pub fn uv_fs_get_type(arg1: *const uv_fs_t) -> uv_fs_type;
}
extern "C" {
pub fn uv_fs_get_result(arg1: *const uv_fs_t) -> ssize_t;
}
extern "C" {
pub fn uv_fs_get_system_error(arg1: *const uv_fs_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_get_ptr(arg1: *const uv_fs_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn uv_fs_get_path(arg1: *const uv_fs_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn uv_fs_get_statbuf(arg1: *mut uv_fs_t) -> *mut uv_stat_t;
}
extern "C" {
pub fn uv_fs_req_cleanup(req: *mut uv_fs_t);
}
extern "C" {
pub fn uv_fs_close(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_open(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_int,
mode: ::std::os::raw::c_int,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_read(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
bufs: *const uv_buf_t,
nbufs: ::std::os::raw::c_uint,
offset: i64,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_unlink(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_write(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
bufs: *const uv_buf_t,
nbufs: ::std::os::raw::c_uint,
offset: i64,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_copyfile(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
new_path: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_int,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_mkdir(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
mode: ::std::os::raw::c_int,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_mkdtemp(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
tpl: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_mkstemp(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
tpl: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_rmdir(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_scandir(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_int,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_scandir_next(req: *mut uv_fs_t, ent: *mut uv_dirent_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_opendir(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_readdir(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
dir: *mut uv_dir_t,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_closedir(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
dir: *mut uv_dir_t,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_stat(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_fstat(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_rename(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
new_path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_fsync(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_fdatasync(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_ftruncate(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
offset: i64,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_sendfile(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
out_fd: uv_file,
in_fd: uv_file,
in_offset: i64,
length: size_t,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_access(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
mode: ::std::os::raw::c_int,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_chmod(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
mode: ::std::os::raw::c_int,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_utime(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
atime: f64,
mtime: f64,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_futime(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
atime: f64,
mtime: f64,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_lutime(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
atime: f64,
mtime: f64,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_lstat(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_link(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
new_path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_symlink(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
new_path: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_int,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_readlink(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_realpath(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_fchmod(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
mode: ::std::os::raw::c_int,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_chown(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
uid: uv_uid_t,
gid: uv_gid_t,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_fchown(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
file: uv_file,
uid: uv_uid_t,
gid: uv_gid_t,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_lchown(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
uid: uv_uid_t,
gid: uv_gid_t,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_statfs(
loop_: *mut uv_loop_t,
req: *mut uv_fs_t,
path: *const ::std::os::raw::c_char,
cb: uv_fs_cb,
) -> ::std::os::raw::c_int;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_fs_event {
UV_RENAME = 1,
UV_CHANGE = 2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_fs_event_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_fs_event_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub path: *mut ::std::os::raw::c_char,
pub cb: uv_fs_event_cb,
pub watchers: [*mut ::std::os::raw::c_void; 2usize],
pub wd: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_fs_event_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_fs_event_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_fs_event_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_fs_event_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_fs_event_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_fs_event_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_fs_event_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_fs_event_s() {
assert_eq!(
::std::mem::size_of::<uv_fs_event_s>(),
136usize,
concat!("Size of: ", stringify!(uv_fs_event_s))
);
assert_eq!(
::std::mem::align_of::<uv_fs_event_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_fs_event_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).path as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(path)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).cb as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).watchers as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(watchers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_event_s>())).wd as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_event_s),
"::",
stringify!(wd)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_fs_poll_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_fs_poll_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub poll_ctx: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_fs_poll_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_fs_poll_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_fs_poll_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_fs_poll_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_fs_poll_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_fs_poll_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_fs_poll_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[test]
fn bindgen_test_layout_uv_fs_poll_s() {
assert_eq!(
::std::mem::size_of::<uv_fs_poll_s>(),
104usize,
concat!("Size of: ", stringify!(uv_fs_poll_s))
);
assert_eq!(
::std::mem::align_of::<uv_fs_poll_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_fs_poll_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_fs_poll_s>())).poll_ctx as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_fs_poll_s),
"::",
stringify!(poll_ctx)
)
);
}
extern "C" {
pub fn uv_fs_poll_init(
loop_: *mut uv_loop_t,
handle: *mut uv_fs_poll_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_poll_start(
handle: *mut uv_fs_poll_t,
poll_cb: uv_fs_poll_cb,
path: *const ::std::os::raw::c_char,
interval: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_poll_stop(handle: *mut uv_fs_poll_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_poll_getpath(
handle: *mut uv_fs_poll_t,
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_signal_s {
pub data: *mut ::std::os::raw::c_void,
pub loop_: *mut uv_loop_t,
pub type_: uv_handle_type,
pub close_cb: uv_close_cb,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub u: uv_signal_s__bindgen_ty_1,
pub next_closing: *mut uv_handle_t,
pub flags: ::std::os::raw::c_uint,
pub signal_cb: uv_signal_cb,
pub signum: ::std::os::raw::c_int,
pub tree_entry: uv_signal_s__bindgen_ty_2,
pub caught_signals: ::std::os::raw::c_uint,
pub dispatched_signals: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_signal_s__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
_bindgen_union_align: [u64; 4usize],
}
#[test]
fn bindgen_test_layout_uv_signal_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_signal_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(uv_signal_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_signal_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_signal_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s__bindgen_ty_1>())).fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_signal_s__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_signal_s__bindgen_ty_2 {
pub rbe_left: *mut uv_signal_s,
pub rbe_right: *mut uv_signal_s,
pub rbe_parent: *mut uv_signal_s,
pub rbe_color: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_uv_signal_s__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<uv_signal_s__bindgen_ty_2>(),
32usize,
concat!("Size of: ", stringify!(uv_signal_s__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<uv_signal_s__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(uv_signal_s__bindgen_ty_2))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_signal_s__bindgen_ty_2>())).rbe_left as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s__bindgen_ty_2),
"::",
stringify!(rbe_left)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_signal_s__bindgen_ty_2>())).rbe_right as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s__bindgen_ty_2),
"::",
stringify!(rbe_right)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_signal_s__bindgen_ty_2>())).rbe_parent as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s__bindgen_ty_2),
"::",
stringify!(rbe_parent)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<uv_signal_s__bindgen_ty_2>())).rbe_color as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s__bindgen_ty_2),
"::",
stringify!(rbe_color)
)
);
}
#[test]
fn bindgen_test_layout_uv_signal_s() {
assert_eq!(
::std::mem::size_of::<uv_signal_s>(),
152usize,
concat!("Size of: ", stringify!(uv_signal_s))
);
assert_eq!(
::std::mem::align_of::<uv_signal_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_signal_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).loop_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).close_cb as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(close_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).handle_queue as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).u as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).next_closing as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(next_closing)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).flags as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).signal_cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(signal_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).signum as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(signum)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).tree_entry as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(tree_entry)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).caught_signals as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(caught_signals)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_signal_s>())).dispatched_signals as *const _ as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(uv_signal_s),
"::",
stringify!(dispatched_signals)
)
);
}
extern "C" {
pub fn uv_signal_init(loop_: *mut uv_loop_t, handle: *mut uv_signal_t)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_signal_start(
handle: *mut uv_signal_t,
signal_cb: uv_signal_cb,
signum: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_signal_start_oneshot(
handle: *mut uv_signal_t,
signal_cb: uv_signal_cb,
signum: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_signal_stop(handle: *mut uv_signal_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_loadavg(avg: *mut f64);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_fs_event_flags {
UV_FS_EVENT_WATCH_ENTRY = 1,
UV_FS_EVENT_STAT = 2,
UV_FS_EVENT_RECURSIVE = 4,
}
extern "C" {
pub fn uv_fs_event_init(
loop_: *mut uv_loop_t,
handle: *mut uv_fs_event_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_event_start(
handle: *mut uv_fs_event_t,
cb: uv_fs_event_cb,
path: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_event_stop(handle: *mut uv_fs_event_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_fs_event_getpath(
handle: *mut uv_fs_event_t,
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_ip4_addr(
ip: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_int,
addr: *mut sockaddr_in,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_ip6_addr(
ip: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_int,
addr: *mut sockaddr_in6,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_ip4_name(
src: *const sockaddr_in,
dst: *mut ::std::os::raw::c_char,
size: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_ip6_name(
src: *const sockaddr_in6,
dst: *mut ::std::os::raw::c_char,
size: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_inet_ntop(
af: ::std::os::raw::c_int,
src: *const ::std::os::raw::c_void,
dst: *mut ::std::os::raw::c_char,
size: size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_inet_pton(
af: ::std::os::raw::c_int,
src: *const ::std::os::raw::c_char,
dst: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_random_s {
pub data: *mut ::std::os::raw::c_void,
pub type_: uv_req_type,
pub reserved: [*mut ::std::os::raw::c_void; 6usize],
pub loop_: *mut uv_loop_t,
pub status: ::std::os::raw::c_int,
pub buf: *mut ::std::os::raw::c_void,
pub buflen: size_t,
pub cb: uv_random_cb,
pub work_req: uv__work,
}
#[test]
fn bindgen_test_layout_uv_random_s() {
assert_eq!(
::std::mem::size_of::<uv_random_s>(),
144usize,
concat!("Size of: ", stringify!(uv_random_s))
);
assert_eq!(
::std::mem::align_of::<uv_random_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_random_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).reserved as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).loop_ as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(loop_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).status as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).buf as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).buflen as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(buflen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).cb as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_random_s>())).work_req as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_random_s),
"::",
stringify!(work_req)
)
);
}
extern "C" {
pub fn uv_random(
loop_: *mut uv_loop_t,
req: *mut uv_random_t,
buf: *mut ::std::os::raw::c_void,
buflen: size_t,
flags: ::std::os::raw::c_uint,
cb: uv_random_cb,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_if_indextoname(
ifindex: ::std::os::raw::c_uint,
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_if_indextoiid(
ifindex: ::std::os::raw::c_uint,
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_exepath(
buffer: *mut ::std::os::raw::c_char,
size: *mut size_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_cwd(buffer: *mut ::std::os::raw::c_char, size: *mut size_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_chdir(dir: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_get_free_memory() -> u64;
}
extern "C" {
pub fn uv_get_total_memory() -> u64;
}
extern "C" {
pub fn uv_get_constrained_memory() -> u64;
}
extern "C" {
pub fn uv_hrtime() -> u64;
}
extern "C" {
pub fn uv_sleep(msec: ::std::os::raw::c_uint);
}
extern "C" {
pub fn uv_disable_stdio_inheritance();
}
extern "C" {
pub fn uv_dlopen(
filename: *const ::std::os::raw::c_char,
lib: *mut uv_lib_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_dlclose(lib: *mut uv_lib_t);
}
extern "C" {
pub fn uv_dlsym(
lib: *mut uv_lib_t,
name: *const ::std::os::raw::c_char,
ptr: *mut *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_dlerror(lib: *const uv_lib_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn uv_mutex_init(handle: *mut uv_mutex_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_mutex_init_recursive(handle: *mut uv_mutex_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_mutex_destroy(handle: *mut uv_mutex_t);
}
extern "C" {
pub fn uv_mutex_lock(handle: *mut uv_mutex_t);
}
extern "C" {
pub fn uv_mutex_trylock(handle: *mut uv_mutex_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_mutex_unlock(handle: *mut uv_mutex_t);
}
extern "C" {
pub fn uv_rwlock_init(rwlock: *mut uv_rwlock_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_rwlock_destroy(rwlock: *mut uv_rwlock_t);
}
extern "C" {
pub fn uv_rwlock_rdlock(rwlock: *mut uv_rwlock_t);
}
extern "C" {
pub fn uv_rwlock_tryrdlock(rwlock: *mut uv_rwlock_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_rwlock_rdunlock(rwlock: *mut uv_rwlock_t);
}
extern "C" {
pub fn uv_rwlock_wrlock(rwlock: *mut uv_rwlock_t);
}
extern "C" {
pub fn uv_rwlock_trywrlock(rwlock: *mut uv_rwlock_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_rwlock_wrunlock(rwlock: *mut uv_rwlock_t);
}
extern "C" {
pub fn uv_sem_init(sem: *mut uv_sem_t, value: ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_sem_destroy(sem: *mut uv_sem_t);
}
extern "C" {
pub fn uv_sem_post(sem: *mut uv_sem_t);
}
extern "C" {
pub fn uv_sem_wait(sem: *mut uv_sem_t);
}
extern "C" {
pub fn uv_sem_trywait(sem: *mut uv_sem_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_cond_init(cond: *mut uv_cond_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_cond_destroy(cond: *mut uv_cond_t);
}
extern "C" {
pub fn uv_cond_signal(cond: *mut uv_cond_t);
}
extern "C" {
pub fn uv_cond_broadcast(cond: *mut uv_cond_t);
}
extern "C" {
pub fn uv_barrier_init(
barrier: *mut uv_barrier_t,
count: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_barrier_destroy(barrier: *mut uv_barrier_t);
}
extern "C" {
pub fn uv_barrier_wait(barrier: *mut uv_barrier_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_cond_wait(cond: *mut uv_cond_t, mutex: *mut uv_mutex_t);
}
extern "C" {
pub fn uv_cond_timedwait(
cond: *mut uv_cond_t,
mutex: *mut uv_mutex_t,
timeout: u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_once(guard: *mut uv_once_t, callback: ::std::option::Option<unsafe extern "C" fn()>);
}
extern "C" {
pub fn uv_key_create(key: *mut uv_key_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_key_delete(key: *mut uv_key_t);
}
extern "C" {
pub fn uv_key_get(key: *mut uv_key_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn uv_key_set(key: *mut uv_key_t, value: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn uv_gettimeofday(tv: *mut uv_timeval64_t) -> ::std::os::raw::c_int;
}
pub type uv_thread_cb =
::std::option::Option<unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void)>;
extern "C" {
pub fn uv_thread_create(
tid: *mut uv_thread_t,
entry: uv_thread_cb,
arg: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum uv_thread_create_flags {
UV_THREAD_NO_FLAGS = 0,
UV_THREAD_HAS_STACK_SIZE = 1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_thread_options_s {
pub flags: ::std::os::raw::c_uint,
pub stack_size: size_t,
}
#[test]
fn bindgen_test_layout_uv_thread_options_s() {
assert_eq!(
::std::mem::size_of::<uv_thread_options_s>(),
16usize,
concat!("Size of: ", stringify!(uv_thread_options_s))
);
assert_eq!(
::std::mem::align_of::<uv_thread_options_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_thread_options_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_thread_options_s>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_thread_options_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_thread_options_s>())).stack_size as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_thread_options_s),
"::",
stringify!(stack_size)
)
);
}
pub type uv_thread_options_t = uv_thread_options_s;
extern "C" {
pub fn uv_thread_create_ex(
tid: *mut uv_thread_t,
params: *const uv_thread_options_t,
entry: uv_thread_cb,
arg: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_thread_self() -> uv_thread_t;
}
extern "C" {
pub fn uv_thread_join(tid: *mut uv_thread_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn uv_thread_equal(t1: *const uv_thread_t, t2: *const uv_thread_t)
-> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_any_handle {
pub async_: uv_async_t,
pub check: uv_check_t,
pub fs_event: uv_fs_event_t,
pub fs_poll: uv_fs_poll_t,
pub handle: uv_handle_t,
pub idle: uv_idle_t,
pub pipe: uv_pipe_t,
pub poll: uv_poll_t,
pub prepare: uv_prepare_t,
pub process: uv_process_t,
pub stream: uv_stream_t,
pub tcp: uv_tcp_t,
pub timer: uv_timer_t,
pub tty: uv_tty_t,
pub udp: uv_udp_t,
pub signal: uv_signal_t,
_bindgen_union_align: [u64; 39usize],
}
#[test]
fn bindgen_test_layout_uv_any_handle() {
assert_eq!(
::std::mem::size_of::<uv_any_handle>(),
312usize,
concat!("Size of: ", stringify!(uv_any_handle))
);
assert_eq!(
::std::mem::align_of::<uv_any_handle>(),
8usize,
concat!("Alignment of ", stringify!(uv_any_handle))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).async_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(async_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).check as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(check)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).fs_event as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(fs_event)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).fs_poll as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(fs_poll)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).idle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(idle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).pipe as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(pipe)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).poll as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(poll)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).prepare as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(prepare)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).process as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(process)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).stream as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(stream)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).tcp as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(tcp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).timer as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(timer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).tty as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(tty)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).udp as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(udp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_handle>())).signal as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_handle),
"::",
stringify!(signal)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_any_req {
pub req: uv_req_t,
pub connect: uv_connect_t,
pub write: uv_write_t,
pub shutdown: uv_shutdown_t,
pub udp_send: uv_udp_send_t,
pub fs: uv_fs_t,
pub work: uv_work_t,
pub getaddrinfo: uv_getaddrinfo_t,
pub getnameinfo: uv_getnameinfo_t,
pub random: uv_random_t,
_bindgen_union_align: [u64; 165usize],
}
#[test]
fn bindgen_test_layout_uv_any_req() {
assert_eq!(
::std::mem::size_of::<uv_any_req>(),
1320usize,
concat!("Size of: ", stringify!(uv_any_req))
);
assert_eq!(
::std::mem::align_of::<uv_any_req>(),
8usize,
concat!("Alignment of ", stringify!(uv_any_req))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).req as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(req)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).connect as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(connect)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).write as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(write)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).shutdown as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(shutdown)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).udp_send as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(udp_send)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).fs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(fs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).work as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(work)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).getaddrinfo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(getaddrinfo)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).getnameinfo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(getnameinfo)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_any_req>())).random as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_any_req),
"::",
stringify!(random)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uv_loop_s {
pub data: *mut ::std::os::raw::c_void,
pub active_handles: ::std::os::raw::c_uint,
pub handle_queue: [*mut ::std::os::raw::c_void; 2usize],
pub active_reqs: uv_loop_s__bindgen_ty_1,
pub stop_flag: ::std::os::raw::c_uint,
pub flags: ::std::os::raw::c_ulong,
pub backend_fd: ::std::os::raw::c_int,
pub pending_queue: [*mut ::std::os::raw::c_void; 2usize],
pub watcher_queue: [*mut ::std::os::raw::c_void; 2usize],
pub watchers: *mut *mut uv__io_t,
pub nwatchers: ::std::os::raw::c_uint,
pub nfds: ::std::os::raw::c_uint,
pub wq: [*mut ::std::os::raw::c_void; 2usize],
pub wq_mutex: uv_mutex_t,
pub wq_async: uv_async_t,
pub cloexec_lock: uv_rwlock_t,
pub closing_handles: *mut uv_handle_t,
pub process_handles: [*mut ::std::os::raw::c_void; 2usize],
pub prepare_handles: [*mut ::std::os::raw::c_void; 2usize],
pub check_handles: [*mut ::std::os::raw::c_void; 2usize],
pub idle_handles: [*mut ::std::os::raw::c_void; 2usize],
pub async_handles: [*mut ::std::os::raw::c_void; 2usize],
pub async_unused: ::std::option::Option<unsafe extern "C" fn()>,
pub async_io_watcher: uv__io_t,
pub async_wfd: ::std::os::raw::c_int,
pub timer_heap: uv_loop_s__bindgen_ty_2,
pub timer_counter: u64,
pub time: u64,
pub signal_pipefd: [::std::os::raw::c_int; 2usize],
pub signal_io_watcher: uv__io_t,
pub child_watcher: uv_signal_t,
pub emfile_fd: ::std::os::raw::c_int,
pub inotify_read_watcher: uv__io_t,
pub inotify_watchers: *mut ::std::os::raw::c_void,
pub inotify_fd: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union uv_loop_s__bindgen_ty_1 {
pub unused: [*mut ::std::os::raw::c_void; 2usize],
pub count: ::std::os::raw::c_uint,
_bindgen_union_align: [u64; 2usize],
}
#[test]
fn bindgen_test_layout_uv_loop_s__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<uv_loop_s__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(uv_loop_s__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<uv_loop_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(uv_loop_s__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s__bindgen_ty_1>())).unused as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s__bindgen_ty_1),
"::",
stringify!(unused)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s__bindgen_ty_1>())).count as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s__bindgen_ty_1),
"::",
stringify!(count)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uv_loop_s__bindgen_ty_2 {
pub min: *mut ::std::os::raw::c_void,
pub nelts: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_uv_loop_s__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<uv_loop_s__bindgen_ty_2>(),
16usize,
concat!("Size of: ", stringify!(uv_loop_s__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<uv_loop_s__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(uv_loop_s__bindgen_ty_2))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s__bindgen_ty_2>())).min as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s__bindgen_ty_2),
"::",
stringify!(min)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s__bindgen_ty_2>())).nelts as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s__bindgen_ty_2),
"::",
stringify!(nelts)
)
);
}
#[test]
fn bindgen_test_layout_uv_loop_s() {
assert_eq!(
::std::mem::size_of::<uv_loop_s>(),
848usize,
concat!("Size of: ", stringify!(uv_loop_s))
);
assert_eq!(
::std::mem::align_of::<uv_loop_s>(),
8usize,
concat!("Alignment of ", stringify!(uv_loop_s))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).active_handles as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(active_handles)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).handle_queue as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(handle_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).active_reqs as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(active_reqs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).stop_flag as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(stop_flag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).flags as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).backend_fd as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(backend_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).pending_queue as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(pending_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).watcher_queue as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(watcher_queue)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).watchers as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(watchers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).nwatchers as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(nwatchers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).nfds as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(nfds)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).wq as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(wq)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).wq_mutex as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(wq_mutex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).wq_async as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(wq_async)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).cloexec_lock as *const _ as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(cloexec_lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).closing_handles as *const _ as usize },
360usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(closing_handles)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).process_handles as *const _ as usize },
368usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(process_handles)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).prepare_handles as *const _ as usize },
384usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(prepare_handles)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).check_handles as *const _ as usize },
400usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(check_handles)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).idle_handles as *const _ as usize },
416usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(idle_handles)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).async_handles as *const _ as usize },
432usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(async_handles)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).async_unused as *const _ as usize },
448usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(async_unused)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).async_io_watcher as *const _ as usize },
456usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(async_io_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).async_wfd as *const _ as usize },
512usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(async_wfd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).timer_heap as *const _ as usize },
520usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(timer_heap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).timer_counter as *const _ as usize },
536usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(timer_counter)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).time as *const _ as usize },
544usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(time)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).signal_pipefd as *const _ as usize },
552usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(signal_pipefd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).signal_io_watcher as *const _ as usize },
560usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(signal_io_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).child_watcher as *const _ as usize },
616usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(child_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).emfile_fd as *const _ as usize },
768usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(emfile_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).inotify_read_watcher as *const _ as usize },
776usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(inotify_read_watcher)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).inotify_watchers as *const _ as usize },
832usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(inotify_watchers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<uv_loop_s>())).inotify_fd as *const _ as usize },
840usize,
concat!(
"Offset of field: ",
stringify!(uv_loop_s),
"::",
stringify!(inotify_fd)
)
);
}
extern "C" {
pub fn uv_loop_get_data(arg1: *const uv_loop_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn uv_loop_set_data(arg1: *mut uv_loop_t, data: *mut ::std::os::raw::c_void);
}