[INFO] fetching crate scratchstack-wrapper-aws-c-http 0.1.0-alpha.7...
[INFO] documenting scratchstack-wrapper-aws-c-http-0.1.0-alpha.7 against 1.69.0 for beta-1.70-rustdoc-1
[INFO] extracting crate scratchstack-wrapper-aws-c-http 0.1.0-alpha.7 into /workspace/builds/worker-5-tc1/source
[INFO] validating manifest of crates.io crate scratchstack-wrapper-aws-c-http 0.1.0-alpha.7 on toolchain 1.69.0
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.69.0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] started tweaking crates.io crate scratchstack-wrapper-aws-c-http 0.1.0-alpha.7
[INFO] finished tweaking crates.io crate scratchstack-wrapper-aws-c-http 0.1.0-alpha.7
[INFO] tweaked toml for crates.io crate scratchstack-wrapper-aws-c-http 0.1.0-alpha.7 written to /workspace/builds/worker-5-tc1/source/Cargo.toml
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" "/workspace/cargo-home/bin/cargo" "+1.69.0" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }`
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.69.0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]  Downloading crates ...
[INFO] [stderr]   Downloaded scratchstack-wrapper-aws-c-compression v0.1.0-alpha.7
[INFO] [stderr]   Downloaded scratchstack-wrapper-aws-c-cal v0.1.0-alpha.7
[INFO] [stderr]   Downloaded scratchstack-wrapper-aws-c-common v0.1.0-alpha.7
[INFO] [stderr]   Downloaded scratchstack-wrapper-aws-c-io v0.1.0-alpha.7
[INFO] [stderr]   Downloaded scratchstack-wrapper-aws-lc v0.1.0-alpha.7
[INFO] [stderr]   Downloaded s2n-tls-sys v0.0.18
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:5ff2268d62e97bff2cde7d5815dd6ed5b47097566f13b8d0ca110b04b60e07ed" "/opt/rustwide/cargo-home/bin/cargo" "+1.69.0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] ac9e546fa4915bd7ef0dab64aea2a9a67b7fc22235e8d0199cb22f3127f71f1c
[INFO] running `Command { std: "docker" "start" "-a" "ac9e546fa4915bd7ef0dab64aea2a9a67b7fc22235e8d0199cb22f3127f71f1c", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "ac9e546fa4915bd7ef0dab64aea2a9a67b7fc22235e8d0199cb22f3127f71f1c", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "ac9e546fa4915bd7ef0dab64aea2a9a67b7fc22235e8d0199cb22f3127f71f1c", kill_on_drop: false }`
[INFO] [stdout] ac9e546fa4915bd7ef0dab64aea2a9a67b7fc22235e8d0199cb22f3127f71f1c
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:5ff2268d62e97bff2cde7d5815dd6ed5b47097566f13b8d0ca110b04b60e07ed" "/opt/rustwide/cargo-home/bin/cargo" "+1.69.0" "doc" "--frozen" "--no-deps" "--document-private-items" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] c8616ae7c85cf039ed8287f063744c77607f81f6bb02efede5df11a86cddeeff
[INFO] running `Command { std: "docker" "start" "-a" "c8616ae7c85cf039ed8287f063744c77607f81f6bb02efede5df11a86cddeeff", kill_on_drop: false }`
[INFO] [stderr]    Compiling memchr v2.5.0
[INFO] [stderr]    Compiling glob v0.3.1
[INFO] [stderr]    Compiling proc-macro2 v1.0.56
[INFO] [stderr]    Compiling quote v1.0.26
[INFO] [stderr]    Compiling cfg-if v1.0.0
[INFO] [stderr]    Compiling syn v1.0.109
[INFO] [stderr]    Compiling minimal-lexical v0.2.1
[INFO] [stderr]    Compiling either v1.8.1
[INFO] [stderr]    Compiling bindgen v0.61.0
[INFO] [stderr]    Compiling regex-syntax v0.7.1
[INFO] [stderr]    Compiling shlex v1.1.0
[INFO] [stderr]    Compiling lazy_static v1.4.0
[INFO] [stderr]    Compiling rustc-hash v1.1.0
[INFO] [stderr]    Compiling libc v0.2.142
[INFO] [stderr]    Compiling log v0.4.17
[INFO] [stderr]    Compiling peeking_take_while v0.1.2
[INFO] [stderr]    Compiling lazycell v1.3.0
[INFO] [stderr]    Compiling bitflags v1.3.2
[INFO] [stderr]    Compiling libloading v0.7.4
[INFO] [stderr]    Compiling clang-sys v1.6.1
[INFO] [stderr]    Compiling which v4.4.0
[INFO] [stderr]    Compiling jobserver v0.1.26
[INFO] [stderr]    Compiling nom v7.1.3
[INFO] [stderr]    Compiling cc v1.0.79
[INFO] [stderr]    Compiling openssl-sys v0.9.87
[INFO] [stderr]    Compiling s2n-tls-sys v0.0.18
[INFO] [stderr]    Compiling regex v1.8.1
[INFO] [stderr]    Compiling cexpr v0.6.0
[INFO] [stderr]    Compiling scratchstack-wrapper-aws-c-common v0.1.0-alpha.7
[INFO] [stderr]    Compiling scratchstack-wrapper-aws-lc v0.1.0-alpha.7
[INFO] [stderr]    Compiling scratchstack-wrapper-aws-c-cal v0.1.0-alpha.7
[INFO] [stderr]    Compiling scratchstack-wrapper-aws-c-compression v0.1.0-alpha.7
[INFO] [stderr]    Compiling scratchstack-wrapper-aws-c-io v0.1.0-alpha.7
[INFO] [stderr]    Compiling scratchstack-wrapper-aws-c-http v0.1.0-alpha.7 (/opt/rustwide/workdir)
[INFO] [stdout] error[E0412]: cannot find type `__va_list_tag` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/scratchstack-wrapper-aws-c-common-efacff6837635847/out/bindings.rs:3:209074
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...st :: std :: os :: raw :: c_char , args : * mut __va_list_tag) -> :: std :: os :: raw :: c_int > ; pub type aws_log_formatter_clean_up...
[INFO] [stdout]   |                                                    ^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout]   |
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]   |
[INFO] [stdout] 3 | extern "C" { pub fn aws_fatal_assert (cond_str : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) -> ! ; } # [doc = " @deprecated Use int64_t instead for offsets in public APIs."] pub type aws_off_t = i64 ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_allocator { pub mem_acquire : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , size : usize) -> * mut :: std :: os :: raw :: c_void > , pub mem_release : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , ptr : * mut :: std :: os :: raw :: c_void) > , pub mem_realloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , oldptr : * mut :: std :: os :: raw :: c_void , oldsize : usize , newsize : usize) -> * mut :: std :: os :: raw :: c_void > , pub mem_calloc : :: std :: option :: Option < unsafe extern "C" fn (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: std :: os :: raw :: c_void > , pub impl_ : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_allocator () { const UNINIT : :: std :: mem :: MaybeUninit < aws_allocator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_allocator > () , 40usize , concat ! ("Size of: " , stringify ! (aws_allocator))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_allocator > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mem_acquire) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_allocator) , "::" , stringify ! (mem_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mem_release) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_allocator) , "::" , stringify ! (mem_release))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mem_realloc) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_allocator) , "::" , stringify ! (mem_realloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mem_calloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_allocator) , "::" , stringify ! (mem_calloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . impl_) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_allocator) , "::" , stringify ! (impl_))) ; } impl Default for aws_allocator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Inexpensive (constant time) check of data-structure invariants."] pub fn aws_allocator_is_valid (alloc : * const aws_allocator) -> bool ; } extern "C" { pub fn aws_default_allocator () -> * mut aws_allocator ; } extern "C" { # [doc = " Returns at least `size` of memory ready for usage. In versions v0.6.8 and prior, this function was allowed to return"] # [doc = " NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle"] # [doc = " conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a"] # [doc = " GC etc...before returning."] pub fn aws_mem_acquire (allocator : * mut aws_allocator , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Allocates a block of memory for an array of num elements, each of them size bytes long, and initializes all its bits"] # [doc = " to zero. In versions v0.6.8 and prior, this function was allowed to return NULL."] # [doc = " In later versions, if allocator->mem_calloc() returns NULL, this function will assert and exit. To handle"] # [doc = " conditions where OOM is not a fatal error, allocator->mem_calloc() is responsible for finding/reclaiming/running a"] # [doc = " GC etc...before returning."] pub fn aws_mem_calloc (allocator : * mut aws_allocator , num : usize , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Allocates many chunks of bytes into a single block. Expects to be called with alternating void ** (dest), size_t"] # [doc = " (size). The first void ** will be set to the root of the allocation. Alignment is assumed to be sizeof(intmax_t)."] # [doc = ""] # [doc = " This is useful for allocating structs using the pimpl pattern, as you may allocate the public object and impl object"] # [doc = " in the same contiguous block of memory."] # [doc = ""] # [doc = " Returns a pointer to the allocation."] # [doc = ""] # [doc = " In versions v0.6.8 and prior, this function was allowed to return"] # [doc = " NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle"] # [doc = " conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a"] # [doc = " GC etc...before returning."] pub fn aws_mem_acquire_many (allocator : * mut aws_allocator , count : usize , ...) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Releases ptr back to whatever allocated it."] # [doc = " Nothing happens if ptr is NULL."] pub fn aws_mem_release (allocator : * mut aws_allocator , ptr : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = " Attempts to adjust the size of the pointed-to memory buffer from oldsize to"] # [doc = " newsize. The pointer (*ptr) may be changed if the memory needs to be"] # [doc = " reallocated."] # [doc = ""] # [doc = " In versions v0.6.8 and prior, this function was allowed to return"] # [doc = " NULL. In later versions, if allocator->mem_realloc() returns NULL, this function will assert and exit. To handle"] # [doc = " conditions where OOM is not a fatal error, allocator->mem_realloc() is responsible for finding/reclaiming/running a"] # [doc = " GC etc...before returning."] pub fn aws_mem_realloc (allocator : * mut aws_allocator , ptr : * mut * mut :: std :: os :: raw :: c_void , oldsize : usize , newsize : usize) -> :: std :: os :: raw :: c_int ; } pub const aws_mem_trace_level_AWS_MEMTRACE_NONE : aws_mem_trace_level = 0 ; pub const aws_mem_trace_level_AWS_MEMTRACE_BYTES : aws_mem_trace_level = 1 ; pub const aws_mem_trace_level_AWS_MEMTRACE_STACKS : aws_mem_trace_level = 2 ; pub type aws_mem_trace_level = :: std :: os :: raw :: c_uint ; extern "C" { pub fn aws_mem_tracer_new (allocator : * mut aws_allocator , deprecated : * mut aws_allocator , level : aws_mem_trace_level , frames_per_stack : usize) -> * mut aws_allocator ; } extern "C" { pub fn aws_mem_tracer_destroy (trace_allocator : * mut aws_allocator) -> * mut aws_allocator ; } extern "C" { pub fn aws_mem_tracer_dump (trace_allocator : * mut aws_allocator) ; } extern "C" { pub fn aws_mem_tracer_bytes (trace_allocator : * mut aws_allocator) -> usize ; } extern "C" { pub fn aws_mem_tracer_count (trace_allocator : * mut aws_allocator) -> usize ; } extern "C" { pub fn aws_small_block_allocator_new (allocator : * mut aws_allocator , multi_threaded : bool) -> * mut aws_allocator ; } extern "C" { pub fn aws_small_block_allocator_destroy (sba_allocator : * mut aws_allocator) ; } extern "C" { pub fn aws_small_block_allocator_bytes_active (sba_allocator : * mut aws_allocator) -> usize ; } extern "C" { pub fn aws_small_block_allocator_bytes_reserved (sba_allocator : * mut aws_allocator) -> usize ; } extern "C" { pub fn aws_small_block_allocator_page_size (sba_allocator : * mut aws_allocator) -> usize ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_error_info { pub error_code : :: std :: os :: raw :: c_int , pub literal_name : * const :: std :: os :: raw :: c_char , pub error_str : * const :: std :: os :: raw :: c_char , pub lib_name : * const :: std :: os :: raw :: c_char , pub formatted_name : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_aws_error_info () { const UNINIT : :: std :: mem :: MaybeUninit < aws_error_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_error_info > () , 40usize , concat ! ("Size of: " , stringify ! (aws_error_info))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_error_info > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_error_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . error_code) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_error_info) , "::" , stringify ! (error_code))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . literal_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_error_info) , "::" , stringify ! (literal_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . error_str) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_error_info) , "::" , stringify ! (error_str))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . lib_name) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_error_info) , "::" , stringify ! (lib_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . formatted_name) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_error_info) , "::" , stringify ! (formatted_name))) ; } impl Default for aws_error_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_error_info_list { pub error_list : * const aws_error_info , pub count : u16 , } # [test] fn bindgen_test_layout_aws_error_info_list () { const UNINIT : :: std :: mem :: MaybeUninit < aws_error_info_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_error_info_list > () , 16usize , concat ! ("Size of: " , stringify ! (aws_error_info_list))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_error_info_list > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_error_info_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . error_list) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_error_info_list) , "::" , stringify ! (error_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . count) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_error_info_list) , "::" , stringify ! (count))) ; } impl Default for aws_error_info_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub type aws_error_handler_fn = :: std :: option :: Option < unsafe extern "C" fn (err : :: std :: os :: raw :: c_int , ctx : * mut :: std :: os :: raw :: c_void) > ; extern "C" { pub fn aws_last_error () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_error_str (err : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn aws_error_name (err : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn aws_error_lib_name (err : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn aws_error_debug_str (err : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn aws_raise_error_private (err : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn aws_reset_error () ; } extern "C" { pub fn aws_restore_error (err : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn aws_set_global_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: std :: os :: raw :: c_void) -> aws_error_handler_fn ; } extern "C" { pub fn aws_set_thread_local_error_handler_fn (handler : aws_error_handler_fn , ctx : * mut :: std :: os :: raw :: c_void) -> aws_error_handler_fn ; } extern "C" { # [doc = " TODO: this needs to be a private function (wait till we have the cmake story"] # [doc = " better before moving it though). It should be external for the purpose of"] # [doc = " other libs we own, but customers should not be able to hit it without going"] # [doc = " out of their way to do so."] pub fn aws_register_error_info (error_info : * const aws_error_info_list) ; } extern "C" { pub fn aws_unregister_error_info (error_info : * const aws_error_info_list) ; } extern "C" { # [doc = " Convert a c library io error into an aws error."] pub fn aws_translate_and_raise_io_error (error_no : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub const aws_common_error_AWS_ERROR_SUCCESS : aws_common_error = 0 ; pub const aws_common_error_AWS_ERROR_OOM : aws_common_error = 1 ; pub const aws_common_error_AWS_ERROR_NO_SPACE : aws_common_error = 2 ; pub const aws_common_error_AWS_ERROR_UNKNOWN : aws_common_error = 3 ; pub const aws_common_error_AWS_ERROR_SHORT_BUFFER : aws_common_error = 4 ; pub const aws_common_error_AWS_ERROR_OVERFLOW_DETECTED : aws_common_error = 5 ; pub const aws_common_error_AWS_ERROR_UNSUPPORTED_OPERATION : aws_common_error = 6 ; pub const aws_common_error_AWS_ERROR_INVALID_BUFFER_SIZE : aws_common_error = 7 ; pub const aws_common_error_AWS_ERROR_INVALID_HEX_STR : aws_common_error = 8 ; pub const aws_common_error_AWS_ERROR_INVALID_BASE64_STR : aws_common_error = 9 ; pub const aws_common_error_AWS_ERROR_INVALID_INDEX : aws_common_error = 10 ; pub const aws_common_error_AWS_ERROR_THREAD_INVALID_SETTINGS : aws_common_error = 11 ; pub const aws_common_error_AWS_ERROR_THREAD_INSUFFICIENT_RESOURCE : aws_common_error = 12 ; pub const aws_common_error_AWS_ERROR_THREAD_NO_PERMISSIONS : aws_common_error = 13 ; pub const aws_common_error_AWS_ERROR_THREAD_NOT_JOINABLE : aws_common_error = 14 ; pub const aws_common_error_AWS_ERROR_THREAD_NO_SUCH_THREAD_ID : aws_common_error = 15 ; pub const aws_common_error_AWS_ERROR_THREAD_DEADLOCK_DETECTED : aws_common_error = 16 ; pub const aws_common_error_AWS_ERROR_MUTEX_NOT_INIT : aws_common_error = 17 ; pub const aws_common_error_AWS_ERROR_MUTEX_TIMEOUT : aws_common_error = 18 ; pub const aws_common_error_AWS_ERROR_MUTEX_CALLER_NOT_OWNER : aws_common_error = 19 ; pub const aws_common_error_AWS_ERROR_MUTEX_FAILED : aws_common_error = 20 ; pub const aws_common_error_AWS_ERROR_COND_VARIABLE_INIT_FAILED : aws_common_error = 21 ; pub const aws_common_error_AWS_ERROR_COND_VARIABLE_TIMED_OUT : aws_common_error = 22 ; pub const aws_common_error_AWS_ERROR_COND_VARIABLE_ERROR_UNKNOWN : aws_common_error = 23 ; pub const aws_common_error_AWS_ERROR_CLOCK_FAILURE : aws_common_error = 24 ; pub const aws_common_error_AWS_ERROR_LIST_EMPTY : aws_common_error = 25 ; pub const aws_common_error_AWS_ERROR_DEST_COPY_TOO_SMALL : aws_common_error = 26 ; pub const aws_common_error_AWS_ERROR_LIST_EXCEEDS_MAX_SIZE : aws_common_error = 27 ; pub const aws_common_error_AWS_ERROR_LIST_STATIC_MODE_CANT_SHRINK : aws_common_error = 28 ; pub const aws_common_error_AWS_ERROR_PRIORITY_QUEUE_FULL : aws_common_error = 29 ; pub const aws_common_error_AWS_ERROR_PRIORITY_QUEUE_EMPTY : aws_common_error = 30 ; pub const aws_common_error_AWS_ERROR_PRIORITY_QUEUE_BAD_NODE : aws_common_error = 31 ; pub const aws_common_error_AWS_ERROR_HASHTBL_ITEM_NOT_FOUND : aws_common_error = 32 ; pub const aws_common_error_AWS_ERROR_INVALID_DATE_STR : aws_common_error = 33 ; pub const aws_common_error_AWS_ERROR_INVALID_ARGUMENT : aws_common_error = 34 ; pub const aws_common_error_AWS_ERROR_RANDOM_GEN_FAILED : aws_common_error = 35 ; pub const aws_common_error_AWS_ERROR_MALFORMED_INPUT_STRING : aws_common_error = 36 ; pub const aws_common_error_AWS_ERROR_UNIMPLEMENTED : aws_common_error = 37 ; pub const aws_common_error_AWS_ERROR_INVALID_STATE : aws_common_error = 38 ; pub const aws_common_error_AWS_ERROR_ENVIRONMENT_GET : aws_common_error = 39 ; pub const aws_common_error_AWS_ERROR_ENVIRONMENT_SET : aws_common_error = 40 ; pub const aws_common_error_AWS_ERROR_ENVIRONMENT_UNSET : aws_common_error = 41 ; pub const aws_common_error_AWS_ERROR_STREAM_UNSEEKABLE : aws_common_error = 42 ; pub const aws_common_error_AWS_ERROR_NO_PERMISSION : aws_common_error = 43 ; pub const aws_common_error_AWS_ERROR_FILE_INVALID_PATH : aws_common_error = 44 ; pub const aws_common_error_AWS_ERROR_MAX_FDS_EXCEEDED : aws_common_error = 45 ; pub const aws_common_error_AWS_ERROR_SYS_CALL_FAILURE : aws_common_error = 46 ; pub const aws_common_error_AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED : aws_common_error = 47 ; pub const aws_common_error_AWS_ERROR_STRING_MATCH_NOT_FOUND : aws_common_error = 48 ; pub const aws_common_error_AWS_ERROR_DIVIDE_BY_ZERO : aws_common_error = 49 ; pub const aws_common_error_AWS_ERROR_INVALID_FILE_HANDLE : aws_common_error = 50 ; pub const aws_common_error_AWS_ERROR_OPERATION_INTERUPTED : aws_common_error = 51 ; pub const aws_common_error_AWS_ERROR_DIRECTORY_NOT_EMPTY : aws_common_error = 52 ; pub const aws_common_error_AWS_ERROR_PLATFORM_NOT_SUPPORTED : aws_common_error = 53 ; pub const aws_common_error_AWS_ERROR_END_COMMON_RANGE : aws_common_error = 1023 ; pub type aws_common_error = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Securely zeroes a memory buffer. This function will attempt to ensure that"] # [doc = " the compiler will not optimize away this zeroing operation."] pub fn aws_secure_zero (pBuf : * mut :: std :: os :: raw :: c_void , bufsize : usize) ; } extern "C" { # [doc = " Initializes internal datastructures used by aws-c-common."] # [doc = " Must be called before using any functionality in aws-c-common."] pub fn aws_common_library_init (allocator : * mut aws_allocator) ; } extern "C" { # [doc = " Shuts down the internal datastructures used by aws-c-common."] pub fn aws_common_library_clean_up () ; } extern "C" { pub fn aws_common_fatal_assert_library_initialized () ; } extern "C" { # [doc = " Cross platform friendly version of timegm"] pub fn aws_timegm (t : * mut tm) -> time_t ; } extern "C" { # [doc = " Cross platform friendly version of localtime_r"] pub fn aws_localtime (time : time_t , t : * mut tm) ; } extern "C" { # [doc = " Cross platform friendly version of gmtime_r"] pub fn aws_gmtime (time : time_t , t : * mut tm) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_linked_list_node { pub next : * mut aws_linked_list_node , pub prev : * mut aws_linked_list_node , } # [test] fn bindgen_test_layout_aws_linked_list_node () { const UNINIT : :: std :: mem :: MaybeUninit < aws_linked_list_node > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_linked_list_node > () , 16usize , concat ! ("Size of: " , stringify ! (aws_linked_list_node))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_linked_list_node > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_linked_list_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_linked_list_node) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_linked_list_node) , "::" , stringify ! (prev))) ; } impl Default for aws_linked_list_node { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_linked_list { pub head : aws_linked_list_node , pub tail : aws_linked_list_node , } # [test] fn bindgen_test_layout_aws_linked_list () { const UNINIT : :: std :: mem :: MaybeUninit < aws_linked_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_linked_list > () , 32usize , concat ! ("Size of: " , stringify ! (aws_linked_list))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_linked_list > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_linked_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_linked_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_linked_list) , "::" , stringify ! (tail))) ; } impl Default for aws_linked_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Adds [num] arguments (expected to be of size_t), and returns the result in *r."] # [doc = " If the result overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS."] pub fn aws_add_size_checked_varargs (num : usize , r : * mut usize , ...) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_array_list { pub alloc : * mut aws_allocator , pub current_size : usize , pub length : usize , pub item_size : usize , pub data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_array_list () { const UNINIT : :: std :: mem :: MaybeUninit < aws_array_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_array_list > () , 40usize , concat ! ("Size of: " , stringify ! (aws_array_list))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_array_list > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_array_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_array_list) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_array_list) , "::" , stringify ! (current_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_array_list) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . item_size) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_array_list) , "::" , stringify ! (item_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_array_list) , "::" , stringify ! (data))) ; } impl Default for aws_array_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Prototype for a comparator function for sorting elements."] # [doc = ""] # [doc = " a and b should be cast to pointers to the element type held in the list"] # [doc = " before being dereferenced. The function should compare the elements and"] # [doc = " return a positive number if a > b, zero if a = b, and a negative number"] # [doc = " if a < b."] pub type aws_array_list_comparator_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: std :: os :: raw :: c_void , b : * const :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " If in dynamic mode, shrinks the allocated array size to the minimum amount necessary to store its elements."] pub fn aws_array_list_shrink_to_fit (list : * mut aws_array_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies the elements from from to to. If to is in static mode, it must at least be the same length as from. Any data"] # [doc = " in to will be overwritten in this copy."] pub fn aws_array_list_copy (from : * const aws_array_list , to : * mut aws_array_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Ensures that the array list has enough capacity to store a value at the specified index. If there is not already"] # [doc = " enough capacity, and the list is in dynamic mode, this function will attempt to allocate more memory, expanding the"] # [doc = " list. In static mode, if 'index' is beyond the maximum index, AWS_ERROR_INVALID_INDEX will be raised."] pub fn aws_array_list_ensure_capacity (list : * mut aws_array_list , index : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Swap elements at the specified indices, which must be within the bounds of the array."] pub fn aws_array_list_swap (list : * mut aws_array_list , a : usize , b : usize) ; } pub type aws_priority_queue_compare_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: std :: os :: raw :: c_void , b : * const :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_priority_queue { # [doc = " predicate that determines the priority of the elements in the queue."] pub pred : aws_priority_queue_compare_fn , # [doc = " The underlying container storing the queue elements."] pub container : aws_array_list , # [doc = " An array of pointers to backpointer elements. This array is initialized when"] # [doc = " the first call to aws_priority_queue_push_bp is made, and is subsequently maintained"] # [doc = " through any heap node manipulations."] # [doc = ""] # [doc = " Each element is a struct aws_priority_queue_node *, pointing to a backpointer field"] # [doc = " owned by the calling code, or a NULL. The backpointer field is continually updated"] # [doc = " with information needed to locate and remove a specific node later on."] pub backpointers : aws_array_list , } # [test] fn bindgen_test_layout_aws_priority_queue () { const UNINIT : :: std :: mem :: MaybeUninit < aws_priority_queue > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_priority_queue > () , 88usize , concat ! ("Size of: " , stringify ! (aws_priority_queue))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_priority_queue > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_priority_queue))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pred) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_priority_queue) , "::" , stringify ! (pred))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . container) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_priority_queue) , "::" , stringify ! (container))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . backpointers) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (aws_priority_queue) , "::" , stringify ! (backpointers))) ; } impl Default for aws_priority_queue { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_priority_queue_node { # [doc = " The current index of the node in question, or SIZE_MAX if the node has been removed."] pub current_index : usize , } # [test] fn bindgen_test_layout_aws_priority_queue_node () { const UNINIT : :: std :: mem :: MaybeUninit < aws_priority_queue_node > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_priority_queue_node > () , 8usize , concat ! ("Size of: " , stringify ! (aws_priority_queue_node))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_priority_queue_node > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_priority_queue_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_index) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_priority_queue_node) , "::" , stringify ! (current_index))) ; } extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will grow memory automatically (exponential model)"] # [doc = " Default size is the inital size of the queue"] # [doc = " item_size is the size of each element in bytes. Mixing items types is not supported by this API."] # [doc = " pred is the function that will be used to determine priority."] pub fn aws_priority_queue_init_dynamic (queue : * mut aws_priority_queue , alloc : * mut aws_allocator , default_size : usize , item_size : usize , pred : aws_priority_queue_compare_fn) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Initializes a priority queue struct for use. This mode will not allocate any additional memory. When the heap fills"] # [doc = " new enqueue operations will fail with AWS_ERROR_PRIORITY_QUEUE_FULL."] # [doc = ""] # [doc = " Heaps initialized using this call do not support the aws_priority_queue_push_ref call with a non-NULL backpointer"] # [doc = " parameter."] # [doc = ""] # [doc = " heap is the raw memory allocated for this priority_queue"] # [doc = " item_count is the maximum number of elements the raw heap can contain"] # [doc = " item_size is the size of each element in bytes. Mixing items types is not supported by this API."] # [doc = " pred is the function that will be used to determine priority."] pub fn aws_priority_queue_init_static (queue : * mut aws_priority_queue , heap : * mut :: std :: os :: raw :: c_void , item_count : usize , item_size : usize , pred : aws_priority_queue_compare_fn) ; } extern "C" { # [doc = " Checks that the backpointer at a specific index of the queue is"] # [doc = " NULL or points to a correctly allocated aws_priority_queue_node."] pub fn aws_priority_queue_backpointer_index_valid (queue : * const aws_priority_queue , index : usize) -> bool ; } extern "C" { # [doc = " Checks that the backpointers of the priority queue are either NULL"] # [doc = " or correctly allocated to point at aws_priority_queue_nodes. This"] # [doc = " check is O(n), as it accesses every backpointer in a loop, and thus"] # [doc = " shouldn't be used carelessly."] pub fn aws_priority_queue_backpointers_valid_deep (queue : * const aws_priority_queue) -> bool ; } extern "C" { # [doc = " Checks that the backpointers of the priority queue satisfy validity"] # [doc = " constraints."] pub fn aws_priority_queue_backpointers_valid (queue : * const aws_priority_queue) -> bool ; } extern "C" { # [doc = " Set of properties of a valid aws_priority_queue."] pub fn aws_priority_queue_is_valid (queue : * const aws_priority_queue) -> bool ; } extern "C" { # [doc = " Cleans up any internally allocated memory and resets the struct for reuse or deletion."] pub fn aws_priority_queue_clean_up (queue : * mut aws_priority_queue) ; } extern "C" { # [doc = " Copies item into the queue and places it in the proper priority order. Complexity: O(log(n))."] pub fn aws_priority_queue_push (queue : * mut aws_priority_queue , item : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies item into the queue and places it in the proper priority order. Complexity: O(log(n))."] # [doc = ""] # [doc = " If the backpointer parameter is non-null, the heap will continually update the pointed-to field"] # [doc = " with information needed to remove the node later on. *backpointer must remain valid until the node"] # [doc = " is removed from the heap, and may be updated on any mutating operation on the priority queue."] # [doc = ""] # [doc = " If the node is removed, the backpointer will be set to a sentinel value that indicates that the"] # [doc = " node has already been removed. It is safe (and a no-op) to call aws_priority_queue_remove with"] # [doc = " such a sentinel value."] pub fn aws_priority_queue_push_ref (queue : * mut aws_priority_queue , item : * mut :: std :: os :: raw :: c_void , backpointer : * mut aws_priority_queue_node) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies the element of the highest priority, and removes it from the queue.. Complexity: O(log(n))."] # [doc = " If queue is empty, AWS_ERROR_PRIORITY_QUEUE_EMPTY will be raised."] pub fn aws_priority_queue_pop (queue : * mut aws_priority_queue , item : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Removes a specific node from the priority queue. Complexity: O(log(n))"] # [doc = " After removing a node (using either _remove or _pop), the backpointer set at push_ref time is set"] # [doc = " to a sentinel value. If this sentinel value is passed to aws_priority_queue_remove,"] # [doc = " AWS_ERROR_PRIORITY_QUEUE_BAD_NODE will be raised. Note, however, that passing uninitialized"] # [doc = " aws_priority_queue_nodes, or ones from different priority queues, results in undefined behavior."] pub fn aws_priority_queue_remove (queue : * mut aws_priority_queue , item : * mut :: std :: os :: raw :: c_void , node : * const aws_priority_queue_node) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Obtains a pointer to the element of the highest priority. Complexity: constant time."] # [doc = " If queue is empty, AWS_ERROR_PRIORITY_QUEUE_EMPTY will be raised."] pub fn aws_priority_queue_top (queue : * const aws_priority_queue , item : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Current number of elements in the queue"] pub fn aws_priority_queue_size (queue : * const aws_priority_queue) -> usize ; } extern "C" { # [doc = " Current allocated capacity for the queue, in dynamic mode this grows over time, in static mode, this will never"] # [doc = " change."] pub fn aws_priority_queue_capacity (queue : * const aws_priority_queue) -> usize ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_uuid { pub uuid_data : [u8 ; 16usize] , } # [test] fn bindgen_test_layout_aws_uuid () { const UNINIT : :: std :: mem :: MaybeUninit < aws_uuid > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_uuid > () , 16usize , concat ! ("Size of: " , stringify ! (aws_uuid))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_uuid > () , 1usize , concat ! ("Alignment of " , stringify ! (aws_uuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . uuid_data) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_uuid) , "::" , stringify ! (uuid_data))) ; } extern "C" { pub fn aws_uuid_init (uuid : * mut aws_uuid) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_uuid_init_from_str (uuid : * mut aws_uuid , uuid_str : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_uuid_to_str (uuid : * const aws_uuid , output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_uuid_equals (a : * const aws_uuid , b : * const aws_uuid) -> bool ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_run_command_result { pub ret_code : :: std :: os :: raw :: c_int , # [doc = " captured stdout message from running the command,"] # [doc = " caller is responsible for releasing the memory."] pub std_out : * mut aws_string , # [doc = " captured stderr message from running the command,"] # [doc = " caller is responsible for releasing the memory."] # [doc = " It's currently not implemented and the value will be set to NULL."] pub std_err : * mut aws_string , } # [test] fn bindgen_test_layout_aws_run_command_result () { const UNINIT : :: std :: mem :: MaybeUninit < aws_run_command_result > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_run_command_result > () , 24usize , concat ! ("Size of: " , stringify ! (aws_run_command_result))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_run_command_result > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_run_command_result))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ret_code) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_run_command_result) , "::" , stringify ! (ret_code))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . std_out) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_run_command_result) , "::" , stringify ! (std_out))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . std_err) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_run_command_result) , "::" , stringify ! (std_err))) ; } impl Default for aws_run_command_result { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_run_command_options { # [doc = " command path and commandline options of running that command."] pub command : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_aws_run_command_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_run_command_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_run_command_options > () , 8usize , concat ! ("Size of: " , stringify ! (aws_run_command_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_run_command_options > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_run_command_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . command) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_run_command_options) , "::" , stringify ! (command))) ; } impl Default for aws_run_command_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Returns the current process's PID (process id)."] # [doc = " @return PID as int"] pub fn aws_get_pid () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Returns the soft limit for max io handles (max fds in unix terminology). This limit is one more than the actual"] # [doc = " limit. The soft limit can be changed up to the hard limit by any process regardless of permissions."] pub fn aws_get_soft_limit_io_handles () -> usize ; } extern "C" { # [doc = " Returns the hard limit for max io handles (max fds in unix terminology). This limit is one more than the actual"] # [doc = " limit. This limit cannot be increased without sudo permissions."] pub fn aws_get_hard_limit_io_handles () -> usize ; } extern "C" { # [doc = " Sets the new soft limit for io_handles (max fds). This can be up to the hard limit but may not exceed it."] # [doc = ""] # [doc = " This operation will always fail with AWS_ERROR_UNIMPLEMENTED error code on Windows."] pub fn aws_set_soft_limit_io_handles (max_handles : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_run_command_result_init (allocator : * mut aws_allocator , result : * mut aws_run_command_result) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_run_command_result_cleanup (result : * mut aws_run_command_result) ; } extern "C" { # [doc = " Currently this API is implemented using popen on Posix system and"] # [doc = " _popen on Windows to capture output from running a command. Note"] # [doc = " that popen only captures stdout, and doesn't provide an option to"] # [doc = " capture stderr. We will add more options, such as acquire stderr"] # [doc = " in the future so probably will alter the underlying implementation"] # [doc = " as well."] pub fn aws_run_command (allocator : * mut aws_allocator , options : * mut aws_run_command_options , result : * mut aws_run_command_result) -> :: std :: os :: raw :: c_int ; } # [doc = " Represents a length-delimited binary string or buffer. If byte buffer points"] # [doc = " to constant memory or memory that should otherwise not be freed by this"] # [doc = " struct, set allocator to NULL and free function will be a no-op."] # [doc = ""] # [doc = " This structure used to define the output for all functions that write to a buffer."] # [doc = ""] # [doc = " Note that this structure allocates memory at the buffer pointer only. The"] # [doc = " struct itself does not get dynamically allocated and must be either"] # [doc = " maintained or copied to avoid losing access to the memory."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_byte_buf { pub len : usize , pub buffer : * mut u8 , pub capacity : usize , pub allocator : * mut aws_allocator , } # [test] fn bindgen_test_layout_aws_byte_buf () { const UNINIT : :: std :: mem :: MaybeUninit < aws_byte_buf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_byte_buf > () , 32usize , concat ! ("Size of: " , stringify ! (aws_byte_buf))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_byte_buf > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_byte_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . len) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_byte_buf) , "::" , stringify ! (len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buffer) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_byte_buf) , "::" , stringify ! (buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . capacity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_byte_buf) , "::" , stringify ! (capacity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_byte_buf) , "::" , stringify ! (allocator))) ; } impl Default for aws_byte_buf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Represents a movable pointer within a larger binary string or buffer."] # [doc = ""] # [doc = " This structure is used to define buffers for reading."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_byte_cursor { pub len : usize , pub ptr : * mut u8 , } # [test] fn bindgen_test_layout_aws_byte_cursor () { const UNINIT : :: std :: mem :: MaybeUninit < aws_byte_cursor > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_byte_cursor > () , 16usize , concat ! ("Size of: " , stringify ! (aws_byte_cursor))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_byte_cursor > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_byte_cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . len) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_byte_cursor) , "::" , stringify ! (len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_byte_cursor) , "::" , stringify ! (ptr))) ; } impl Default for aws_byte_cursor { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Signature for function argument to trim APIs"] pub type aws_byte_predicate_fn = :: std :: option :: Option < unsafe extern "C" fn (value : u8) -> bool > ; extern "C" { # [doc = " Compare two arrays."] # [doc = " Return whether their contents are equivalent."] # [doc = " NULL may be passed as the array pointer if its length is declared to be 0."] pub fn aws_array_eq (array_a : * const :: std :: os :: raw :: c_void , len_a : usize , array_b : * const :: std :: os :: raw :: c_void , len_b : usize) -> bool ; } extern "C" { # [doc = " Perform a case-insensitive string comparison of two arrays."] # [doc = " Return whether their contents are equivalent."] # [doc = " NULL may be passed as the array pointer if its length is declared to be 0."] # [doc = " The \"C\" locale is used for comparing upper and lowercase letters."] # [doc = " Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_ignore_case (array_a : * const :: std :: os :: raw :: c_void , len_a : usize , array_b : * const :: std :: os :: raw :: c_void , len_b : usize) -> bool ; } extern "C" { # [doc = " Compare an array and a null-terminated string."] # [doc = " Returns true if their contents are equivalent."] # [doc = " The array should NOT contain a null-terminator, or the comparison will always return false."] # [doc = " NULL may be passed as the array pointer if its length is declared to be 0."] pub fn aws_array_eq_c_str (array : * const :: std :: os :: raw :: c_void , array_len : usize , c_str : * const :: std :: os :: raw :: c_char) -> bool ; } extern "C" { # [doc = " Perform a case-insensitive string comparison of an array and a null-terminated string."] # [doc = " Return whether their contents are equivalent."] # [doc = " The array should NOT contain a null-terminator, or the comparison will always return false."] # [doc = " NULL may be passed as the array pointer if its length is declared to be 0."] # [doc = " The \"C\" locale is used for comparing upper and lowercase letters."] # [doc = " Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_array_eq_c_str_ignore_case (array : * const :: std :: os :: raw :: c_void , array_len : usize , c_str : * const :: std :: os :: raw :: c_char) -> bool ; } extern "C" { pub fn aws_byte_buf_init (buf : * mut aws_byte_buf , allocator : * mut aws_allocator , capacity : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Initializes an aws_byte_buf structure base on another valid one."] # [doc = " Requires: *src and *allocator are valid objects."] # [doc = " Ensures: *dest is a valid aws_byte_buf with a new backing array dest->buffer"] # [doc = " which is a copy of the elements from src->buffer."] pub fn aws_byte_buf_init_copy (dest : * mut aws_byte_buf , allocator : * mut aws_allocator , src : * const aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Reads 'filename' into 'out_buf'. If successful, 'out_buf' is allocated and filled with the data;"] # [doc = " It is your responsibility to call 'aws_byte_buf_clean_up()' on it. Otherwise, 'out_buf' remains"] # [doc = " unused. In the very unfortunate case where some API needs to treat out_buf as a c_string, a null terminator"] # [doc = " is appended, but is not included as part of the length field."] pub fn aws_byte_buf_init_from_file (out_buf : * mut aws_byte_buf , alloc : * mut aws_allocator , filename : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_buf structures."] # [doc = " It is also a cheap check, in the sense it run in constant time (i.e., no loops or recursion)."] pub fn aws_byte_buf_is_valid (buf : * const aws_byte_buf) -> bool ; } extern "C" { # [doc = " Evaluates the set of properties that define the shape of all valid aws_byte_cursor structures."] # [doc = " It is also a cheap check, in the sense it runs in constant time (i.e., no loops or recursion)."] pub fn aws_byte_cursor_is_valid (cursor : * const aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Copies src buffer into dest and sets the correct len and capacity."] # [doc = " A new memory zone is allocated for dest->buffer. When dest is no longer needed it will have to be cleaned-up using"] # [doc = " aws_byte_buf_clean_up(dest)."] # [doc = " Dest capacity and len will be equal to the src len. Allocator of the dest will be identical with parameter allocator."] # [doc = " If src buffer is null the dest will have a null buffer with a len and a capacity of 0"] # [doc = " Returns AWS_OP_SUCCESS in case of success or AWS_OP_ERR when memory can't be allocated."] pub fn aws_byte_buf_init_copy_from_cursor (dest : * mut aws_byte_buf , allocator : * mut aws_allocator , src : aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Init buffer with contents of multiple cursors, and update cursors to reference the memory stored in the buffer."] # [doc = " Each cursor arg must be an `struct aws_byte_cursor *`. NULL must be passed as the final arg."] # [doc = " NOTE: Do not append/grow/resize buffers initialized this way, or the cursors will end up referencing invalid memory."] # [doc = " Returns AWS_OP_SUCCESS in case of success."] # [doc = " AWS_OP_ERR is returned if memory can't be allocated or the total cursor length exceeds SIZE_MAX."] pub fn aws_byte_buf_init_cache_and_update_cursors (dest : * mut aws_byte_buf , allocator : * mut aws_allocator , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_byte_buf_clean_up (buf : * mut aws_byte_buf) ; } extern "C" { # [doc = " Equivalent to calling aws_byte_buf_secure_zero and then aws_byte_buf_clean_up"] # [doc = " on the buffer."] pub fn aws_byte_buf_clean_up_secure (buf : * mut aws_byte_buf) ; } extern "C" { # [doc = " Resets the len of the buffer to 0, but does not free the memory. The buffer can then be reused."] # [doc = " Optionally zeroes the contents, if the \"zero_contents\" flag is true."] pub fn aws_byte_buf_reset (buf : * mut aws_byte_buf , zero_contents : bool) ; } extern "C" { # [doc = " Sets all bytes of buffer to zero and resets len to zero."] pub fn aws_byte_buf_secure_zero (buf : * mut aws_byte_buf) ; } extern "C" { # [doc = " Compare two aws_byte_buf structures."] # [doc = " Return whether their contents are equivalent."] pub fn aws_byte_buf_eq (a : * const aws_byte_buf , b : * const aws_byte_buf) -> bool ; } extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_buf structures."] # [doc = " Return whether their contents are equivalent."] # [doc = " The \"C\" locale is used for comparing upper and lowercase letters."] # [doc = " Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_byte_buf_eq_ignore_case (a : * const aws_byte_buf , b : * const aws_byte_buf) -> bool ; } extern "C" { # [doc = " Compare an aws_byte_buf and a null-terminated string."] # [doc = " Returns true if their contents are equivalent."] # [doc = " The buffer should NOT contain a null-terminator, or the comparison will always return false."] pub fn aws_byte_buf_eq_c_str (buf : * const aws_byte_buf , c_str : * const :: std :: os :: raw :: c_char) -> bool ; } extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_buf and a null-terminated string."] # [doc = " Return whether their contents are equivalent."] # [doc = " The buffer should NOT contain a null-terminator, or the comparison will always return false."] # [doc = " The \"C\" locale is used for comparing upper and lowercase letters."] # [doc = " Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_byte_buf_eq_c_str_ignore_case (buf : * const aws_byte_buf , c_str : * const :: std :: os :: raw :: c_char) -> bool ; } extern "C" { # [doc = " No copies, no buffer allocations. Iterates over input_str, and returns the"] # [doc = " next substring between split_on instances relative to previous substr."] # [doc = " Behaves similar to strtok with substr being used as state for next split."] # [doc = ""] # [doc = " Returns true each time substr is set and false when there is no more splits"] # [doc = " (substr is set to empty in that case)."] # [doc = ""] # [doc = " Example usage."] # [doc = " struct aws_byte_cursor substr = {0};"] # [doc = " while (aws_byte_cursor_next_split(&input_str, ';', &substr)) {"] # [doc = "   // ...use substr..."] # [doc = " }"] # [doc = ""] # [doc = " Note: It is the user's responsibility zero-initialize substr before the first call."] # [doc = ""] # [doc = " Edge case rules are as follows:"] # [doc = " empty input will have single empty split. ex. \"\" splits into \"\""] # [doc = " if input starts with split_on then first split is empty. ex \";A\" splits into \"\", \"A\""] # [doc = " adjacent split tokens result in empty split. ex \"A;;B\" splits into \"A\", \"\", \"B\""] # [doc = " If the input ends with split_on, last split is empty. ex. \"A;\" splits into \"A\", \"\""] # [doc = ""] # [doc = " It is the user's responsibility to make sure the input buffer stays in memory"] # [doc = " long enough to use the results."] pub fn aws_byte_cursor_next_split (input_str : * const aws_byte_cursor , split_on : :: std :: os :: raw :: c_char , substr : * mut aws_byte_cursor) -> bool ; } extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of"] # [doc = " aws_byte_cursor instances where buffer is an offset into the input_str and"] # [doc = " len is the length of that string in the original buffer."] # [doc = ""] # [doc = " Edge case rules are as follows:"] # [doc = " if the input begins with split_on, an empty cursor will be the first entry in"] # [doc = " output. if the input has two adjacent split_on tokens, an empty cursor will"] # [doc = " be inserted into the output. if the input ends with split_on, an empty cursor"] # [doc = " will be appended to the output."] # [doc = ""] # [doc = " It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from"] # [doc = " output is your most likely guess for the upper bound of the number of elements resulting from the split."] # [doc = ""] # [doc = " The type that will be stored in output is struct aws_byte_cursor (you'll need"] # [doc = " this for the item size param)."] # [doc = ""] # [doc = " It is the user's responsibility to make sure the input buffer stays in memory"] # [doc = " long enough to use the results."] pub fn aws_byte_cursor_split_on_char (input_str : * const aws_byte_cursor , split_on : :: std :: os :: raw :: c_char , output : * mut aws_array_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " No copies, no buffer allocations. Fills in output with a list of aws_byte_cursor instances where buffer is"] # [doc = " an offset into the input_str and len is the length of that string in the original buffer. N is the max number of"] # [doc = " splits, if this value is zero, it will add all splits to the output."] # [doc = ""] # [doc = " Edge case rules are as follows:"] # [doc = " if the input begins with split_on, an empty cursor will be the first entry in output"] # [doc = " if the input has two adjacent split_on tokens, an empty cursor will be inserted into the output."] # [doc = " if the input ends with split_on, an empty cursor will be appended to the output."] # [doc = ""] # [doc = " It is the user's responsibility to properly initialize output. Recommended number of preallocated elements from"] # [doc = " output is your most likely guess for the upper bound of the number of elements resulting from the split."] # [doc = ""] # [doc = " If the output array is not large enough, input_str will be updated to point to the first character after the last"] # [doc = " processed split_on instance."] # [doc = ""] # [doc = " The type that will be stored in output is struct aws_byte_cursor (you'll need this for the item size param)."] # [doc = ""] # [doc = " It is the user's responsibility to make sure the input buffer stays in memory long enough to use the results."] pub fn aws_byte_cursor_split_on_char_n (input_str : * const aws_byte_cursor , split_on : :: std :: os :: raw :: c_char , n : usize , output : * mut aws_array_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Search for an exact byte match inside a cursor. The first match will be returned. Returns AWS_OP_SUCCESS"] # [doc = " on successful match and first_find will be set to the offset in input_str, and length will be the remaining length"] # [doc = " from input_str past the returned offset. If the match was not found, AWS_OP_ERR will be returned and"] # [doc = " AWS_ERROR_STRING_MATCH_NOT_FOUND will be raised."] pub fn aws_byte_cursor_find_exact (input_str : * const aws_byte_cursor , to_find : * const aws_byte_cursor , first_find : * mut aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Shrinks a byte cursor from the right for as long as the supplied predicate is true"] pub fn aws_byte_cursor_right_trim_pred (source : * const aws_byte_cursor , predicate : aws_byte_predicate_fn) -> aws_byte_cursor ; } extern "C" { # [doc = " Shrinks a byte cursor from the left for as long as the supplied predicate is true"] pub fn aws_byte_cursor_left_trim_pred (source : * const aws_byte_cursor , predicate : aws_byte_predicate_fn) -> aws_byte_cursor ; } extern "C" { # [doc = " Shrinks a byte cursor from both sides for as long as the supplied predicate is true"] pub fn aws_byte_cursor_trim_pred (source : * const aws_byte_cursor , predicate : aws_byte_predicate_fn) -> aws_byte_cursor ; } extern "C" { # [doc = " Returns true if the byte cursor's range of bytes all satisfy the predicate"] pub fn aws_byte_cursor_satisfies_pred (source : * const aws_byte_cursor , predicate : aws_byte_predicate_fn) -> bool ; } extern "C" { # [doc = " Copies from to to. If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be"] # [doc = " returned. dest->len will contain the amount of data actually copied to dest."] # [doc = ""] # [doc = " from and to may be the same buffer, permitting copying a buffer into itself."] pub fn aws_byte_buf_append (to : * mut aws_byte_buf , from : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies from to to while converting bytes via the passed in lookup table."] # [doc = " If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be"] # [doc = " returned. to->len will contain its original size plus the amount of data actually copied to to."] # [doc = ""] # [doc = " from and to should not be the same buffer (overlap is not handled)"] # [doc = " lookup_table must be at least 256 bytes"] pub fn aws_byte_buf_append_with_lookup (to : * mut aws_byte_buf , from : * const aws_byte_cursor , lookup_table : * const u8) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies from to to. If to is too small, the buffer will be grown appropriately and"] # [doc = " the old contents copied to, before the new contents are appended."] # [doc = ""] # [doc = " If the grow fails (overflow or OOM), then an error will be returned."] # [doc = ""] # [doc = " from and to may be the same buffer, permitting copying a buffer into itself."] pub fn aws_byte_buf_append_dynamic (to : * mut aws_byte_buf , from : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies `from` to `to`. If `to` is too small, the buffer will be grown appropriately and"] # [doc = " the old contents copied over, before the new contents are appended."] # [doc = ""] # [doc = " If the grow fails (overflow or OOM), then an error will be returned."] # [doc = ""] # [doc = " If the buffer is grown, the old buffer will be securely cleared before getting freed."] # [doc = ""] # [doc = " `from` and `to` may be the same buffer, permitting copying a buffer into itself."] pub fn aws_byte_buf_append_dynamic_secure (to : * mut aws_byte_buf , from : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and"] # [doc = " the old contents copied over, before the byte is appended."] # [doc = ""] # [doc = " If the grow fails (overflow or OOM), then an error will be returned."] pub fn aws_byte_buf_append_byte_dynamic (buffer : * mut aws_byte_buf , value : u8) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies a single byte into `to`. If `to` is too small, the buffer will be grown appropriately and"] # [doc = " the old contents copied over, before the byte is appended."] # [doc = ""] # [doc = " If the grow fails (overflow or OOM), then an error will be returned."] # [doc = ""] # [doc = " If the buffer is grown, the old buffer will be securely cleared before getting freed."] pub fn aws_byte_buf_append_byte_dynamic_secure (buffer : * mut aws_byte_buf , value : u8) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copy contents of cursor to buffer, then update cursor to reference the memory stored in the buffer."] # [doc = " If buffer is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be returned."] # [doc = ""] # [doc = " The cursor is permitted to reference memory from earlier in the buffer."] pub fn aws_byte_buf_append_and_update (to : * mut aws_byte_buf , from_and_update : * mut aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Appends '\\0' at the end of the buffer."] pub fn aws_byte_buf_append_null_terminator (buf : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Attempts to increase the capacity of a buffer to the requested capacity"] # [doc = ""] # [doc = " If the the buffer's capacity is currently larger than the request capacity, the"] # [doc = " function does nothing (no shrink is performed)."] pub fn aws_byte_buf_reserve (buffer : * mut aws_byte_buf , requested_capacity : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Convenience function that attempts to increase the capacity of a buffer relative to the current"] # [doc = " length."] # [doc = ""] # [doc = "  aws_byte_buf_reserve_relative(buf, x) ~~ aws_byte_buf_reserve(buf, buf->len + x)"] # [doc = ""] pub fn aws_byte_buf_reserve_relative (buffer : * mut aws_byte_buf , additional_length : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Concatenates a variable number of struct aws_byte_buf * into destination."] # [doc = " Number of args must be greater than 1. If dest is too small,"] # [doc = " AWS_ERROR_DEST_COPY_TOO_SMALL will be returned. dest->len will contain the"] # [doc = " amount of data actually copied to dest."] pub fn aws_byte_buf_cat (dest : * mut aws_byte_buf , number_of_args : usize , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Compare two aws_byte_cursor structures."] # [doc = " Return whether their contents are equivalent."] pub fn aws_byte_cursor_eq (a : * const aws_byte_cursor , b : * const aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Perform a case-insensitive string comparison of two aws_byte_cursor structures."] # [doc = " Return whether their contents are equivalent."] # [doc = " The \"C\" locale is used for comparing upper and lowercase letters."] # [doc = " Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_byte_cursor_eq_ignore_case (a : * const aws_byte_cursor , b : * const aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Compare an aws_byte_cursor and an aws_byte_buf."] # [doc = " Return whether their contents are equivalent."] pub fn aws_byte_cursor_eq_byte_buf (a : * const aws_byte_cursor , b : * const aws_byte_buf) -> bool ; } extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and an aws_byte_buf."] # [doc = " Return whether their contents are equivalent."] # [doc = " The \"C\" locale is used for comparing upper and lowercase letters."] # [doc = " Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_byte_cursor_eq_byte_buf_ignore_case (a : * const aws_byte_cursor , b : * const aws_byte_buf) -> bool ; } extern "C" { # [doc = " Compare an aws_byte_cursor and a null-terminated string."] # [doc = " Returns true if their contents are equivalent."] # [doc = " The cursor should NOT contain a null-terminator, or the comparison will always return false."] pub fn aws_byte_cursor_eq_c_str (cursor : * const aws_byte_cursor , c_str : * const :: std :: os :: raw :: c_char) -> bool ; } extern "C" { # [doc = " Perform a case-insensitive string comparison of an aws_byte_cursor and a null-terminated string."] # [doc = " Return whether their contents are equivalent."] # [doc = " The cursor should NOT contain a null-terminator, or the comparison will always return false."] # [doc = " The \"C\" locale is used for comparing upper and lowercase letters."] # [doc = " Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_byte_cursor_eq_c_str_ignore_case (cursor : * const aws_byte_cursor , c_str : * const :: std :: os :: raw :: c_char) -> bool ; } extern "C" { # [doc = " Return true if the input starts with the prefix (exact byte comparison)."] pub fn aws_byte_cursor_starts_with (input : * const aws_byte_cursor , prefix : * const aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Return true if the input starts with the prefix (case-insensitive)."] # [doc = " The \"C\" locale is used for comparing upper and lowercase letters."] # [doc = " Data is assumed to be ASCII text, UTF-8 will work fine too."] pub fn aws_byte_cursor_starts_with_ignore_case (input : * const aws_byte_cursor , prefix : * const aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Case-insensitive hash function for array containing ASCII or UTF-8 text."] pub fn aws_hash_array_ignore_case (array : * const :: std :: os :: raw :: c_void , len : usize) -> u64 ; } extern "C" { # [doc = " Case-insensitive hash function for aws_byte_cursors stored in an aws_hash_table."] # [doc = " For case-sensitive hashing, use aws_hash_byte_cursor_ptr()."] pub fn aws_hash_byte_cursor_ptr_ignore_case (item : * const :: std :: os :: raw :: c_void) -> u64 ; } extern "C" { # [doc = " Returns a lookup table for bytes that is the identity transformation with the exception"] # [doc = " of uppercase ascii characters getting replaced with lowercase characters.  Used in"] # [doc = " caseless comparisons."] pub fn aws_lookup_table_to_lower_get () -> * const u8 ; } extern "C" { # [doc = " Returns lookup table to go from ASCII/UTF-8 hex character to a number (0-15)."] # [doc = " Non-hex characters map to 255."] # [doc = " Valid examples:"] # [doc = " '0' -> 0"] # [doc = " 'F' -> 15"] # [doc = " 'f' -> 15"] # [doc = " Invalid examples:"] # [doc = " ' ' -> 255"] # [doc = " 'Z' -> 255"] # [doc = " '\\0' -> 255"] pub fn aws_lookup_table_hex_to_num_get () -> * const u8 ; } extern "C" { # [doc = " Lexical (byte value) comparison of two byte cursors"] pub fn aws_byte_cursor_compare_lexical (lhs : * const aws_byte_cursor , rhs : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Lexical (byte value) comparison of two byte cursors where the raw values are sent through a lookup table first"] pub fn aws_byte_cursor_compare_lookup (lhs : * const aws_byte_cursor , rhs : * const aws_byte_cursor , lookup_table : * const u8) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " For creating a byte buffer from a null-terminated string literal."] pub fn aws_byte_buf_from_c_str (c_str : * const :: std :: os :: raw :: c_char) -> aws_byte_buf ; } extern "C" { pub fn aws_byte_buf_from_array (bytes : * const :: std :: os :: raw :: c_void , len : usize) -> aws_byte_buf ; } extern "C" { pub fn aws_byte_buf_from_empty_array (bytes : * const :: std :: os :: raw :: c_void , capacity : usize) -> aws_byte_buf ; } extern "C" { pub fn aws_byte_cursor_from_buf (buf : * const aws_byte_buf) -> aws_byte_cursor ; } extern "C" { pub fn aws_byte_cursor_from_c_str (c_str : * const :: std :: os :: raw :: c_char) -> aws_byte_cursor ; } extern "C" { pub fn aws_byte_cursor_from_array (bytes : * const :: std :: os :: raw :: c_void , len : usize) -> aws_byte_cursor ; } extern "C" { # [doc = " Tests if the given aws_byte_cursor has at least len bytes remaining. If so,"] # [doc = " *buf is advanced by len bytes (incrementing ->ptr and decrementing ->len),"] # [doc = " and an aws_byte_cursor referring to the first len bytes of the original *buf"] # [doc = " is returned. Otherwise, an aws_byte_cursor with ->ptr = NULL, ->len = 0 is"] # [doc = " returned."] # [doc = ""] # [doc = " Note that if len is above (SIZE_MAX / 2), this function will also treat it as"] # [doc = " a buffer overflow, and return NULL without changing *buf."] pub fn aws_byte_cursor_advance (cursor : * mut aws_byte_cursor , len : usize) -> aws_byte_cursor ; } extern "C" { # [doc = " Behaves identically to aws_byte_cursor_advance, but avoids speculative"] # [doc = " execution potentially reading out-of-bounds pointers (by returning an"] # [doc = " empty ptr in such speculated paths)."] # [doc = ""] # [doc = " This should generally be done when using an untrusted or"] # [doc = " data-dependent value for 'len', to avoid speculating into a path where"] # [doc = " cursor->ptr points outside the true ptr length."] pub fn aws_byte_cursor_advance_nospec (cursor : * mut aws_byte_cursor , len : usize) -> aws_byte_cursor ; } extern "C" { # [doc = " Reads specified length of data from byte cursor and copies it to the"] # [doc = " destination array."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read (cur : * mut aws_byte_cursor , dest : * mut :: std :: os :: raw :: c_void , len : usize) -> bool ; } extern "C" { # [doc = " Reads as many bytes from cursor as size of buffer, and copies them to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read_and_fill_buffer (cur : * mut aws_byte_cursor , dest : * mut aws_byte_buf) -> bool ; } extern "C" { # [doc = " Reads a single byte from cursor, placing it in *var."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read_u8 (cur : * mut aws_byte_cursor , var : * mut u8) -> bool ; } extern "C" { # [doc = " Reads a 16-bit value in network byte order from cur, and places it in host"] # [doc = " byte order into var."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read_be16 (cur : * mut aws_byte_cursor , var : * mut u16) -> bool ; } extern "C" { # [doc = " Reads an unsigned 24-bit value (3 bytes) in network byte order from cur,"] # [doc = " and places it in host byte order into 32-bit var."] # [doc = " Ex: if cur's next 3 bytes are {0xAA, 0xBB, 0xCC}, then var becomes 0x00AABBCC."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read_be24 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host"] # [doc = " byte order into var."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read_be32 (cur : * mut aws_byte_cursor , var : * mut u32) -> bool ; } extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host"] # [doc = " byte order into var."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read_be64 (cur : * mut aws_byte_cursor , var : * mut u64) -> bool ; } extern "C" { # [doc = " Reads a 32-bit value in network byte order from cur, and places it in host"] # [doc = " byte order into var."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read_float_be32 (cur : * mut aws_byte_cursor , var : * mut f32) -> bool ; } extern "C" { # [doc = " Reads a 64-bit value in network byte order from cur, and places it in host"] # [doc = " byte order into var."] # [doc = ""] # [doc = " On success, returns true and updates the cursor pointer/length accordingly."] # [doc = " If there is insufficient space in the cursor, returns false, leaving the"] # [doc = " cursor unchanged."] pub fn aws_byte_cursor_read_float_be64 (cur : * mut aws_byte_cursor , var : * mut f64) -> bool ; } extern "C" { # [doc = " Reads 2 hex characters from ASCII/UTF-8 text to produce an 8-bit number."] # [doc = " Accepts both lowercase 'a'-'f' and uppercase 'A'-'F'."] # [doc = " For example: \"0F\" produces 15."] # [doc = ""] # [doc = " On success, returns true and advances the cursor by 2."] # [doc = " If there is insufficient space in the cursor or an invalid character"] # [doc = " is encountered, returns false, leaving the cursor unchanged."] pub fn aws_byte_cursor_read_hex_u8 (cur : * mut aws_byte_cursor , var : * mut u8) -> bool ; } extern "C" { # [doc = " Appends a sub-buffer to the specified buffer."] # [doc = ""] # [doc = " If the buffer has at least `len' bytes remaining (buffer->capacity - buffer->len >= len),"] # [doc = " then buffer->len is incremented by len, and an aws_byte_buf is assigned to *output corresponding"] # [doc = " to the last len bytes of the input buffer. The aws_byte_buf at *output will have a null"] # [doc = " allocator, a zero initial length, and a capacity of 'len'. The function then returns true."] # [doc = ""] # [doc = " If there is insufficient space, then this function nulls all fields in *output and returns"] # [doc = " false."] pub fn aws_byte_buf_advance (buffer : * mut aws_byte_buf , output : * mut aws_byte_buf , len : usize) -> bool ; } extern "C" { # [doc = " Write specified number of bytes from array to byte buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer length accordingly."] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write (buf : * mut aws_byte_buf , src : * const u8 , len : usize) -> bool ; } extern "C" { # [doc = " Copies all bytes from buffer to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer /length accordingly."] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_from_whole_buffer (buf : * mut aws_byte_buf , src : aws_byte_buf) -> bool ; } extern "C" { # [doc = " Copies all bytes from buffer to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer /length accordingly."] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_from_whole_cursor (buf : * mut aws_byte_buf , src : aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Without increasing buf's capacity, write as much as possible from advancing_cursor into buf."] # [doc = ""] # [doc = " buf's len is updated accordingly."] # [doc = " advancing_cursor is advanced so it contains the remaining unwritten parts."] # [doc = " Returns the section of advancing_cursor which was written."] # [doc = ""] # [doc = " This function cannot fail. If buf is full (len == capacity) or advancing_len has 0 length,"] # [doc = " then buf and advancing_cursor are not altered and a cursor with 0 length is returned."] # [doc = ""] # [doc = " Example: Given a buf with 2 bytes of space available and advancing_cursor with contents \"abc\"."] # [doc = " \"ab\" will be written to buf and buf->len will increase 2 and become equal to buf->capacity."] # [doc = " advancing_cursor will advance so its contents become the unwritten \"c\"."] # [doc = " The returned cursor's contents will be the \"ab\" from the original advancing_cursor."] pub fn aws_byte_buf_write_to_capacity (buf : * mut aws_byte_buf , advancing_cursor : * mut aws_byte_cursor) -> aws_byte_cursor ; } extern "C" { # [doc = " Copies one byte to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the cursor /length"] # [doc = "accordingly."] # [doc = ""] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_u8 (buf : * mut aws_byte_buf , c : u8) -> bool ; } extern "C" { # [doc = " Writes one byte repeatedly to buffer (like memset)"] # [doc = ""] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_u8_n (buf : * mut aws_byte_buf , c : u8 , count : usize) -> bool ; } extern "C" { # [doc = " Writes a 16-bit integer in network byte order (big endian) to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer /length accordingly."] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_be16 (buf : * mut aws_byte_buf , x : u16) -> bool ; } extern "C" { # [doc = " Writes low 24-bits (3 bytes) of an unsigned integer in network byte order (big endian) to buffer."] # [doc = " Ex: If x is 0x00AABBCC then {0xAA, 0xBB, 0xCC} is written to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer /length accordingly."] # [doc = " If there is insufficient space in the buffer, or x's value cannot fit in 3 bytes,"] # [doc = " returns false, leaving the buffer unchanged."] pub fn aws_byte_buf_write_be24 (buf : * mut aws_byte_buf , x : u32) -> bool ; } extern "C" { # [doc = " Writes a 32-bit integer in network byte order (big endian) to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer /length accordingly."] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_be32 (buf : * mut aws_byte_buf , x : u32) -> bool ; } extern "C" { # [doc = " Writes a 32-bit float in network byte order (big endian) to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer /length accordingly."] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_float_be32 (buf : * mut aws_byte_buf , x : f32) -> bool ; } extern "C" { # [doc = " Writes a 64-bit integer in network byte order (big endian) to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer /length accordingly."] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_be64 (buf : * mut aws_byte_buf , x : u64) -> bool ; } extern "C" { # [doc = " Writes a 64-bit float in network byte order (big endian) to buffer."] # [doc = ""] # [doc = " On success, returns true and updates the buffer /length accordingly."] # [doc = " If there is insufficient space in the buffer, returns false, leaving the"] # [doc = " buffer unchanged."] pub fn aws_byte_buf_write_float_be64 (buf : * mut aws_byte_buf , x : f64) -> bool ; } extern "C" { # [doc = " Like isalnum(), but ignores C locale."] # [doc = " Returns true if ch has the value of ASCII/UTF-8: 'a'-'z', 'A'-'Z', or '0'-'9'."] pub fn aws_isalnum (ch : u8) -> bool ; } extern "C" { # [doc = " Like isalpha(), but ignores C locale."] # [doc = " Returns true if ch has the value of ASCII/UTF-8: 'a'-'z' or 'A'-'Z'."] pub fn aws_isalpha (ch : u8) -> bool ; } extern "C" { # [doc = " Like isdigit()."] # [doc = " Returns true if ch has the value of ASCII/UTF-8: '0'-'9'."] # [doc = ""] # [doc = " Note: C's built-in isdigit() is also supposed to ignore the C locale,"] # [doc = " but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)"] # [doc = " may classify additional single-byte characters as digits\""] pub fn aws_isdigit (ch : u8) -> bool ; } extern "C" { # [doc = " Like isxdigit()."] # [doc = " Returns true if ch has the value of ASCII/UTF-8: '0'-'9', 'a'-'f', or 'A'-'F'."] # [doc = ""] # [doc = " Note: C's built-in isxdigit() is also supposed to ignore the C locale,"] # [doc = " but cppreference.com claims \"some implementations (e.g. Microsoft in 1252 codepage)"] # [doc = " may classify additional single-byte characters as digits\""] pub fn aws_isxdigit (ch : u8) -> bool ; } extern "C" { # [doc = " Like isspace(), but ignores C locale."] # [doc = " Return true if ch has the value of ASCII/UTF-8: space (0x20), form feed (0x0C),"] # [doc = " line feed (0x0A), carriage return (0x0D), horizontal tab (0x09), or vertical tab (0x0B)."] pub fn aws_isspace (ch : u8) -> bool ; } extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-10 number."] # [doc = " Stricter than strtoull(), which allows whitespace and inputs that start with \"0x\""] # [doc = ""] # [doc = " Examples:"] # [doc = " \"0\" -> 0"] # [doc = " \"123\" -> 123"] # [doc = " \"00004\" -> 4 // leading zeros ok"] # [doc = ""] # [doc = " Rejects things like:"] # [doc = " \"-1\" // negative numbers not allowed"] # [doc = " \"1,000\" // only characters 0-9 allowed"] # [doc = " \"\" // blank string not allowed"] # [doc = " \" 0 \" // whitespace not allowed"] # [doc = " \"0x0\" // hex not allowed"] # [doc = " \"FF\" // hex not allowed"] # [doc = " \"999999999999999999999999999999999999999999\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64 (cursor : aws_byte_cursor , dst : * mut u64) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Read entire cursor as ASCII/UTF-8 unsigned base-16 number with NO \"0x\" prefix."] # [doc = ""] # [doc = " Examples:"] # [doc = " \"F\" -> 15"] # [doc = " \"000000ff\" -> 255 // leading zeros ok"] # [doc = " \"Ff\" -> 255 // mixed case ok"] # [doc = " \"123\" -> 291"] # [doc = " \"FFFFFFFFFFFFFFFF\" -> 18446744073709551616 // max u64"] # [doc = ""] # [doc = " Rejects things like:"] # [doc = " \"0x0\" // 0x prefix not allowed"] # [doc = " \"\" // blank string not allowed"] # [doc = " \" F \" // whitespace not allowed"] # [doc = " \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\" // larger than max u64"] pub fn aws_byte_cursor_utf8_parse_u64_hex (cursor : aws_byte_cursor , dst : * mut u64) -> :: std :: os :: raw :: c_int ; } # [doc = " Data representing a URI. uri_str is always allocated and filled in."] # [doc = " The other portions are merely storing offsets into uri_str."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_uri { pub self_size : usize , pub allocator : * mut aws_allocator , pub uri_str : aws_byte_buf , pub scheme : aws_byte_cursor , pub authority : aws_byte_cursor , pub userinfo : aws_byte_cursor , pub user : aws_byte_cursor , pub password : aws_byte_cursor , pub host_name : aws_byte_cursor , pub port : u16 , pub path : aws_byte_cursor , pub query_string : aws_byte_cursor , pub path_and_query : aws_byte_cursor , } # [test] fn bindgen_test_layout_aws_uri () { const UNINIT : :: std :: mem :: MaybeUninit < aws_uri > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_uri > () , 200usize , concat ! ("Size of: " , stringify ! (aws_uri))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_uri > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_uri))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . self_size) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (self_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . uri_str) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (uri_str))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheme) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (scheme))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . authority) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (authority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . userinfo) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (userinfo))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . user) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (user))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . password) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (password))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . host_name) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (host_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . port) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (port))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . query_string) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (query_string))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . path_and_query) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (aws_uri) , "::" , stringify ! (path_and_query))) ; } impl Default for aws_uri { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " key/value pairs for a query string. If the query fragment was not in format key=value, the fragment value"] # [doc = " will be stored in key"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_uri_param { pub key : aws_byte_cursor , pub value : aws_byte_cursor , } # [test] fn bindgen_test_layout_aws_uri_param () { const UNINIT : :: std :: mem :: MaybeUninit < aws_uri_param > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_uri_param > () , 32usize , concat ! ("Size of: " , stringify ! (aws_uri_param))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_uri_param > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_uri_param))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . key) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_uri_param) , "::" , stringify ! (key))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_uri_param) , "::" , stringify ! (value))) ; } impl Default for aws_uri_param { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Arguments for building a URI instance. All members must"] # [doc = " be initialized before passing them to aws_uri_init()."] # [doc = ""] # [doc = " query_string and query_params are exclusive to each other. If you set"] # [doc = " query_string, do not prepend it with '?'"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_uri_builder_options { pub scheme : aws_byte_cursor , pub path : aws_byte_cursor , pub host_name : aws_byte_cursor , pub port : u16 , pub query_params : * mut aws_array_list , pub query_string : aws_byte_cursor , } # [test] fn bindgen_test_layout_aws_uri_builder_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_uri_builder_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_uri_builder_options > () , 80usize , concat ! ("Size of: " , stringify ! (aws_uri_builder_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_uri_builder_options > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_uri_builder_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheme) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_uri_builder_options) , "::" , stringify ! (scheme))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . path) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_uri_builder_options) , "::" , stringify ! (path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . host_name) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_uri_builder_options) , "::" , stringify ! (host_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . port) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (aws_uri_builder_options) , "::" , stringify ! (port))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . query_params) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (aws_uri_builder_options) , "::" , stringify ! (query_params))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . query_string) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (aws_uri_builder_options) , "::" , stringify ! (query_string))) ; } impl Default for aws_uri_builder_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Parses 'uri_str' and initializes uri. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure."] # [doc = " After calling this function, the parts can be accessed."] pub fn aws_uri_init_parse (uri : * mut aws_uri , allocator : * mut aws_allocator , uri_str : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Initializes uri to values specified in options. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure."] # [doc = " After calling this function, the parts can be accessed."] pub fn aws_uri_init_from_builder_options (uri : * mut aws_uri , allocator : * mut aws_allocator , options : * mut aws_uri_builder_options) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_uri_clean_up (uri : * mut aws_uri) ; } extern "C" { # [doc = " Returns the scheme portion of the uri (e.g. http, https, ftp, ftps, etc...). If the scheme was not present"] # [doc = " in the uri, the returned value will be empty. It is the users job to determine the appropriate defaults"] # [doc = " if this field is empty, based on protocol, port, etc..."] pub fn aws_uri_scheme (uri : * const aws_uri) -> * const aws_byte_cursor ; } extern "C" { # [doc = " Returns the authority portion of the uri (host[:port]). If it was not present, this was a request uri. In that"] # [doc = " case, the value will be empty."] pub fn aws_uri_authority (uri : * const aws_uri) -> * const aws_byte_cursor ; } extern "C" { # [doc = " Returns the path portion of the uri. If the original value was empty, this value will be \"/\"."] pub fn aws_uri_path (uri : * const aws_uri) -> * const aws_byte_cursor ; } extern "C" { # [doc = " Returns the query string portion of the uri, minus the '?'. If not present, this value will be empty."] pub fn aws_uri_query_string (uri : * const aws_uri) -> * const aws_byte_cursor ; } extern "C" { # [doc = " Returns the 'host_name' portion of the authority. If no authority was present, this value will be empty."] pub fn aws_uri_host_name (uri : * const aws_uri) -> * const aws_byte_cursor ; } extern "C" { # [doc = " Returns the port portion of the authority if it was present, otherwise, returns 0."] # [doc = " If this is 0, it is the users job to determine the correct port based on scheme and protocol."] pub fn aws_uri_port (uri : * const aws_uri) -> u16 ; } extern "C" { # [doc = " Returns the path and query portion of the uri (i.e., the thing you send across the wire)."] pub fn aws_uri_path_and_query (uri : * const aws_uri) -> * const aws_byte_cursor ; } extern "C" { # [doc = " For iterating over the params in the uri query string."] # [doc = " `param` is an in/out argument used to track progress, it MUST be zeroed out to start."] # [doc = " If true is returned, `param` contains the value of the next param."] # [doc = " If false is returned, there are no further params."] # [doc = ""] # [doc = " Edge cases:"] # [doc = " 1) Entries without '=' sign are treated as having a key and no value."] # [doc = "    Example: First param in query string \"a&b=c\" has key=\"a\" value=\"\""] # [doc = ""] # [doc = " 2) Blank entries are skipped."] # [doc = "    Example: The only param in query string \"&&a=b\" is key=\"a\" value=\"b\""] pub fn aws_uri_query_string_next_param (uri : * const aws_uri , param : * mut aws_uri_param) -> bool ; } extern "C" { # [doc = " Parses query string and stores the parameters in 'out_params'. Returns AWS_OP_SUCCESS on success and"] # [doc = " AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param."] # [doc = " The user is also responsible for cleaning up out_params when finished."] pub fn aws_uri_query_string_params (uri : * const aws_uri , out_params : * mut aws_array_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Writes the uri path encoding of a cursor to a buffer.  This is the modified version of rfc3986 used by"] # [doc = " sigv4 signing."] pub fn aws_byte_buf_append_encoding_uri_path (buffer : * mut aws_byte_buf , cursor : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Writes the uri query param encoding (passthrough alnum + '-' '_' '~' '.') of a UTF-8 cursor to a buffer"] # [doc = " For example, reading \"a b_c\" would write \"a%20b_c\"."] pub fn aws_byte_buf_append_encoding_uri_param (buffer : * mut aws_byte_buf , cursor : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Writes the uri decoding of a UTF-8 cursor to a buffer,"] # [doc = " replacing %xx escapes by their single byte equivalent."] # [doc = " For example, reading \"a%20b_c\" would write \"a b_c\"."] pub fn aws_byte_buf_append_decoding_uri (buffer : * mut aws_byte_buf , cursor : * const aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_promise { _unused : [u8 ; 0] , } extern "C" { pub fn aws_promise_new (allocator : * mut aws_allocator) -> * mut aws_promise ; } extern "C" { pub fn aws_promise_acquire (promise : * mut aws_promise) -> * mut aws_promise ; } extern "C" { pub fn aws_promise_release (promise : * mut aws_promise) ; } extern "C" { pub fn aws_promise_wait (promise : * mut aws_promise) ; } extern "C" { pub fn aws_promise_wait_for (promise : * mut aws_promise , nanoseconds : usize) -> bool ; } extern "C" { pub fn aws_promise_complete (promise : * mut aws_promise , value : * mut :: std :: os :: raw :: c_void , dtor : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) ; } extern "C" { pub fn aws_promise_fail (promise : * mut aws_promise , error_code : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn aws_promise_is_complete (promise : * mut aws_promise) -> bool ; } extern "C" { pub fn aws_promise_error_code (promise : * mut aws_promise) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_promise_value (promise : * mut aws_promise) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn aws_promise_take_value (promise : * mut aws_promise) -> * mut :: std :: os :: raw :: c_void ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_xml_parser { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_xml_node { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_xml_attribute { pub name : aws_byte_cursor , pub value : aws_byte_cursor , } # [test] fn bindgen_test_layout_aws_xml_attribute () { const UNINIT : :: std :: mem :: MaybeUninit < aws_xml_attribute > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_xml_attribute > () , 32usize , concat ! ("Size of: " , stringify ! (aws_xml_attribute))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_xml_attribute > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_xml_attribute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_xml_attribute) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_xml_attribute) , "::" , stringify ! (value))) ; } impl Default for aws_xml_attribute { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Callback for when an xml node is encountered in the document. As a user you have a few options:"] # [doc = ""] # [doc = " 1. reject the document parsing at this point by returning false. This will immediately stop doc parsing."] # [doc = " 2. call aws_xml_node_traverse() on the node to descend into the node with a new callback and user_data."] # [doc = " 3. call aws_xml_node_as_body() to retrieve the contents of the node as text."] # [doc = ""] # [doc = " return true to continue the parsing operation."] pub type aws_xml_parser_on_node_encountered_fn = :: std :: option :: Option < unsafe extern "C" fn (parser : * mut aws_xml_parser , node : * mut aws_xml_node , user_data : * mut :: std :: os :: raw :: c_void) -> bool > ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_xml_parser_options { pub doc : aws_byte_cursor , pub max_depth : usize , } # [test] fn bindgen_test_layout_aws_xml_parser_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_xml_parser_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_xml_parser_options > () , 24usize , concat ! ("Size of: " , stringify ! (aws_xml_parser_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_xml_parser_options > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_xml_parser_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . doc) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_xml_parser_options) , "::" , stringify ! (doc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_depth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_xml_parser_options) , "::" , stringify ! (max_depth))) ; } impl Default for aws_xml_parser_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Allocates an xml parser."] pub fn aws_xml_parser_new (allocator : * mut aws_allocator , options : * const aws_xml_parser_options) -> * mut aws_xml_parser ; } extern "C" { pub fn aws_xml_parser_destroy (parser : * mut aws_xml_parser) ; } extern "C" { # [doc = " Parse the doc until the end or until a callback rejects the document."] # [doc = " on_node_encountered will be invoked when the root node is encountered."] pub fn aws_xml_parser_parse (parser : * mut aws_xml_parser , on_node_encountered : aws_xml_parser_on_node_encountered_fn , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Writes the contents of the body of node into out_body. out_body is an output parameter in this case. Upon success,"] # [doc = " out_body will contain the body of the node."] pub fn aws_xml_node_as_body (parser : * mut aws_xml_parser , node : * mut aws_xml_node , out_body : * mut aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Traverse node and invoke on_node_encountered when a nested node is encountered."] pub fn aws_xml_node_traverse (parser : * mut aws_xml_parser , node : * mut aws_xml_node , on_node_encountered : aws_xml_parser_on_node_encountered_fn , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_xml_node_get_name (node : * const aws_xml_node , out_name : * mut aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_xml_node_get_num_attributes (node : * const aws_xml_node) -> usize ; } extern "C" { pub fn aws_xml_node_get_attribute (node : * const aws_xml_node , attribute_index : usize , out_attribute : * mut aws_xml_attribute) -> :: std :: os :: raw :: c_int ; } pub const aws_task_status_AWS_TASK_STATUS_RUN_READY : aws_task_status = 0 ; pub const aws_task_status_AWS_TASK_STATUS_CANCELED : aws_task_status = 1 ; pub type aws_task_status = :: std :: os :: raw :: c_uint ; # [doc = " A scheduled function."] pub type aws_task_fn = :: std :: option :: Option < unsafe extern "C" fn (task : * mut aws_task , arg : * mut :: std :: os :: raw :: c_void , arg1 : aws_task_status) > ; # [repr (C)] # [derive (Copy , Clone)] pub struct aws_task { pub fn_ : aws_task_fn , pub arg : * mut :: std :: os :: raw :: c_void , pub timestamp : u64 , pub node : aws_linked_list_node , pub priority_queue_node : aws_priority_queue_node , pub type_tag : * const :: std :: os :: raw :: c_char , pub abi_extension : aws_task__bindgen_ty_1 , } # [repr (C)] # [derive (Copy , Clone)] pub union aws_task__bindgen_ty_1 { pub scheduled : bool , pub reserved : usize , } # [test] fn bindgen_test_layout_aws_task__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < aws_task__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_task__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (aws_task__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_task__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_task__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_task__bindgen_ty_1) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserved) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_task__bindgen_ty_1) , "::" , stringify ! (reserved))) ; } impl Default for aws_task__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [test] fn bindgen_test_layout_aws_task () { const UNINIT : :: std :: mem :: MaybeUninit < aws_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_task > () , 64usize , concat ! ("Size of: " , stringify ! (aws_task))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_task > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fn_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_task) , "::" , stringify ! (fn_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_task) , "::" , stringify ! (arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . timestamp) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_task) , "::" , stringify ! (timestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_task) , "::" , stringify ! (node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority_queue_node) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (aws_task) , "::" , stringify ! (priority_queue_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_tag) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (aws_task) , "::" , stringify ! (type_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . abi_extension) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (aws_task) , "::" , stringify ! (abi_extension))) ; } impl Default for aws_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_task_scheduler { pub alloc : * mut aws_allocator , pub timed_queue : aws_priority_queue , pub timed_list : aws_linked_list , pub asap_list : aws_linked_list , } # [test] fn bindgen_test_layout_aws_task_scheduler () { const UNINIT : :: std :: mem :: MaybeUninit < aws_task_scheduler > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_task_scheduler > () , 160usize , concat ! ("Size of: " , stringify ! (aws_task_scheduler))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_task_scheduler > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_task_scheduler))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_task_scheduler) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . timed_queue) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_task_scheduler) , "::" , stringify ! (timed_queue))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . timed_list) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (aws_task_scheduler) , "::" , stringify ! (timed_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . asap_list) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (aws_task_scheduler) , "::" , stringify ! (asap_list))) ; } impl Default for aws_task_scheduler { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Init an aws_task"] pub fn aws_task_init (task : * mut aws_task , fn_ : aws_task_fn , arg : * mut :: std :: os :: raw :: c_void , type_tag : * const :: std :: os :: raw :: c_char) ; } extern "C" { pub fn aws_task_run (task : * mut aws_task , status : aws_task_status) ; } extern "C" { # [doc = " Initializes a task scheduler instance."] pub fn aws_task_scheduler_init (scheduler : * mut aws_task_scheduler , alloc : * mut aws_allocator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Empties and executes all queued tasks, passing the AWS_TASK_STATUS_CANCELED status to the task function."] # [doc = " Cleans up any memory allocated, and prepares the instance for reuse or deletion."] pub fn aws_task_scheduler_clean_up (scheduler : * mut aws_task_scheduler) ; } extern "C" { pub fn aws_task_scheduler_is_valid (scheduler : * const aws_task_scheduler) -> bool ; } extern "C" { # [doc = " Returns whether the scheduler has any scheduled tasks."] # [doc = " next_task_time (optional) will be set to time of the next task, note that 0 will be set if tasks were"] # [doc = " added via aws_task_scheduler_schedule_now() and UINT64_MAX will be set if no tasks are scheduled at all."] pub fn aws_task_scheduler_has_tasks (scheduler : * const aws_task_scheduler , next_task_time : * mut u64) -> bool ; } extern "C" { # [doc = " Schedules a task to run immediately."] # [doc = " The task should not be cleaned up or modified until its function is executed."] pub fn aws_task_scheduler_schedule_now (scheduler : * mut aws_task_scheduler , task : * mut aws_task) ; } extern "C" { # [doc = " Schedules a task to run at time_to_run."] # [doc = " The task should not be cleaned up or modified until its function is executed."] pub fn aws_task_scheduler_schedule_future (scheduler : * mut aws_task_scheduler , task : * mut aws_task , time_to_run : u64) ; } extern "C" { # [doc = " Removes task from the scheduler and invokes the task with the AWS_TASK_STATUS_CANCELED status."] pub fn aws_task_scheduler_cancel_task (scheduler : * mut aws_task_scheduler , task : * mut aws_task) ; } extern "C" { # [doc = " Sequentially execute all tasks scheduled to run at, or before current_time."] # [doc = " AWS_TASK_STATUS_RUN_READY will be passed to the task function as the task status."] # [doc = ""] # [doc = " If a task schedules another task, the new task will not be executed until the next call to this function."] pub fn aws_task_scheduler_run_all (scheduler : * mut aws_task_scheduler , current_time : u64) ; } extern "C" { # [doc = " Convert a status value to a c-string suitable for logging"] pub fn aws_task_status_to_c_str (status : aws_task_status) -> * const :: std :: os :: raw :: c_char ; } # [doc = " Hash table data structure. This module provides an automatically resizing"] # [doc = " hash table implementation for general purpose use. The hash table stores a"] # [doc = " mapping between void * keys and values; it is expected that in most cases,"] # [doc = " these will point to a structure elsewhere in the heap, instead of inlining a"] # [doc = " key or value into the hash table element itself."] # [doc = ""] # [doc = " Currently, this hash table implements a variant of robin hood hashing, but"] # [doc = " we do not guarantee that this won't change in the future."] # [doc = ""] # [doc = " Associated with each hash function are four callbacks:"] # [doc = ""] # [doc = "   hash_fn - A hash function from the keys to a uint64_t. It is critical that"] # [doc = "      the hash function for a key does not change while the key is in the hash"] # [doc = "      table; violating this results in undefined behavior. Collisions are"] # [doc = "      tolerated, though naturally with reduced performance."] # [doc = ""] # [doc = "   equals_fn - An equality comparison function. This function must be"] # [doc = "      reflexive and consistent with hash_fn."] # [doc = ""] # [doc = "   destroy_key_fn, destroy_value_fn - Optional callbacks invoked when the"] # [doc = "      table is cleared or cleaned up and at the caller's option when an element"] # [doc = "      is removed from the table. Either or both may be set to NULL, which"] # [doc = "      has the same effect as a no-op destroy function."] # [doc = ""] # [doc = " This datastructure can be safely moved between threads, subject to the"] # [doc = " requirements of the underlying allocator. It is also safe to invoke"] # [doc = " non-mutating operations on the hash table from multiple threads. A suitable"] # [doc = " memory barrier must be used when transitioning from single-threaded mutating"] # [doc = " usage to multithreaded usage."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct hash_table_state { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_hash_table { pub p_impl : * mut hash_table_state , } # [test] fn bindgen_test_layout_aws_hash_table () { const UNINIT : :: std :: mem :: MaybeUninit < aws_hash_table > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_hash_table > () , 8usize , concat ! ("Size of: " , stringify ! (aws_hash_table))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_hash_table > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_hash_table))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . p_impl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_hash_table) , "::" , stringify ! (p_impl))) ; } impl Default for aws_hash_table { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Represents an element in the hash table. Various operations on the hash"] # [doc = " table may provide pointers to elements stored within the hash table;"] # [doc = " generally, calling code may alter value, but must not alter key (or any"] # [doc = " information used to compute key's hash code)."] # [doc = ""] # [doc = " Pointers to elements within the hash are invalidated whenever an operation"] # [doc = " which may change the number of elements in the hash is invoked (i.e. put,"] # [doc = " delete, clear, and clean_up), regardless of whether the number of elements"] # [doc = " actually changes."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_hash_element { pub key : * const :: std :: os :: raw :: c_void , pub value : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_hash_element () { const UNINIT : :: std :: mem :: MaybeUninit < aws_hash_element > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_hash_element > () , 16usize , concat ! ("Size of: " , stringify ! (aws_hash_element))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_hash_element > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_hash_element))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . key) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_hash_element) , "::" , stringify ! (key))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_hash_element) , "::" , stringify ! (value))) ; } impl Default for aws_hash_element { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const aws_hash_iter_status_AWS_HASH_ITER_STATUS_DONE : aws_hash_iter_status = 0 ; pub const aws_hash_iter_status_AWS_HASH_ITER_STATUS_DELETE_CALLED : aws_hash_iter_status = 1 ; pub const aws_hash_iter_status_AWS_HASH_ITER_STATUS_READY_FOR_USE : aws_hash_iter_status = 2 ; pub type aws_hash_iter_status = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_hash_iter { pub map : * const aws_hash_table , pub element : aws_hash_element , pub slot : usize , pub limit : usize , pub status : aws_hash_iter_status , pub unused_0 : :: std :: os :: raw :: c_int , pub unused_1 : * mut :: std :: os :: raw :: c_void , pub unused_2 : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_hash_iter () { const UNINIT : :: std :: mem :: MaybeUninit < aws_hash_iter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_hash_iter > () , 64usize , concat ! ("Size of: " , stringify ! (aws_hash_iter))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_hash_iter > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_hash_iter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . map) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_hash_iter) , "::" , stringify ! (map))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . element) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_hash_iter) , "::" , stringify ! (element))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slot) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_hash_iter) , "::" , stringify ! (slot))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . limit) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_hash_iter) , "::" , stringify ! (limit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (aws_hash_iter) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unused_0) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (aws_hash_iter) , "::" , stringify ! (unused_0))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unused_1) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (aws_hash_iter) , "::" , stringify ! (unused_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unused_2) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (aws_hash_iter) , "::" , stringify ! (unused_2))) ; } impl Default for aws_hash_iter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Prototype for a key hashing function pointer."] pub type aws_hash_fn = :: std :: option :: Option < unsafe extern "C" fn (key : * const :: std :: os :: raw :: c_void) -> u64 > ; # [doc = " Prototype for a hash table equality check function pointer."] # [doc = ""] # [doc = " This type is usually used for a function that compares two hash table"] # [doc = " keys, but note that the same type is used for a function that compares"] # [doc = " two hash table values in aws_hash_table_eq."] # [doc = ""] # [doc = " Equality functions used in a hash table must be reflexive (i.e., a == b if"] # [doc = " and only if b == a), and must be consistent with the hash function in use."] pub type aws_hash_callback_eq_fn = :: std :: option :: Option < unsafe extern "C" fn (a : * const :: std :: os :: raw :: c_void , b : * const :: std :: os :: raw :: c_void) -> bool > ; # [doc = " Prototype for a hash table key or value destructor function pointer."] # [doc = ""] # [doc = " This function is used to destroy elements in the hash table when the"] # [doc = " table is cleared or cleaned up."] # [doc = ""] # [doc = " Note that functions which remove individual elements from the hash"] # [doc = " table provide options of whether or not to invoke the destructors"] # [doc = " on the key and value of a removed element."] pub type aws_hash_callback_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (key_or_value : * mut :: std :: os :: raw :: c_void) > ; extern "C" { # [doc = " Initializes a hash map with initial capacity for 'size' elements"] # [doc = " without resizing. Uses hash_fn to compute the hash of each element."] # [doc = " equals_fn to compute equality of two keys.  Whenever an element is"] # [doc = " removed without being returned, destroy_key_fn is run on the pointer"] # [doc = " to the key and destroy_value_fn is run on the pointer to the value."] # [doc = " Either or both may be NULL if a callback is not desired in this case."] pub fn aws_hash_table_init (map : * mut aws_hash_table , alloc : * mut aws_allocator , size : usize , hash_fn : aws_hash_fn , equals_fn : aws_hash_callback_eq_fn , destroy_key_fn : aws_hash_callback_destroy_fn , destroy_value_fn : aws_hash_callback_destroy_fn) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Deletes every element from map and frees all associated memory."] # [doc = " destroy_fn will be called for each element.  aws_hash_table_init"] # [doc = " must be called before reusing the hash table."] # [doc = ""] # [doc = " This method is idempotent."] pub fn aws_hash_table_clean_up (map : * mut aws_hash_table) ; } extern "C" { # [doc = " Safely swaps two hash tables. Note that we swap the entirety of the hash"] # [doc = " table, including which allocator is associated."] # [doc = ""] # [doc = " Neither hash table is required to be initialized; if one or both is"] # [doc = " uninitialized, then the uninitialized state is also swapped."] pub fn aws_hash_table_swap (a : * mut aws_hash_table , b : * mut aws_hash_table) ; } extern "C" { # [doc = " Moves the hash table in 'from' to 'to'. After this move, 'from' will"] # [doc = " be identical to the state of the original 'to' hash table, and 'to'"] # [doc = " will be in the same state as if it had been passed to aws_hash_table_clean_up"] # [doc = " (that is, it will have no memory allocated, and it will be safe to"] # [doc = " either discard it or call aws_hash_table_clean_up again)."] # [doc = ""] # [doc = " Note that 'to' will not be cleaned up. You should make sure that 'to'"] # [doc = " is either uninitialized or cleaned up before moving a hashtable into"] # [doc = " it."] pub fn aws_hash_table_move (to : * mut aws_hash_table , from : * mut aws_hash_table) ; } extern "C" { # [doc = " Returns the current number of entries in the table."] pub fn aws_hash_table_get_entry_count (map : * const aws_hash_table) -> usize ; } extern "C" { # [doc = " Returns an iterator to be used for iterating through a hash table."] # [doc = " Iterator will already point to the first element of the table it finds,"] # [doc = " which can be accessed as iter.element."] # [doc = ""] # [doc = " This function cannot fail, but if there are no elements in the table,"] # [doc = " the returned iterator will return true for aws_hash_iter_done(&iter)."] pub fn aws_hash_iter_begin (map : * const aws_hash_table) -> aws_hash_iter ; } extern "C" { # [doc = " Returns true if iterator is done iterating through table, false otherwise."] # [doc = " If this is true, the iterator will not include an element of the table."] pub fn aws_hash_iter_done (iter : * const aws_hash_iter) -> bool ; } extern "C" { # [doc = " Updates iterator so that it points to next element of hash table."] # [doc = ""] # [doc = " This and the two previous functions are designed to be used together with"] # [doc = " the following idiom:"] # [doc = ""] # [doc = " for (struct aws_hash_iter iter = aws_hash_iter_begin(&map);"] # [doc = "      !aws_hash_iter_done(&iter); aws_hash_iter_next(&iter)) {"] # [doc = "     const key_type key = *(const key_type *)iter.element.key;"] # [doc = "     value_type value = *(value_type *)iter.element.value;"] # [doc = "     // etc."] # [doc = " }"] # [doc = ""] # [doc = " Note that calling this on an iter which is \"done\" is idempotent:"] # [doc = " i.e. it will return another iter which is \"done\"."] pub fn aws_hash_iter_next (iter : * mut aws_hash_iter) ; } extern "C" { # [doc = " Deletes the element currently pointed-to by the hash iterator."] # [doc = " After calling this method, the element member of the iterator"] # [doc = " should not be accessed until the next call to aws_hash_iter_next."] # [doc = ""] # [doc = " @param destroy_contents If true, the destructors for the key and value"] # [doc = "  will be called."] pub fn aws_hash_iter_delete (iter : * mut aws_hash_iter , destroy_contents : bool) ; } extern "C" { # [doc = " Attempts to locate an element at key.  If the element is found, a"] # [doc = " pointer to the value is placed in *p_elem; if it is not found,"] # [doc = " *pElem is set to NULL. Either way, AWS_OP_SUCCESS is returned."] # [doc = ""] # [doc = " This method does not change the state of the hash table. Therefore, it"] # [doc = " is safe to call _find from multiple threads on the same hash table,"] # [doc = " provided no mutating operations happen in parallel."] # [doc = ""] # [doc = " Calling code may update the value in the hash table by modifying **pElem"] # [doc = " after a successful find. However, this pointer is not guaranteed to"] # [doc = " remain usable after a subsequent call to _put, _delete, _clear, or"] # [doc = " _clean_up."] pub fn aws_hash_table_find (map : * const aws_hash_table , key : * const :: std :: os :: raw :: c_void , p_elem : * mut * mut aws_hash_element) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Attempts to locate an element at key. If no such element was found,"] # [doc = " creates a new element, with value initialized to NULL. In either case, a"] # [doc = " pointer to the element is placed in *p_elem."] # [doc = ""] # [doc = " If was_created is non-NULL, *was_created is set to 0 if an existing"] # [doc = " element was found, or 1 is a new element was created."] # [doc = ""] # [doc = " Returns AWS_OP_SUCCESS if an item was found or created."] # [doc = " Raises AWS_ERROR_OOM if hash table expansion was required and memory"] # [doc = " allocation failed."] pub fn aws_hash_table_create (map : * mut aws_hash_table , key : * const :: std :: os :: raw :: c_void , p_elem : * mut * mut aws_hash_element , was_created : * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Inserts a new element at key, with the given value. If another element"] # [doc = " exists at that key, the old element will be overwritten; both old key and"] # [doc = " value objects will be destroyed."] # [doc = ""] # [doc = " If was_created is non-NULL, *was_created is set to 0 if an existing"] # [doc = " element was found, or 1 is a new element was created."] # [doc = ""] # [doc = " Returns AWS_OP_SUCCESS if an item was found or created."] # [doc = " Raises AWS_ERROR_OOM if hash table expansion was required and memory"] pub fn aws_hash_table_put (map : * mut aws_hash_table , key : * const :: std :: os :: raw :: c_void , value : * mut :: std :: os :: raw :: c_void , was_created : * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Removes element at key. Always returns AWS_OP_SUCCESS."] # [doc = ""] # [doc = " If pValue is non-NULL, the existing value (if any) is moved into"] # [doc = " (*value) before removing from the table, and destroy_fn is _not_"] # [doc = " invoked. If pValue is NULL, then (if the element existed) destroy_fn"] # [doc = " will be invoked on the element being removed."] # [doc = ""] # [doc = " If was_present is non-NULL, it is set to 0 if the element was"] # [doc = " not present, or 1 if it was present (and is now removed)."] pub fn aws_hash_table_remove (map : * mut aws_hash_table , key : * const :: std :: os :: raw :: c_void , p_value : * mut aws_hash_element , was_present : * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Removes element already known (typically by find())."] # [doc = ""] # [doc = " p_value should point to a valid element returned by create() or find()."] # [doc = ""] # [doc = " NOTE: DO NOT call this method from inside of a aws_hash_table_foreach callback, return"] # [doc = " AWS_COMMON_HASH_TABLE_ITER_DELETE instead."] pub fn aws_hash_table_remove_element (map : * mut aws_hash_table , p_value : * mut aws_hash_element) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Iterates through every element in the map and invokes the callback on"] # [doc = " that item. Iteration is performed in an arbitrary, implementation-defined"] # [doc = " order, and is not guaranteed to be consistent across invocations."] # [doc = ""] # [doc = " The callback may change the value associated with the key by overwriting"] # [doc = " the value pointed-to by value. In this case, the on_element_removed"] # [doc = " callback will not be invoked, unless the callback invokes"] # [doc = " AWS_COMMON_HASH_TABLE_ITER_DELETE (in which case the on_element_removed"] # [doc = " is given the updated value)."] # [doc = ""] # [doc = " The callback must return a bitmask of zero or more of the following values"] # [doc = " ORed together:"] # [doc = ""] # [doc = " # AWS_COMMON_HASH_TABLE_ITER_CONTINUE - Continues iteration to the next"] # [doc = "     element (if not set, iteration stops)"] # [doc = " # AWS_COMMON_HASH_TABLE_ITER_DELETE   - Deletes the current value and"] # [doc = "     continues iteration.  destroy_fn will NOT be invoked."] # [doc = " # AWS_COMMON_HASH_TABLE_ITER_ERROR   - Stop iteration with error."] # [doc = "     No action will be taken for the current value and the value before this."] # [doc = "     No rolling back. The deleted value before will NOT be back."] # [doc = "     aws_hash_table_foreach returns AWS_OP_ERR after stropping the iteration."] # [doc = ""] # [doc = " Invoking any method which may change the contents of the hashtable"] # [doc = " during iteration results in undefined behavior. However, you may safely"] # [doc = " invoke non-mutating operations during an iteration."] # [doc = ""] # [doc = " This operation is mutating only if AWS_COMMON_HASH_TABLE_ITER_DELETE"] # [doc = " is returned at some point during iteration. Otherwise, it is non-mutating"] # [doc = " and is safe to invoke in parallel with other non-mutating operations."] pub fn aws_hash_table_foreach (map : * mut aws_hash_table , callback : :: std :: option :: Option < unsafe extern "C" fn (context : * mut :: std :: os :: raw :: c_void , p_element : * mut aws_hash_element) -> :: std :: os :: raw :: c_int > , context : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Compares two hash tables for equality. Both hash tables must have equivalent"] # [doc = " key comparators; values will be compared using the comparator passed into this"] # [doc = " function. The key hash function does not need to be equivalent between the"] # [doc = " two hash tables."] pub fn aws_hash_table_eq (a : * const aws_hash_table , b : * const aws_hash_table , value_eq : aws_hash_callback_eq_fn) -> bool ; } extern "C" { # [doc = " Removes every element from the hash map. destroy_fn will be called for"] # [doc = " each element."] pub fn aws_hash_table_clear (map : * mut aws_hash_table) ; } extern "C" { # [doc = " Convenience hash function for NULL-terminated C-strings"] pub fn aws_hash_c_string (item : * const :: std :: os :: raw :: c_void) -> u64 ; } extern "C" { # [doc = " Convenience hash function for struct aws_strings."] # [doc = " Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_string (item : * const :: std :: os :: raw :: c_void) -> u64 ; } extern "C" { # [doc = " Convenience hash function for struct aws_byte_cursor."] # [doc = " Hash is same as used on the string bytes by aws_hash_c_string."] pub fn aws_hash_byte_cursor_ptr (item : * const :: std :: os :: raw :: c_void) -> u64 ; } extern "C" { # [doc = " Convenience hash function which hashes the pointer value directly,"] # [doc = " without dereferencing.  This can be used in cases where pointer identity"] # [doc = " is desired, or where a uintptr_t is encoded into a const void *."] pub fn aws_hash_ptr (item : * const :: std :: os :: raw :: c_void) -> u64 ; } extern "C" { pub fn aws_hash_combine (item1 : u64 , item2 : u64) -> u64 ; } extern "C" { # [doc = " Convenience eq callback for NULL-terminated C-strings"] pub fn aws_hash_callback_c_str_eq (a : * const :: std :: os :: raw :: c_void , b : * const :: std :: os :: raw :: c_void) -> bool ; } extern "C" { # [doc = " Convenience eq callback for AWS strings"] pub fn aws_hash_callback_string_eq (a : * const :: std :: os :: raw :: c_void , b : * const :: std :: os :: raw :: c_void) -> bool ; } extern "C" { # [doc = " Convenience destroy callback for AWS strings"] pub fn aws_hash_callback_string_destroy (a : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = " Equality function which compares pointer equality."] pub fn aws_ptr_eq (a : * const :: std :: os :: raw :: c_void , b : * const :: std :: os :: raw :: c_void) -> bool ; } extern "C" { # [doc = " Best-effort check of hash_table_state data-structure invariants"] pub fn aws_hash_table_is_valid (map : * const aws_hash_table) -> bool ; } extern "C" { # [doc = " Given a pointer to a hash_iter, checks that it is well-formed, with all data-structure invariants."] pub fn aws_hash_iter_is_valid (iter : * const aws_hash_iter) -> bool ; } # [doc = " Simple linked hash table. Preserves insertion order, and can be iterated in insertion order."] # [doc = ""] # [doc = " You can also change the order safely without altering the shape of the underlying hash table."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_linked_hash_table { pub allocator : * mut aws_allocator , pub list : aws_linked_list , pub table : aws_hash_table , pub user_on_value_destroy : aws_hash_callback_destroy_fn , pub user_on_key_destroy : aws_hash_callback_destroy_fn , } # [test] fn bindgen_test_layout_aws_linked_hash_table () { const UNINIT : :: std :: mem :: MaybeUninit < aws_linked_hash_table > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_linked_hash_table > () , 64usize , concat ! ("Size of: " , stringify ! (aws_linked_hash_table))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_linked_hash_table > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_linked_hash_table))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . table) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table) , "::" , stringify ! (table))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . user_on_value_destroy) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table) , "::" , stringify ! (user_on_value_destroy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . user_on_key_destroy) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table) , "::" , stringify ! (user_on_key_destroy))) ; } impl Default for aws_linked_hash_table { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Linked-List node stored in the table. This is the node type that will be returned in"] # [doc = " aws_linked_hash_table_get_iteration_list()."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_linked_hash_table_node { pub node : aws_linked_list_node , pub table : * mut aws_linked_hash_table , pub key : * const :: std :: os :: raw :: c_void , pub value : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_linked_hash_table_node () { const UNINIT : :: std :: mem :: MaybeUninit < aws_linked_hash_table_node > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_linked_hash_table_node > () , 40usize , concat ! ("Size of: " , stringify ! (aws_linked_hash_table_node))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_linked_hash_table_node > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_linked_hash_table_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . node) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table_node) , "::" , stringify ! (node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . table) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table_node) , "::" , stringify ! (table))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . key) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table_node) , "::" , stringify ! (key))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_linked_hash_table_node) , "::" , stringify ! (value))) ; } impl Default for aws_linked_hash_table_node { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Initializes the table. Sets up the underlying hash table and linked list."] # [doc = " For the other parameters, see aws/common/hash_table.h. Hash table"] # [doc = " semantics of these arguments are preserved."] pub fn aws_linked_hash_table_init (table : * mut aws_linked_hash_table , allocator : * mut aws_allocator , hash_fn : aws_hash_fn , equals_fn : aws_hash_callback_eq_fn , destroy_key_fn : aws_hash_callback_destroy_fn , destroy_value_fn : aws_hash_callback_destroy_fn , initial_item_count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cleans up the table. Elements in the table will be evicted and cleanup"] # [doc = " callbacks will be invoked."] pub fn aws_linked_hash_table_clean_up (table : * mut aws_linked_hash_table) ; } extern "C" { # [doc = " Finds element in the table by key. If found, AWS_OP_SUCCESS will be"] # [doc = " returned. If not found, AWS_OP_SUCCESS will be returned and *p_value will be"] # [doc = " NULL."] # [doc = ""] # [doc = " If any errors occur AWS_OP_ERR will be returned."] pub fn aws_linked_hash_table_find (table : * mut aws_linked_hash_table , key : * const :: std :: os :: raw :: c_void , p_value : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Finds element in the table by key. If found, AWS_OP_SUCCESS will be returned and the item will be moved to the back"] # [doc = " of the list."] # [doc = " If not found, AWS_OP_SUCCESS will be returned and *p_value will be NULL."] # [doc = ""] # [doc = " Note: this will change the order of elements"] pub fn aws_linked_hash_table_find_and_move_to_back (table : * mut aws_linked_hash_table , key : * const :: std :: os :: raw :: c_void , p_value : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Puts `p_value` at `key`. If an element is already stored at `key` it will be replaced."] pub fn aws_linked_hash_table_put (table : * mut aws_linked_hash_table , key : * const :: std :: os :: raw :: c_void , p_value : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Removes item at `key` from the table."] pub fn aws_linked_hash_table_remove (table : * mut aws_linked_hash_table , key : * const :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Clears all items from the table."] pub fn aws_linked_hash_table_clear (table : * mut aws_linked_hash_table) ; } extern "C" { # [doc = " returns number of elements in the table."] pub fn aws_linked_hash_table_get_element_count (table : * const aws_linked_hash_table) -> usize ; } extern "C" { # [doc = " Move the aws_linked_hash_table_node to the end of the list."] # [doc = ""] # [doc = " Note: this will change the order of elements"] pub fn aws_linked_hash_table_move_node_to_end_of_list (table : * mut aws_linked_hash_table , node : * mut aws_linked_hash_table_node) ; } extern "C" { # [doc = " returns the underlying linked list for iteration."] # [doc = ""] # [doc = " The returned list has nodes of the type: aws_linked_hash_table_node. Use AWS_CONTAINER_OF for access to the element."] pub fn aws_linked_hash_table_get_iteration_list (table : * const aws_linked_hash_table) -> * const aws_linked_list ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_cache_vtable { pub destroy : :: std :: option :: Option < unsafe extern "C" fn (cache : * mut aws_cache) > , pub find : :: std :: option :: Option < unsafe extern "C" fn (cache : * mut aws_cache , key : * const :: std :: os :: raw :: c_void , p_value : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , pub put : :: std :: option :: Option < unsafe extern "C" fn (cache : * mut aws_cache , key : * const :: std :: os :: raw :: c_void , p_value : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , pub remove : :: std :: option :: Option < unsafe extern "C" fn (cache : * mut aws_cache , key : * const :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , pub clear : :: std :: option :: Option < unsafe extern "C" fn (cache : * mut aws_cache) > , pub get_element_count : :: std :: option :: Option < unsafe extern "C" fn (cache : * const aws_cache) -> usize > , } # [test] fn bindgen_test_layout_aws_cache_vtable () { const UNINIT : :: std :: mem :: MaybeUninit < aws_cache_vtable > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_cache_vtable > () , 48usize , concat ! ("Size of: " , stringify ! (aws_cache_vtable))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_cache_vtable > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_cache_vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . destroy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_cache_vtable) , "::" , stringify ! (destroy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . find) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_cache_vtable) , "::" , stringify ! (find))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . put) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_cache_vtable) , "::" , stringify ! (put))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_cache_vtable) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . clear) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_cache_vtable) , "::" , stringify ! (clear))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_element_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (aws_cache_vtable) , "::" , stringify ! (get_element_count))) ; } # [doc = " Base stucture for caches, used the linked hash table implementation."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_cache { pub allocator : * mut aws_allocator , pub vtable : * const aws_cache_vtable , pub table : aws_linked_hash_table , pub max_items : usize , pub impl_ : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_cache () { const UNINIT : :: std :: mem :: MaybeUninit < aws_cache > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_cache > () , 96usize , concat ! ("Size of: " , stringify ! (aws_cache))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_cache > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_cache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_cache) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . vtable) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_cache) , "::" , stringify ! (vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . table) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_cache) , "::" , stringify ! (table))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_items) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (aws_cache) , "::" , stringify ! (max_items))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . impl_) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (aws_cache) , "::" , stringify ! (impl_))) ; } impl Default for aws_cache { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn aws_cache_base_default_destroy (cache : * mut aws_cache) ; } extern "C" { pub fn aws_cache_base_default_find (cache : * mut aws_cache , key : * const :: std :: os :: raw :: c_void , p_value : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_cache_base_default_remove (cache : * mut aws_cache , key : * const :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_cache_base_default_clear (cache : * mut aws_cache) ; } extern "C" { pub fn aws_cache_base_default_get_element_count (cache : * const aws_cache) -> usize ; } extern "C" { # [doc = " Cleans up the cache. Elements in the cache will be evicted and cleanup"] # [doc = " callbacks will be invoked."] pub fn aws_cache_destroy (cache : * mut aws_cache) ; } extern "C" { # [doc = " Finds element in the cache by key. If found, *p_value will hold the stored value, and AWS_OP_SUCCESS will be"] # [doc = " returned. If not found, AWS_OP_SUCCESS will be returned and *p_value will be NULL."] # [doc = ""] # [doc = " If any errors occur AWS_OP_ERR will be returned."] pub fn aws_cache_find (cache : * mut aws_cache , key : * const :: std :: os :: raw :: c_void , p_value : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Puts `p_value` at `key`. If an element is already stored at `key` it will be replaced. If the cache is already full,"] # [doc = " an item will be removed based on the cache policy."] pub fn aws_cache_put (cache : * mut aws_cache , key : * const :: std :: os :: raw :: c_void , p_value : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Removes item at `key` from the cache."] pub fn aws_cache_remove (cache : * mut aws_cache , key : * const :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Clears all items from the cache."] pub fn aws_cache_clear (cache : * mut aws_cache) ; } extern "C" { # [doc = " Returns the number of elements in the cache."] pub fn aws_cache_get_element_count (cache : * const aws_cache) -> usize ; } extern "C" { # [doc = " Initializes the first-in-first-out cache. Sets up the underlying linked hash table."] # [doc = " Once `max_items` elements have been added, the oldest(first-in) item will"] # [doc = " be removed. For the other parameters, see aws/common/hash_table.h. Hash table"] # [doc = " semantics of these arguments are preserved."] pub fn aws_cache_new_fifo (allocator : * mut aws_allocator , hash_fn : aws_hash_fn , equals_fn : aws_hash_callback_eq_fn , destroy_key_fn : aws_hash_callback_destroy_fn , destroy_value_fn : aws_hash_callback_destroy_fn , max_items : usize) -> * mut aws_cache ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_json_value { _unused : [u8 ; 0] , } extern "C" { # [doc = " Creates a new string aws_json_value with the given string and returns a pointer to it."] # [doc = ""] # [doc = " Note: You will need to free the memory for the aws_json_value using aws_json_destroy on the aws_json_value or"] # [doc = " on the object/array containing the aws_json_value."] # [doc = " @param string A byte pointer to the string you want to store in the aws_json_value"] # [doc = " @param allocator The allocator to use when creating the value"] # [doc = " @return A new string aws_json_value"] pub fn aws_json_value_new_string (allocator : * mut aws_allocator , string : aws_byte_cursor) -> * mut aws_json_value ; } extern "C" { # [doc = " Creates a new number aws_json_value with the given number and returns a pointer to it."] # [doc = ""] # [doc = " Note: You will need to free the memory for the aws_json_value using aws_json_destroy on the aws_json_value or"] # [doc = " on the object/array containing the aws_json_value."] # [doc = " @param number The number you want to store in the aws_json_value"] # [doc = " @param allocator The allocator to use when creating the value"] # [doc = " @return A new number aws_json_value"] pub fn aws_json_value_new_number (allocator : * mut aws_allocator , number : f64) -> * mut aws_json_value ; } extern "C" { # [doc = " Creates a new array aws_json_value and returns a pointer to it."] # [doc = ""] # [doc = " Note: You will need to free the memory for the aws_json_value using aws_json_destroy on the aws_json_value or"] # [doc = " on the object/array containing the aws_json_value."] # [doc = " Deleting this array will also destroy any aws_json_values it contains."] # [doc = " @param allocator The allocator to use when creating the value"] # [doc = " @return A new array aws_json_value"] pub fn aws_json_value_new_array (allocator : * mut aws_allocator) -> * mut aws_json_value ; } extern "C" { # [doc = " Creates a new boolean aws_json_value with the given boolean and returns a pointer to it."] # [doc = ""] # [doc = " Note: You will need to free the memory for the aws_json_value using aws_json_destroy on the aws_json_value or"] # [doc = " on the object/array containing the aws_json_value."] # [doc = " @param boolean The boolean you want to store in the aws_json_value"] # [doc = " @param allocator The allocator to use when creating the value"] # [doc = " @return A new boolean aws_json_value"] pub fn aws_json_value_new_boolean (allocator : * mut aws_allocator , boolean : bool) -> * mut aws_json_value ; } extern "C" { # [doc = " Creates a new null aws_json_value and returns a pointer to it."] # [doc = ""] # [doc = " Note: You will need to free the memory for the aws_json_value using aws_json_destroy on the aws_json_value or"] # [doc = " on the object/array containing the aws_json_value."] # [doc = " @param allocator The allocator to use when creating the value"] # [doc = " @return A new null aws_json_value"] pub fn aws_json_value_new_null (allocator : * mut aws_allocator) -> * mut aws_json_value ; } extern "C" { # [doc = " Creates a new object aws_json_value and returns a pointer to it."] # [doc = ""] # [doc = " Note: You will need to free the memory for the aws_json_value using aws_json_destroy on the aws_json_value or"] # [doc = " on the object/array containing the aws_json_value."] # [doc = " Deleting this object will also destroy any aws_json_values it contains."] # [doc = " @param allocator The allocator to use when creating the value"] # [doc = " @return A new object aws_json_value"] pub fn aws_json_value_new_object (allocator : * mut aws_allocator) -> * mut aws_json_value ; } extern "C" { # [doc = " Gets the string of a string aws_json_value."] # [doc = " @param value The string aws_json_value."] # [doc = " @param output The string"] # [doc = " @return AWS_OP_SUCCESS if the value is a string, otherwise AWS_OP_ERR."] pub fn aws_json_value_get_string (value : * const aws_json_value , output : * mut aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gets the number of a number aws_json_value."] # [doc = " @param value The number aws_json_value."] # [doc = " @param output The number"] # [doc = " @return AWS_OP_SUCCESS if the value is a number, otherwise AWS_OP_ERR."] pub fn aws_json_value_get_number (value : * const aws_json_value , output : * mut f64) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gets the boolean of a boolean aws_json_value."] # [doc = " @param value The boolean aws_json_value."] # [doc = " @param output The boolean"] # [doc = " @return AWS_OP_SUCCESS if the value is a boolean, otherwise AWS_OP_ERR."] pub fn aws_json_value_get_boolean (value : * const aws_json_value , output : * mut bool) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Adds a aws_json_value to a object aws_json_value."] # [doc = ""] # [doc = " Note that the aws_json_value will be destroyed when the aws_json_value object is destroyed"] # [doc = " by calling \"aws_json_destroy()\""] # [doc = " @param object The object aws_json_value you want to add a value to."] # [doc = " @param key The key to add the aws_json_value at."] # [doc = " @param value The aws_json_value you want to add."] # [doc = " @return AWS_OP_SUCCESS if adding was successful."] # [doc = "          Will return AWS_OP_ERROR if the object passed is invalid or if the passed key"] # [doc = "          is already in use in the object."] pub fn aws_json_value_add_to_object (object : * mut aws_json_value , key : aws_byte_cursor , value : * mut aws_json_value) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Returns the aws_json_value at the given key."] # [doc = " @param object The object aws_json_value you want to get the value from."] # [doc = " @param key The key that the aws_json_value is at. Is case sensitive."] # [doc = " @return The aws_json_value at the given key, otherwise NULL."] pub fn aws_json_value_get_from_object (object : * const aws_json_value , key : aws_byte_cursor) -> * mut aws_json_value ; } extern "C" { # [doc = " Checks if there is a aws_json_value at the given key."] # [doc = " @param object The value aws_json_value you want to check a key in."] # [doc = " @param key The key that you want to check. Is case sensitive."] # [doc = " @return True if a aws_json_value is found."] pub fn aws_json_value_has_key (object : * const aws_json_value , key : aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Removes the aws_json_value at the given key."] # [doc = " @param object The object aws_json_value you want to remove a aws_json_value in."] # [doc = " @param key The key that the aws_json_value is at. Is case sensitive."] # [doc = " @return AWS_OP_SUCCESS if the aws_json_value was removed."] # [doc = "          Will return AWS_OP_ERR if the object passed is invalid or if the value"] # [doc = "          at the key cannot be found."] pub fn aws_json_value_remove_from_object (object : * mut aws_json_value , key : aws_byte_cursor) -> :: std :: os :: raw :: c_int ; } # [doc = " @brief callback for iterating members of an object"] # [doc = " Iteration can be controlled as follows:"] # [doc = " - return AWS_OP_SUCCESS and out_should_continue is set to true (default value) -"] # [doc = "   continue iteration without error"] # [doc = " - return AWS_OP_SUCCESS and out_continue is set to false -"] # [doc = "   stop iteration without error"] # [doc = " - return AWS_OP_ERR - stop iteration with error"] pub type aws_json_on_member_encountered_const_fn = :: std :: option :: Option < unsafe extern "C" fn (key : * const aws_byte_cursor , value : * const aws_json_value , out_should_continue : * mut bool , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " @brief iterates through members of the object."] # [doc = " iteration is sequential in order fields were initially parsed."] # [doc = " @param object object to iterate over."] # [doc = " @param on_member callback for when member is encountered."] # [doc = " @param user_data user data to pass back in callback."] # [doc = " @return AWS_OP_SUCCESS when iteration finishes completely or exits early,"] # [doc = " AWS_OP_ERR if value is not an object."] pub fn aws_json_const_iterate_object (object : * const aws_json_value , on_member : aws_json_on_member_encountered_const_fn , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Adds a aws_json_value to the given array aws_json_value."] # [doc = ""] # [doc = " Note that the aws_json_value will be destroyed when the aws_json_value array is destroyed"] # [doc = " by calling \"aws_json_destroy()\""] # [doc = " @param array The array aws_json_value you want to add an aws_json_value to."] # [doc = " @param value The aws_json_value you want to add."] # [doc = " @return AWS_OP_SUCCESS if adding the aws_json_value was successful."] # [doc = "          Will return AWS_OP_ERR if the array passed is invalid."] pub fn aws_json_value_add_array_element (array : * mut aws_json_value , value : * const aws_json_value) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Returns the aws_json_value at the given index in the array aws_json_value."] # [doc = " @param array The array aws_json_value."] # [doc = " @param index The index of the aws_json_value you want to access."] # [doc = " @return A pointer to the aws_json_value at the given index in the array, otherwise NULL."] pub fn aws_json_get_array_element (array : * const aws_json_value , index : usize) -> * mut aws_json_value ; } extern "C" { # [doc = " Returns the number of items in the array aws_json_value."] # [doc = " @param array The array aws_json_value."] # [doc = " @return The number of items in the array_json_value."] pub fn aws_json_get_array_size (array : * const aws_json_value) -> usize ; } extern "C" { # [doc = " Removes the aws_json_value at the given index in the array aws_json_value."] # [doc = " @param array The array aws_json_value."] # [doc = " @param index The index containing the aws_json_value you want to remove."] # [doc = " @return AWS_OP_SUCCESS if the aws_json_value at the index was removed."] # [doc = "          Will return AWS_OP_ERR if the array passed is invalid or if the index"] # [doc = "          passed is out of range."] pub fn aws_json_value_remove_array_element (array : * mut aws_json_value , index : usize) -> :: std :: os :: raw :: c_int ; } # [doc = " @brief callback for iterating values of an array."] # [doc = " Iteration can be controlled as follows:"] # [doc = " - return AWS_OP_SUCCESS and out_should_continue is set to true (default value) -"] # [doc = "   continue iteration without error"] # [doc = " - return AWS_OP_SUCCESS and out_continue is set to false -"] # [doc = "   stop iteration without error"] # [doc = " - return AWS_OP_ERR - stop iteration with error"] pub type aws_json_on_value_encountered_const_fn = :: std :: option :: Option < unsafe extern "C" fn (index : usize , value : * const aws_json_value , out_should_continue : * mut bool , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = " @brief iterates through values of an array."] # [doc = " iteration is sequential starting with 0th element."] # [doc = " @param array array to iterate over."] # [doc = " @param on_value callback for when value is encountered."] # [doc = " @param user_data user data to pass back in callback."] # [doc = " @return AWS_OP_SUCCESS when iteration finishes completely or exits early,"] # [doc = " AWS_OP_ERR if value is not an array."] pub fn aws_json_const_iterate_array (array : * const aws_json_value , on_value : aws_json_on_value_encountered_const_fn , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Checks whether two json values are equivalent."] # [doc = " @param a first value to compare."] # [doc = " @param b second value to compare."] # [doc = " @param is_case_sensitive case sensitive compare or not."] # [doc = " @return True is values are equal, false otherwise"] pub fn aws_json_value_compare (a : * const aws_json_value , b : * const aws_json_value , is_case_sensitive : bool) -> bool ; } extern "C" { # [doc = " Duplicates json value."] # [doc = " @param value first value to compare."] # [doc = " @return duplicated value. NULL and last error set if value cannot be duplicated."] pub fn aws_json_value_duplicate (value : * const aws_json_value) -> * mut aws_json_value ; } extern "C" { # [doc = " Checks if the aws_json_value is a string."] # [doc = " @param value The aws_json_value to check."] # [doc = " @return True if the aws_json_value is a string aws_json_value, otherwise false."] pub fn aws_json_value_is_string (value : * const aws_json_value) -> bool ; } extern "C" { # [doc = " Checks if the aws_json_value is a number."] # [doc = " @param value The aws_json_value to check."] # [doc = " @return True if the aws_json_value is a number aws_json_value, otherwise false."] pub fn aws_json_value_is_number (value : * const aws_json_value) -> bool ; } extern "C" { # [doc = " Checks if the aws_json_value is a array."] # [doc = " @param value The aws_json_value to check."] # [doc = " @return True if the aws_json_value is a array aws_json_value, otherwise false."] pub fn aws_json_value_is_array (value : * const aws_json_value) -> bool ; } extern "C" { # [doc = " Checks if the aws_json_value is a boolean."] # [doc = " @param value The aws_json_value to check."] # [doc = " @return True if the aws_json_value is a boolean aws_json_value, otherwise false."] pub fn aws_json_value_is_boolean (value : * const aws_json_value) -> bool ; } extern "C" { # [doc = " Checks if the aws_json_value is a null aws_json_value."] # [doc = " @param value The aws_json_value to check."] # [doc = " @return True if the aws_json_value is a null aws_json_value, otherwise false."] pub fn aws_json_value_is_null (value : * const aws_json_value) -> bool ; } extern "C" { # [doc = " Checks if the aws_json_value is a object aws_json_value."] # [doc = " @param value The aws_json_value to check."] # [doc = " @return True if the aws_json_value is a object aws_json_value, otherwise false."] pub fn aws_json_value_is_object (value : * const aws_json_value) -> bool ; } extern "C" { # [doc = " Removes the aws_json_value from memory. If the aws_json_value is a object or array, it will also destroy"] # [doc = " attached aws_json_values as well."] # [doc = ""] # [doc = " For example, if you called \"aws_json_array_add(b, a)\" to add an object \"a\" to an array \"b\", if you call"] # [doc = " \"aws_json_destroy(b)\" then it will also free \"a\" automatically. All children/attached aws_json_values are freed"] # [doc = " when the parent/root aws_json_value is destroyed."] # [doc = " @param value The aws_json_value to destroy."] pub fn aws_json_value_destroy (value : * mut aws_json_value) ; } extern "C" { # [doc = " Appends a unformatted JSON string representation of the aws_json_value into the passed byte buffer."] # [doc = " The byte buffer is expected to be already initialized so the function can append the JSON into it."] # [doc = ""] # [doc = " Note: The byte buffer will automatically have its size extended if the JSON string is over the byte"] # [doc = " buffer capacity AND the byte buffer has an allocator associated with it. If the byte buffer does not"] # [doc = " have an allocator associated and the JSON string is over capacity, AWS_OP_ERR will be returned."] # [doc = ""] # [doc = " Note: When you are finished with the aws_byte_buf, you must call \"aws_byte_buf_clean_up_secure\" to free"] # [doc = " the memory used, as it will NOT be called automatically."] # [doc = " @param value The aws_json_value to format."] # [doc = " @param output The destination for the JSON string"] # [doc = " @return AWS_OP_SUCCESS if the JSON string was allocated to output without any errors"] # [doc = "      Will return AWS_OP_ERR if the value passed is not an aws_json_value or if there"] # [doc = "      was an error appending the JSON into the byte buffer."] pub fn aws_byte_buf_append_json_string (value : * const aws_json_value , output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Appends a formatted JSON string representation of the aws_json_value into the passed byte buffer."] # [doc = " The byte buffer is expected to already be initialized so the function can append the JSON into it."] # [doc = ""] # [doc = " Note: The byte buffer will automatically have its size extended if the JSON string is over the byte"] # [doc = " buffer capacity AND the byte buffer has an allocator associated with it. If the byte buffer does not"] # [doc = " have an allocator associated and the JSON string is over capacity, AWS_OP_ERR will be returned."] # [doc = ""] # [doc = " Note: When you are finished with the aws_byte_buf, you must call \"aws_byte_buf_clean_up_secure\" to free"] # [doc = " the memory used, as it will NOT be called automatically."] # [doc = " @param value The aws_json_value to format."] # [doc = " @param output The destination for the JSON string"] # [doc = " @return AWS_OP_SUCCESS if the JSON string was allocated to output without any errors"] # [doc = "      Will return AWS_ERROR_INVALID_ARGUMENT if the value passed is not an aws_json_value or if there"] # [doc = "      aws an error appending the JSON into the byte buffer."] pub fn aws_byte_buf_append_json_string_formatted (value : * const aws_json_value , output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Parses the JSON string and returns a aws_json_value containing the root of the JSON."] # [doc = " @param allocator The allocator used to create the value"] # [doc = " @param string The string containing the JSON."] # [doc = " @return The root aws_json_value of the JSON."] pub fn aws_json_value_new_from_string (allocator : * mut aws_allocator , string : aws_byte_cursor) -> * mut aws_json_value ; } pub const aws_date_format_AWS_DATE_FORMAT_RFC822 : aws_date_format = 0 ; pub const aws_date_format_AWS_DATE_FORMAT_ISO_8601 : aws_date_format = 1 ; pub const aws_date_format_AWS_DATE_FORMAT_ISO_8601_BASIC : aws_date_format = 2 ; pub const aws_date_format_AWS_DATE_FORMAT_AUTO_DETECT : aws_date_format = 3 ; pub type aws_date_format = :: std :: os :: raw :: c_uint ; pub const aws_date_month_AWS_DATE_MONTH_JANUARY : aws_date_month = 0 ; pub const aws_date_month_AWS_DATE_MONTH_FEBRUARY : aws_date_month = 1 ; pub const aws_date_month_AWS_DATE_MONTH_MARCH : aws_date_month = 2 ; pub const aws_date_month_AWS_DATE_MONTH_APRIL : aws_date_month = 3 ; pub const aws_date_month_AWS_DATE_MONTH_MAY : aws_date_month = 4 ; pub const aws_date_month_AWS_DATE_MONTH_JUNE : aws_date_month = 5 ; pub const aws_date_month_AWS_DATE_MONTH_JULY : aws_date_month = 6 ; pub const aws_date_month_AWS_DATE_MONTH_AUGUST : aws_date_month = 7 ; pub const aws_date_month_AWS_DATE_MONTH_SEPTEMBER : aws_date_month = 8 ; pub const aws_date_month_AWS_DATE_MONTH_OCTOBER : aws_date_month = 9 ; pub const aws_date_month_AWS_DATE_MONTH_NOVEMBER : aws_date_month = 10 ; pub const aws_date_month_AWS_DATE_MONTH_DECEMBER : aws_date_month = 11 ; pub type aws_date_month = :: std :: os :: raw :: c_uint ; pub const aws_date_day_of_week_AWS_DATE_DAY_OF_WEEK_SUNDAY : aws_date_day_of_week = 0 ; pub const aws_date_day_of_week_AWS_DATE_DAY_OF_WEEK_MONDAY : aws_date_day_of_week = 1 ; pub const aws_date_day_of_week_AWS_DATE_DAY_OF_WEEK_TUESDAY : aws_date_day_of_week = 2 ; pub const aws_date_day_of_week_AWS_DATE_DAY_OF_WEEK_WEDNESDAY : aws_date_day_of_week = 3 ; pub const aws_date_day_of_week_AWS_DATE_DAY_OF_WEEK_THURSDAY : aws_date_day_of_week = 4 ; pub const aws_date_day_of_week_AWS_DATE_DAY_OF_WEEK_FRIDAY : aws_date_day_of_week = 5 ; pub const aws_date_day_of_week_AWS_DATE_DAY_OF_WEEK_SATURDAY : aws_date_day_of_week = 6 ; pub type aws_date_day_of_week = :: std :: os :: raw :: c_uint ; # [repr (C)] pub struct aws_date_time { pub timestamp : time_t , pub milliseconds : u16 , pub tz : [:: std :: os :: raw :: c_char ; 6usize] , pub gmt_time : tm , pub local_time : tm , pub utc_assumed : bool , } # [test] fn bindgen_test_layout_aws_date_time () { const UNINIT : :: std :: mem :: MaybeUninit < aws_date_time > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_date_time > () , 136usize , concat ! ("Size of: " , stringify ! (aws_date_time))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_date_time > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_date_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . timestamp) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_date_time) , "::" , stringify ! (timestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . milliseconds) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_date_time) , "::" , stringify ! (milliseconds))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tz) as usize - ptr as usize } , 10usize , concat ! ("Offset of field: " , stringify ! (aws_date_time) , "::" , stringify ! (tz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gmt_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_date_time) , "::" , stringify ! (gmt_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . local_time) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (aws_date_time) , "::" , stringify ! (local_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . utc_assumed) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (aws_date_time) , "::" , stringify ! (utc_assumed))) ; } impl Default for aws_date_time { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Initializes dt to be the current system time."] pub fn aws_date_time_init_now (dt : * mut aws_date_time) ; } extern "C" { # [doc = " Initializes dt to be the time represented in milliseconds since unix epoch."] pub fn aws_date_time_init_epoch_millis (dt : * mut aws_date_time , ms_since_epoch : u64) ; } extern "C" { # [doc = " Initializes dt to be the time represented in seconds.millis since unix epoch."] pub fn aws_date_time_init_epoch_secs (dt : * mut aws_date_time , sec_ms : f64) ; } extern "C" { # [doc = " Initializes dt to be the time represented by date_str in format 'fmt'. Returns AWS_OP_SUCCESS if the"] # [doc = " string was successfully parsed, returns  AWS_OP_ERR if parsing failed."] # [doc = ""] # [doc = " Notes for AWS_DATE_FORMAT_RFC822:"] # [doc = " If no time zone information is provided, it is assumed to be local time (please don't do this)."] # [doc = ""] # [doc = " If the time zone is something other than something indicating Universal Time (e.g. Z, UT, UTC, or GMT) or an offset"] # [doc = " from UTC (e.g. +0100, -0700), parsing will fail."] # [doc = ""] # [doc = " Really, it's just better if you always use Universal Time."] pub fn aws_date_time_init_from_str (dt : * mut aws_date_time , date_str : * const aws_byte_buf , fmt : aws_date_format) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " aws_date_time_init variant that takes a byte_cursor rather than a byte_buf"] pub fn aws_date_time_init_from_str_cursor (dt : * mut aws_date_time , date_str_cursor : * const aws_byte_cursor , fmt : aws_date_format) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies the current time as a formatted date string in local time into output_buf. If buffer is too small, it will"] # [doc = " return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not"] # [doc = " allowed."] pub fn aws_date_time_to_local_time_str (dt : * const aws_date_time , fmt : aws_date_format , output_buf : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies the current time as a formatted date string in utc time into output_buf. If buffer is too small, it will"] # [doc = " return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not"] # [doc = " allowed."] pub fn aws_date_time_to_utc_time_str (dt : * const aws_date_time , fmt : aws_date_format , output_buf : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies the current time as a formatted short date string in local time into output_buf. If buffer is too small, it"] # [doc = " will return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not"] # [doc = " allowed."] pub fn aws_date_time_to_local_time_short_str (dt : * const aws_date_time , fmt : aws_date_format , output_buf : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies the current time as a formatted short date string in utc time into output_buf. If buffer is too small, it will"] # [doc = " return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not"] # [doc = " allowed."] pub fn aws_date_time_to_utc_time_short_str (dt : * const aws_date_time , fmt : aws_date_format , output_buf : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_date_time_as_epoch_secs (dt : * const aws_date_time) -> f64 ; } extern "C" { pub fn aws_date_time_as_nanos (dt : * const aws_date_time) -> u64 ; } extern "C" { pub fn aws_date_time_as_millis (dt : * const aws_date_time) -> u64 ; } extern "C" { pub fn aws_date_time_year (dt : * const aws_date_time , local_time : bool) -> u16 ; } extern "C" { pub fn aws_date_time_month (dt : * const aws_date_time , local_time : bool) -> aws_date_month ; } extern "C" { pub fn aws_date_time_month_day (dt : * const aws_date_time , local_time : bool) -> u8 ; } extern "C" { pub fn aws_date_time_day_of_week (dt : * const aws_date_time , local_time : bool) -> aws_date_day_of_week ; } extern "C" { pub fn aws_date_time_hour (dt : * const aws_date_time , local_time : bool) -> u8 ; } extern "C" { pub fn aws_date_time_minute (dt : * const aws_date_time , local_time : bool) -> u8 ; } extern "C" { pub fn aws_date_time_second (dt : * const aws_date_time , local_time : bool) -> u8 ; } extern "C" { pub fn aws_date_time_dst (dt : * const aws_date_time , local_time : bool) -> bool ; } extern "C" { # [doc = " returns the difference of a and b (a - b) in seconds."] pub fn aws_date_time_diff (a : * const aws_date_time , b : * const aws_date_time) -> time_t ; } # [doc = " struct aws_atomic_var represents an atomic variable - a value which can hold an integer or pointer"] # [doc = " that can be manipulated atomically. struct aws_atomic_vars should normally only be manipulated"] # [doc = " with atomics methods defined in this header."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_atomic_var { pub value : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_atomic_var () { const UNINIT : :: std :: mem :: MaybeUninit < aws_atomic_var > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_atomic_var > () , 8usize , concat ! ("Size of: " , stringify ! (aws_atomic_var))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_atomic_var > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_atomic_var))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_atomic_var) , "::" , stringify ! (value))) ; } impl Default for aws_atomic_var { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " No particular ordering constraints are guaranteed relative to other"] # [doc = " operations at all; we merely ensure that the operation itself is atomic."] pub const aws_memory_order_aws_memory_order_relaxed : aws_memory_order = 0 ; # [doc = " Specifies acquire ordering. No reads or writes on the current thread can be"] # [doc = " reordered to happen before this operation. This is typically paired with a release"] # [doc = " ordering; any writes that happened on the releasing operation will be visible"] # [doc = " after the paired acquire operation."] # [doc = ""] # [doc = " Acquire ordering is only meaningful on load or load-store operations."] pub const aws_memory_order_aws_memory_order_acquire : aws_memory_order = 2 ; # [doc = " Specifies release order. No reads or writes can be reordered to come after this"] # [doc = " operation. Typically paired with an acquire operation."] # [doc = ""] # [doc = " Release ordering is only meaningful on store or load-store operations."] pub const aws_memory_order_aws_memory_order_release : aws_memory_order = 3 ; # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an"] # [doc = " acquire operation; if it acts as a store, it acts as a release operation; if it's"] # [doc = " a load-store, it does both."] pub const aws_memory_order_aws_memory_order_acq_rel : aws_memory_order = 4 ; # [doc = " Specifies acquire-release order; if this operation acts as a load, it acts as an"] # [doc = " acquire operation; if it acts as a store, it acts as a release operation; if it's"] # [doc = " a load-store, it does both."] pub const aws_memory_order_aws_memory_order_seq_cst : aws_memory_order = 5 ; pub type aws_memory_order = :: std :: os :: raw :: c_uint ; pub type aws_atomic_impl_int_t = usize ; pub const aws_thread_detach_state_AWS_THREAD_NOT_CREATED : aws_thread_detach_state = 1 ; pub const aws_thread_detach_state_AWS_THREAD_JOINABLE : aws_thread_detach_state = 2 ; pub const aws_thread_detach_state_AWS_THREAD_JOIN_COMPLETED : aws_thread_detach_state = 3 ; pub const aws_thread_detach_state_AWS_THREAD_MANAGED : aws_thread_detach_state = 4 ; pub type aws_thread_detach_state = :: std :: os :: raw :: c_uint ; pub const aws_thread_join_strategy_AWS_TJS_MANUAL : aws_thread_join_strategy = 0 ; pub const aws_thread_join_strategy_AWS_TJS_MANAGED : aws_thread_join_strategy = 1 ; # [doc = " Specifies the join strategy used on an aws_thread, which in turn controls whether or not a thread participates"] # [doc = " in the managed thread system.  The managed thread system provides logic to guarantee a join on all participating"] # [doc = " threads at the cost of laziness (the user cannot control when joins happen)."] # [doc = ""] # [doc = " Manual - thread does not particpate in the managed thread system; any joins must be done by the user.  This"] # [doc = " is the default.  The user must call aws_thread_clean_up(), but only after any desired join operation has completed."] # [doc = " Not doing so will cause the windows handle to leak."] # [doc = ""] # [doc = " Managed - the managed thread system will automatically perform a join some time after the thread's run function"] # [doc = " has completed.  It is an error to call aws_thread_join on a thread configured with the managed join strategy.  The"] # [doc = " managed thread system will call aws_thread_clean_up() on the thread after the background join has completed."] # [doc = ""] # [doc = " Additionally, an API exists, aws_thread_join_all_managed(), which blocks and returns when all outstanding threads"] # [doc = " with the managed strategy have fully joined.  This API is useful for tests (rather than waiting for many individual"] # [doc = " signals) and program shutdown or DLL unload.  This API is automatically invoked by the common library clean up"] # [doc = " function.  If the common library clean up is called from a managed thread, this will cause deadlock."] # [doc = ""] # [doc = " Lazy thread joining is done only when threads finish their run function or when the user calls"] # [doc = " aws_thread_join_all_managed().  This means it may be a long time between thread function completion and the join"] # [doc = " being applied, but the queue of unjoined threads is always one or fewer so there is no critical resource"] # [doc = " backlog."] # [doc = ""] # [doc = " Currently, only event loop group async cleanup and host resolver threads participate in the managed thread system."] # [doc = " Additionally, event loop threads will increment and decrement the pending join count (they are manually joined"] # [doc = " internally) in order to have an accurate view of internal thread usage and also to prevent failure to release"] # [doc = " an event loop group fully from allowing aws_thread_join_all_managed() from running to completion when its"] # [doc = " intent is such that it should block instead."] pub type aws_thread_join_strategy = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_thread_options { pub stack_size : usize , pub cpu_id : i32 , pub join_strategy : aws_thread_join_strategy , # [doc = " Thread name, for debugging purpose."] # [doc = " The length should not exceed AWS_THREAD_NAME_RECOMMENDED_STRLEN(15)"] # [doc = " if you want it to display properly on all platforms."] pub name : aws_byte_cursor , } # [test] fn bindgen_test_layout_aws_thread_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_thread_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_thread_options > () , 32usize , concat ! ("Size of: " , stringify ! (aws_thread_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_thread_options > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_thread_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stack_size) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_thread_options) , "::" , stringify ! (stack_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_thread_options) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . join_strategy) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (aws_thread_options) , "::" , stringify ! (join_strategy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_thread_options) , "::" , stringify ! (name))) ; } impl Default for aws_thread_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub type aws_thread_once = pthread_once_t ; pub type aws_thread_id_t = pthread_t ; # [repr (C)] pub struct aws_thread { pub allocator : * mut aws_allocator , pub detach_state : aws_thread_detach_state , pub thread_id : aws_thread_id_t , } # [test] fn bindgen_test_layout_aws_thread () { const UNINIT : :: std :: mem :: MaybeUninit < aws_thread > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_thread > () , 24usize , concat ! ("Size of: " , stringify ! (aws_thread))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_thread > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_thread))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_thread) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . detach_state) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_thread) , "::" , stringify ! (detach_state))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . thread_id) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_thread) , "::" , stringify ! (thread_id))) ; } impl Default for aws_thread { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Returns an instance of system default thread options."] pub fn aws_default_thread_options () -> * const aws_thread_options ; } extern "C" { pub fn aws_thread_call_once (flag : * mut aws_thread_once , call_once : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = " Initializes a new platform specific thread object struct (not the os-level"] # [doc = " thread itself)."] pub fn aws_thread_init (thread : * mut aws_thread , allocator : * mut aws_allocator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Creates an OS level thread and associates it with func. context will be passed to func when it is executed."] # [doc = " options will be applied to the thread if they are applicable for the platform."] # [doc = ""] # [doc = " After launch, you may join on the thread.  A successfully launched thread must have clean_up called on it in order"] # [doc = " to avoid a handle leak.  If you do not join before calling clean_up, the thread will become detached."] # [doc = ""] # [doc = " Managed threads must not have join or clean_up called on them by external code."] pub fn aws_thread_launch (thread : * mut aws_thread , func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , options : * const aws_thread_options) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Gets the id of thread"] pub fn aws_thread_get_id (thread : * mut aws_thread) -> aws_thread_id_t ; } extern "C" { # [doc = " Gets the detach state of the thread. For example, is it safe to call join on"] # [doc = " this thread? Has it been detached()?"] pub fn aws_thread_get_detach_state (thread : * mut aws_thread) -> aws_thread_detach_state ; } extern "C" { # [doc = " Joins the calling thread to a thread instance. Returns when thread is"] # [doc = " finished.  Calling this from the associated OS thread will cause a deadlock."] pub fn aws_thread_join (thread : * mut aws_thread) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Blocking call that waits for all managed threads to complete their join call.  This can only be called"] # [doc = " from the main thread or a non-managed thread."] # [doc = ""] # [doc = " This gets called automatically from library cleanup."] # [doc = ""] # [doc = " By default the wait is unbounded, but that default can be overridden via aws_thread_set_managed_join_timeout_ns()"] pub fn aws_thread_join_all_managed () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Overrides how long, in nanoseconds, that aws_thread_join_all_managed will wait for threads to complete."] # [doc = " A value of zero will result in an unbounded wait."] pub fn aws_thread_set_managed_join_timeout_ns (timeout_in_ns : u64) ; } extern "C" { # [doc = " Cleans up the thread handle. Don't call this on a managed thread.  If you wish to join the thread, you must join"] # [doc = " before calling this function."] pub fn aws_thread_clean_up (thread : * mut aws_thread) ; } extern "C" { # [doc = " Returns the thread id of the calling thread."] pub fn aws_thread_current_thread_id () -> aws_thread_id_t ; } extern "C" { # [doc = " Compare thread ids."] pub fn aws_thread_thread_id_equal (t1 : aws_thread_id_t , t2 : aws_thread_id_t) -> bool ; } extern "C" { # [doc = " Sleeps the current thread by nanos."] pub fn aws_thread_current_sleep (nanos : u64) ; } pub type aws_thread_atexit_fn = :: std :: option :: Option < unsafe extern "C" fn (user_data : * mut :: std :: os :: raw :: c_void) > ; extern "C" { # [doc = " Adds a callback to the chain to be called when the current thread joins."] # [doc = " Callbacks are called from the current thread, in the reverse order they"] # [doc = " were added, after the thread function returns."] # [doc = " If not called from within an aws_thread, has no effect."] pub fn aws_thread_current_at_exit (callback : aws_thread_atexit_fn , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Increments the count of unjoined threads in the managed thread system.  Used by managed threads and"] # [doc = " event loop threads.  Additional usage requires the user to join corresponding threads themselves and"] # [doc = " correctly increment/decrement even in the face of launch/join errors."] # [doc = ""] # [doc = " aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_increment_unjoined_count () ; } extern "C" { # [doc = " Decrements the count of unjoined threads in the managed thread system.  Used by managed threads and"] # [doc = " event loop threads.  Additional usage requires the user to join corresponding threads themselves and"] # [doc = " correctly increment/decrement even in the face of launch/join errors."] # [doc = ""] # [doc = " aws_thread_join_all_managed() will not return until this count has gone to zero."] pub fn aws_thread_decrement_unjoined_count () ; } pub const aws_log_level_AWS_LL_NONE : aws_log_level = 0 ; pub const aws_log_level_AWS_LL_FATAL : aws_log_level = 1 ; pub const aws_log_level_AWS_LL_ERROR : aws_log_level = 2 ; pub const aws_log_level_AWS_LL_WARN : aws_log_level = 3 ; pub const aws_log_level_AWS_LL_INFO : aws_log_level = 4 ; pub const aws_log_level_AWS_LL_DEBUG : aws_log_level = 5 ; pub const aws_log_level_AWS_LL_TRACE : aws_log_level = 6 ; pub const aws_log_level_AWS_LL_COUNT : aws_log_level = 7 ; # [doc = " Controls what log calls pass through the logger and what log calls get filtered out."] # [doc = " If a log level has a value of X, then all log calls using a level <= X will appear, while"] # [doc = " those using a value > X will not occur."] # [doc = ""] # [doc = " You can filter both dynamically (by setting the log level on the logger object) or statically"] # [doc = " (by defining AWS_STATIC_LOG_LEVEL to be an appropriate integer module-wide).  Statically filtered"] # [doc = " log calls will be completely compiled out but require a rebuild if you want to get more detail"] # [doc = " about what's happening."] pub type aws_log_level = :: std :: os :: raw :: c_uint ; # [doc = " Log subject is a way of designating the topic of logging."] # [doc = ""] # [doc = " The general idea is to support a finer-grained approach to log level control.  The primary use case"] # [doc = " is for situations that require more detailed logging within a specific domain, where enabling that detail"] # [doc = " globally leads to an untenable flood of information."] # [doc = ""] # [doc = " For example, enable TRACE logging for tls-related log statements (handshake binary payloads), but"] # [doc = " only WARN logging everywhere else (because http payloads would blow up the log files)."] # [doc = ""] # [doc = " Log subject is an enum similar to aws error: each library has its own value-space and someone is"] # [doc = " responsible for registering the value <-> string connections."] pub type aws_log_subject_t = u32 ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_log_subject_info { pub subject_id : aws_log_subject_t , pub subject_name : * const :: std :: os :: raw :: c_char , pub subject_description : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_aws_log_subject_info () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_subject_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_subject_info > () , 24usize , concat ! ("Size of: " , stringify ! (aws_log_subject_info))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_subject_info > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_subject_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . subject_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_subject_info) , "::" , stringify ! (subject_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . subject_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_subject_info) , "::" , stringify ! (subject_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . subject_description) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_log_subject_info) , "::" , stringify ! (subject_description))) ; } impl Default for aws_log_subject_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_log_subject_info_list { pub subject_list : * mut aws_log_subject_info , pub count : usize , } # [test] fn bindgen_test_layout_aws_log_subject_info_list () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_subject_info_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_subject_info_list > () , 16usize , concat ! ("Size of: " , stringify ! (aws_log_subject_info_list))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_subject_info_list > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_subject_info_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . subject_list) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_subject_info_list) , "::" , stringify ! (subject_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . count) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_subject_info_list) , "::" , stringify ! (count))) ; } impl Default for aws_log_subject_info_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const aws_common_log_subject_AWS_LS_COMMON_GENERAL : aws_common_log_subject = 0 ; pub const aws_common_log_subject_AWS_LS_COMMON_TASK_SCHEDULER : aws_common_log_subject = 1 ; pub const aws_common_log_subject_AWS_LS_COMMON_THREAD : aws_common_log_subject = 2 ; pub const aws_common_log_subject_AWS_LS_COMMON_MEMTRACE : aws_common_log_subject = 3 ; pub const aws_common_log_subject_AWS_LS_COMMON_XML_PARSER : aws_common_log_subject = 4 ; pub const aws_common_log_subject_AWS_LS_COMMON_IO : aws_common_log_subject = 5 ; pub const aws_common_log_subject_AWS_LS_COMMON_BUS : aws_common_log_subject = 6 ; pub const aws_common_log_subject_AWS_LS_COMMON_TEST : aws_common_log_subject = 7 ; pub const aws_common_log_subject_AWS_LS_COMMON_JSON_PARSER : aws_common_log_subject = 8 ; pub const aws_common_log_subject_AWS_LS_COMMON_LAST : aws_common_log_subject = 1023 ; pub type aws_common_log_subject = :: std :: os :: raw :: c_uint ; # [doc = " We separate the log level function from the log call itself so that we can do the filter check in the macros (see"] # [doc = " below)"] # [doc = ""] # [doc = " By doing so, we make it so that the variadic format arguments are not even evaluated if the filter check does not"] # [doc = " succeed."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_logger_vtable { pub log : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger , log_level : aws_log_level , subject : aws_log_subject_t , format : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_int > , pub get_log_level : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger , subject : aws_log_subject_t) -> aws_log_level > , pub clean_up : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger) > , pub set_log_level : :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_logger , arg1 : aws_log_level) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_aws_logger_vtable () { const UNINIT : :: std :: mem :: MaybeUninit < aws_logger_vtable > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_logger_vtable > () , 32usize , concat ! ("Size of: " , stringify ! (aws_logger_vtable))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_logger_vtable > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_logger_vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . log) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_logger_vtable) , "::" , stringify ! (log))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_log_level) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_logger_vtable) , "::" , stringify ! (get_log_level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . clean_up) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_logger_vtable) , "::" , stringify ! (clean_up))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . set_log_level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_logger_vtable) , "::" , stringify ! (set_log_level))) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_logger { pub vtable : * mut aws_logger_vtable , pub allocator : * mut aws_allocator , pub p_impl : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_logger () { const UNINIT : :: std :: mem :: MaybeUninit < aws_logger > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_logger > () , 24usize , concat ! ("Size of: " , stringify ! (aws_logger))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_logger > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_logger))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . vtable) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_logger) , "::" , stringify ! (vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_logger) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . p_impl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_logger) , "::" , stringify ! (p_impl))) ; } impl Default for aws_logger { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_logger_pipeline { pub formatter : * mut aws_log_formatter , pub channel : * mut aws_log_channel , pub writer : * mut aws_log_writer , pub allocator : * mut aws_allocator , pub level : aws_atomic_var , } # [test] fn bindgen_test_layout_aws_logger_pipeline () { const UNINIT : :: std :: mem :: MaybeUninit < aws_logger_pipeline > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_logger_pipeline > () , 40usize , concat ! ("Size of: " , stringify ! (aws_logger_pipeline))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_logger_pipeline > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_logger_pipeline))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . formatter) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_logger_pipeline) , "::" , stringify ! (formatter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . channel) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_logger_pipeline) , "::" , stringify ! (channel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . writer) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_logger_pipeline) , "::" , stringify ! (writer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_logger_pipeline) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_logger_pipeline) , "::" , stringify ! (level))) ; } impl Default for aws_logger_pipeline { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Options for aws_logger_init_standard()."] # [doc = " Set `filename` to open a file for logging and close it when the logger cleans up."] # [doc = " Set `file` to use a file that is already open, such as `stderr` or `stdout`."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_logger_standard_options { pub level : aws_log_level , pub filename : * const :: std :: os :: raw :: c_char , pub file : * mut FILE , } # [test] fn bindgen_test_layout_aws_logger_standard_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_logger_standard_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_logger_standard_options > () , 24usize , concat ! ("Size of: " , stringify ! (aws_logger_standard_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_logger_standard_options > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_logger_standard_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_logger_standard_options) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_logger_standard_options) , "::" , stringify ! (filename))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_logger_standard_options) , "::" , stringify ! (file))) ; } impl Default for aws_logger_standard_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Sets the aws logger used globally across the process.  Not thread-safe.  Must only be called once."] pub fn aws_logger_set (logger : * mut aws_logger) ; } extern "C" { # [doc = " Gets the aws logger used globally across the process."] pub fn aws_logger_get () -> * mut aws_logger ; } extern "C" { # [doc = " Gets the aws logger used globally across the process if the logging level is at least the inputted level."] # [doc = ""] # [doc = " @param subject log subject to perform the level check versus, not currently used"] # [doc = " @param level logging level to check against in order to return the logger"] # [doc = " @return the current logger if the current logging level is at or more detailed then the supplied logging level"] pub fn aws_logger_get_conditional (subject : aws_log_subject_t , level : aws_log_level) -> * mut aws_logger ; } extern "C" { # [doc = " Cleans up all resources used by the logger; simply invokes the clean_up v-function"] pub fn aws_logger_clean_up (logger : * mut aws_logger) ; } extern "C" { # [doc = " Sets the current logging level for the logger.  Loggers are not require to support this."] # [doc = " @param logger logger to set the log level for"] # [doc = " @param level new log level for the logger"] # [doc = " @return AWS_OP_SUCCESS if the level was successfully set, AWS_OP_ERR otherwise"] pub fn aws_logger_set_log_level (logger : * mut aws_logger , level : aws_log_level) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Converts a log level to a c-string constant.  Intended primarily to support building log lines that"] # [doc = " include the level in them, i.e."] # [doc = ""] # [doc = " [ERROR] 10:34:54.642 01-31-19 - Json parse error...."] pub fn aws_log_level_to_string (log_level : aws_log_level , level_string : * mut * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Converts a c-string constant to a log level value.  Uses case-insensitive comparison"] # [doc = " and simply iterates all possibilities until a match or nothing remains.  If no match"] # [doc = " is found, AWS_OP_ERR is returned."] pub fn aws_string_to_log_level (level_string : * const :: std :: os :: raw :: c_char , log_level : * mut aws_log_level) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Converts an aws_thread_id_t to a c-string.  For portability, aws_thread_id_t"] # [doc = " must not be printed directly.  Intended primarily to support building log"] # [doc = " lines that include the thread id in them.  The parameter `buffer` must"] # [doc = " point-to a char buffer of length `bufsz == AWS_THREAD_ID_T_REPR_BUFSZ`.  The"] # [doc = " thread id representation is returned in `buffer`."] pub fn aws_thread_id_t_to_string (thread_id : aws_thread_id_t , buffer : * mut :: std :: os :: raw :: c_char , bufsz : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get subject name from log subject."] pub fn aws_log_subject_name (subject : aws_log_subject_t) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Connects log subject strings with log subject integer values"] pub fn aws_register_log_subject_info_list (log_subject_list : * mut aws_log_subject_info_list) ; } extern "C" { # [doc = " Disconnects log subject strings with log subject integer values"] pub fn aws_unregister_log_subject_info_list (log_subject_list : * mut aws_log_subject_info_list) ; } extern "C" { pub fn aws_logger_init_standard (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_logger_init_from_external (logger : * mut aws_logger , allocator : * mut aws_allocator , formatter : * mut aws_log_formatter , channel : * mut aws_log_channel , writer : * mut aws_log_writer , level : aws_log_level) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_logger_init_noalloc (logger : * mut aws_logger , allocator : * mut aws_allocator , options : * mut aws_logger_standard_options) -> :: std :: os :: raw :: c_int ; } pub type aws_log_formatter_format_fn<__va_list_tag> = :: std :: option :: Option < unsafe extern "C" fn (formatter : * mut aws_log_formatter , formatted_output : * mut * mut aws_string , level : aws_log_level , subject : aws_log_subject_t , format : * const :: std :: os :: raw :: c_char , args : * mut __va_list_tag) -> :: std :: os :: raw :: c_int > ; pub type aws_log_formatter_clean_up_fn = :: std :: option :: Option < unsafe extern "C" fn (logger : * mut aws_log_formatter) > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_log_formatter_vtable { pub format : aws_log_formatter_format_fn , pub clean_up : aws_log_formatter_clean_up_fn , } # [test] fn bindgen_test_layout_aws_log_formatter_vtable () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_formatter_vtable > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_formatter_vtable > () , 16usize , concat ! ("Size of: " , stringify ! (aws_log_formatter_vtable))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_formatter_vtable > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_formatter_vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . format) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_formatter_vtable) , "::" , stringify ! (format))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . clean_up) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_formatter_vtable) , "::" , stringify ! (clean_up))) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_log_formatter { pub vtable : * mut aws_log_formatter_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_log_formatter () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_formatter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_formatter > () , 24usize , concat ! ("Size of: " , stringify ! (aws_log_formatter))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_formatter > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_formatter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . vtable) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_formatter) , "::" , stringify ! (vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_formatter) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . impl_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_log_formatter) , "::" , stringify ! (impl_))) ; } impl Default for aws_log_formatter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_log_formatter_standard_options { pub date_format : aws_date_format , } # [test] fn bindgen_test_layout_aws_log_formatter_standard_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_formatter_standard_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_formatter_standard_options > () , 4usize , concat ! ("Size of: " , stringify ! (aws_log_formatter_standard_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_formatter_standard_options > () , 4usize , concat ! ("Alignment of " , stringify ! (aws_log_formatter_standard_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date_format) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_formatter_standard_options) , "::" , stringify ! (date_format))) ; } impl Default for aws_log_formatter_standard_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_logging_standard_formatting_data { pub log_line_buffer : * mut :: std :: os :: raw :: c_char , pub total_length : usize , pub level : aws_log_level , pub subject_name : * const :: std :: os :: raw :: c_char , pub format : * const :: std :: os :: raw :: c_char , pub date_format : aws_date_format , pub allocator : * mut aws_allocator , pub amount_written : usize , } # [test] fn bindgen_test_layout_aws_logging_standard_formatting_data () { const UNINIT : :: std :: mem :: MaybeUninit < aws_logging_standard_formatting_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_logging_standard_formatting_data > () , 64usize , concat ! ("Size of: " , stringify ! (aws_logging_standard_formatting_data))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_logging_standard_formatting_data > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_logging_standard_formatting_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . log_line_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_logging_standard_formatting_data) , "::" , stringify ! (log_line_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_length) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_logging_standard_formatting_data) , "::" , stringify ! (total_length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_logging_standard_formatting_data) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . subject_name) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_logging_standard_formatting_data) , "::" , stringify ! (subject_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . format) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_logging_standard_formatting_data) , "::" , stringify ! (format))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date_format) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (aws_logging_standard_formatting_data) , "::" , stringify ! (date_format))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (aws_logging_standard_formatting_data) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . amount_written) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (aws_logging_standard_formatting_data) , "::" , stringify ! (amount_written))) ; } impl Default for aws_logging_standard_formatting_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn aws_log_formatter_init_default (formatter : * mut aws_log_formatter , allocator : * mut aws_allocator , options : * mut aws_log_formatter_standard_options) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_log_formatter_clean_up (formatter : * mut aws_log_formatter) ; } extern "C" { pub fn aws_format_standard_log_line (formatting_data : * mut aws_logging_standard_formatting_data , args : * mut __va_list_tag) -> :: std :: os :: raw :: c_int ; } pub const aws_cli_options_has_arg_AWS_CLI_OPTIONS_NO_ARGUMENT : aws_cli_options_has_arg = 0 ; pub const aws_cli_options_has_arg_AWS_CLI_OPTIONS_REQUIRED_ARGUMENT : aws_cli_options_has_arg = 1 ; pub const aws_cli_options_has_arg_AWS_CLI_OPTIONS_OPTIONAL_ARGUMENT : aws_cli_options_has_arg = 2 ; pub type aws_cli_options_has_arg = :: std :: os :: raw :: c_uint ; # [doc = " Invoked when a subcommand is encountered. argc and argv[] begins at the command encounterd."] # [doc = " command_name is the name of the command being handled."] pub type aws_cli_options_subcommand_fn = :: std :: option :: Option < unsafe extern "C" fn (argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , command_name : * const :: std :: os :: raw :: c_char , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = " Dispatch table to dispatch cli commands from."] # [doc = " command_name should be the exact string for the command you want to handle from the command line."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_cli_subcommand_dispatch { pub subcommand_fn : aws_cli_options_subcommand_fn , pub command_name : * const :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_aws_cli_subcommand_dispatch () { const UNINIT : :: std :: mem :: MaybeUninit < aws_cli_subcommand_dispatch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_cli_subcommand_dispatch > () , 16usize , concat ! ("Size of: " , stringify ! (aws_cli_subcommand_dispatch))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_cli_subcommand_dispatch > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_cli_subcommand_dispatch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . subcommand_fn) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_cli_subcommand_dispatch) , "::" , stringify ! (subcommand_fn))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . command_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_cli_subcommand_dispatch) , "::" , stringify ! (command_name))) ; } impl Default for aws_cli_subcommand_dispatch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_cli_option { pub name : * const :: std :: os :: raw :: c_char , pub has_arg : aws_cli_options_has_arg , pub flag : * mut :: std :: os :: raw :: c_int , pub val : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_aws_cli_option () { const UNINIT : :: std :: mem :: MaybeUninit < aws_cli_option > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_cli_option > () , 32usize , concat ! ("Size of: " , stringify ! (aws_cli_option))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_cli_option > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_cli_option))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_cli_option) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_arg) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_cli_option) , "::" , stringify ! (has_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flag) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_cli_option) , "::" , stringify ! (flag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . val) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_cli_option) , "::" , stringify ! (val))) ; } impl Default for aws_cli_option { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Initialized to 1 (for where the first argument would be). As arguments are parsed, this number is the index"] # [doc = " of the next argument to parse. Reset this to 1 to parse another set of arguments, or to rerun the parser."] pub static mut aws_cli_optind : :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " If an option has an argument, when the option is encountered, this will be set to the argument portion."] pub static mut aws_cli_optarg : * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " If 0x02 was returned by aws_cli_getopt_long(), this value will be set to the argument encountered."] pub static mut aws_cli_positional_arg : * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " A mostly compliant implementation of posix getopt_long(). Parses command-line arguments. argc is the number of"] # [doc = " command line arguments passed in argv. optstring contains the legitimate option characters. The option characters"] # [doc = " coorespond to aws_cli_option::val. If the character is followed by a :, the option requires an argument. If it is"] # [doc = " followed by '::', the argument is optional (not implemented yet)."] # [doc = ""] # [doc = "  longopts, is an array of struct aws_cli_option. These are the allowed options for the program."] # [doc = "  The last member of the array must be zero initialized."] # [doc = ""] # [doc = "  If longindex is non-null, it will be set to the index in longopts, for the found option."] # [doc = ""] # [doc = "  Returns option val if it was found, '?' if an option was encountered that was not specified in the option string,"] # [doc = " 0x02 (START_OF_TEXT) will be returned if a positional argument was encountered. returns -1 when all arguments that"] # [doc = " can be parsed have been parsed."] pub fn aws_cli_getopt_long (argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , optstring : * const :: std :: os :: raw :: c_char , longopts : * const aws_cli_option , longindex : * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Resets global parser state for use in another parser run for the application."] pub fn aws_cli_reset_state () ; } extern "C" { # [doc = " Dispatches the current command line arguments with a subcommand from the second input argument in argv[], if"] # [doc = " dispatch table contains a command that matches the argument. When the command is dispatched, argc and argv will be"] # [doc = " updated to reflect the new argument count. The cli options are required to come after the subcommand. If either, no"] # [doc = " dispatch was found or there was no argument passed to the program, this function will return AWS_OP_ERR. Check"] # [doc = " aws_last_error() for details on the error."] # [doc = " @param argc number of arguments passed to int main()"] # [doc = " @param argv the arguments passed to int main()"] # [doc = " @param parse_cb, optional, specify NULL if you don't want to handle this. This argument is for parsing \"meta\""] # [doc = " commands from the command line options prior to dispatch occurring."] # [doc = " @param dispatch_table table containing functions and command name to dispatch on."] # [doc = " @param table_length numnber of entries in dispatch_table."] # [doc = " @return AWS_OP_SUCCESS(0) on success, AWS_OP_ERR(-1) on failure"] pub fn aws_cli_dispatch_on_subcommand (argc : :: std :: os :: raw :: c_int , argv : * const * mut :: std :: os :: raw :: c_char , dispatch_table : * mut aws_cli_subcommand_dispatch , table_length : :: std :: os :: raw :: c_int , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [repr (C)] pub struct aws_rw_lock { pub lock_handle : pthread_rwlock_t , } # [test] fn bindgen_test_layout_aws_rw_lock () { const UNINIT : :: std :: mem :: MaybeUninit < aws_rw_lock > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_rw_lock > () , 56usize , concat ! ("Size of: " , stringify ! (aws_rw_lock))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_rw_lock > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_rw_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . lock_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_rw_lock) , "::" , stringify ! (lock_handle))) ; } impl Default for aws_rw_lock { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Initializes a new platform instance of mutex."] pub fn aws_rw_lock_init (lock : * mut aws_rw_lock) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cleans up internal resources."] pub fn aws_rw_lock_clean_up (lock : * mut aws_rw_lock) ; } extern "C" { # [doc = " Blocks until it acquires the lock. While on some platforms such as Windows,"] # [doc = " this may behave as a reentrant mutex, you should not treat it like one. On"] # [doc = " platforms it is possible for it to be non-reentrant, it will be."] pub fn aws_rw_lock_rlock (lock : * mut aws_rw_lock) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_rw_lock_wlock (lock : * mut aws_rw_lock) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Attempts to acquire the lock but returns immediately if it can not."] # [doc = " While on some platforms such as Windows, this may behave as a reentrant mutex,"] # [doc = " you should not treat it like one. On platforms it is possible for it to be non-reentrant, it will be."] # [doc = " Note: For windows, minimum support server version is Windows Server 2008 R2 [desktop apps | UWP apps]"] pub fn aws_rw_lock_try_rlock (lock : * mut aws_rw_lock) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_rw_lock_try_wlock (lock : * mut aws_rw_lock) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Releases the lock."] pub fn aws_rw_lock_runlock (lock : * mut aws_rw_lock) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_rw_lock_wunlock (lock : * mut aws_rw_lock) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_get_environment_value (allocator : * mut aws_allocator , variable_name : * const aws_string , value_out : * mut * mut aws_string) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_set_environment_value (variable_name : * const aws_string , value : * const aws_string) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_unset_environment_value (variable_name : * const aws_string) -> :: std :: os :: raw :: c_int ; } pub const aws_platform_os_AWS_PLATFORM_OS_WINDOWS : aws_platform_os = 0 ; pub const aws_platform_os_AWS_PLATFORM_OS_MAC : aws_platform_os = 1 ; pub const aws_platform_os_AWS_PLATFORM_OS_UNIX : aws_platform_os = 2 ; pub type aws_platform_os = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_cpu_info { pub cpu_id : i32 , pub suspected_hyper_thread : bool , } # [test] fn bindgen_test_layout_aws_cpu_info () { const UNINIT : :: std :: mem :: MaybeUninit < aws_cpu_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_cpu_info > () , 8usize , concat ! ("Size of: " , stringify ! (aws_cpu_info))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_cpu_info > () , 4usize , concat ! ("Alignment of " , stringify ! (aws_cpu_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_cpu_info) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . suspected_hyper_thread) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (aws_cpu_info) , "::" , stringify ! (suspected_hyper_thread))) ; } extern "C" { pub fn aws_get_platform_build_os () -> aws_platform_os ; } extern "C" { pub fn aws_system_info_processor_count () -> usize ; } extern "C" { # [doc = " Returns the logical processor groupings on the system (such as multiple numa nodes)."] pub fn aws_get_cpu_group_count () -> u16 ; } extern "C" { # [doc = " For a group, returns the number of CPUs it contains."] pub fn aws_get_cpu_count_for_group (group_idx : u16) -> usize ; } extern "C" { # [doc = " Fills in cpu_ids_array with the cpu_id's for the group. To obtain the size to allocate for cpu_ids_array"] # [doc = " and the value for argument for cpu_ids_array_length, call aws_get_cpu_count_for_group()."] pub fn aws_get_cpu_ids_for_group (group_idx : u16 , cpu_ids_array : * mut aws_cpu_info , cpu_ids_array_length : usize) ; } extern "C" { pub fn aws_is_debugger_present () -> bool ; } extern "C" { pub fn aws_debug_break () ; } extern "C" { pub fn aws_backtrace (stack_frames : * mut * mut :: std :: os :: raw :: c_void , num_frames : usize) -> usize ; } extern "C" { pub fn aws_backtrace_symbols (stack_frames : * const * mut :: std :: os :: raw :: c_void , stack_depth : usize) -> * mut * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn aws_backtrace_addr2line (stack_frames : * const * mut :: std :: os :: raw :: c_void , stack_depth : usize) -> * mut * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Print a backtrace from either the current stack, or (if provided) the current exception/signal"] # [doc = "  call_site_data is siginfo_t* on POSIX, and LPEXCEPTION_POINTERS on Windows, and can be null"] pub fn aws_backtrace_print (fp : * mut FILE , call_site_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { pub fn aws_backtrace_log (log_level : :: std :: os :: raw :: c_int) ; } pub type aws_log_writer_write_fn = :: std :: option :: Option < unsafe extern "C" fn (writer : * mut aws_log_writer , output : * const aws_string) -> :: std :: os :: raw :: c_int > ; pub type aws_log_writer_clean_up_fn = :: std :: option :: Option < unsafe extern "C" fn (writer : * mut aws_log_writer) > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_log_writer_vtable { pub write : aws_log_writer_write_fn , pub clean_up : aws_log_writer_clean_up_fn , } # [test] fn bindgen_test_layout_aws_log_writer_vtable () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_writer_vtable > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_writer_vtable > () , 16usize , concat ! ("Size of: " , stringify ! (aws_log_writer_vtable))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_writer_vtable > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_writer_vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_writer_vtable) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . clean_up) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_writer_vtable) , "::" , stringify ! (clean_up))) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_log_writer { pub vtable : * mut aws_log_writer_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_log_writer () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_writer > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_writer > () , 24usize , concat ! ("Size of: " , stringify ! (aws_log_writer))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_writer > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_writer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . vtable) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_writer) , "::" , stringify ! (vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_writer) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . impl_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_log_writer) , "::" , stringify ! (impl_))) ; } impl Default for aws_log_writer { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_log_writer_file_options { pub filename : * const :: std :: os :: raw :: c_char , pub file : * mut FILE , } # [test] fn bindgen_test_layout_aws_log_writer_file_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_writer_file_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_writer_file_options > () , 16usize , concat ! ("Size of: " , stringify ! (aws_log_writer_file_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_writer_file_options > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_writer_file_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_writer_file_options) , "::" , stringify ! (filename))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_writer_file_options) , "::" , stringify ! (file))) ; } impl Default for aws_log_writer_file_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn aws_log_writer_init_stdout (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_log_writer_init_stderr (writer : * mut aws_log_writer , allocator : * mut aws_allocator) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_log_writer_init_file (writer : * mut aws_log_writer , allocator : * mut aws_allocator , options : * mut aws_log_writer_file_options) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_log_writer_clean_up (writer : * mut aws_log_writer) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_string { pub allocator : * mut aws_allocator , pub len : usize , pub bytes : [u8 ; 1usize] , } # [test] fn bindgen_test_layout_aws_string () { const UNINIT : :: std :: mem :: MaybeUninit < aws_string > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_string > () , 24usize , concat ! ("Size of: " , stringify ! (aws_string))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_string > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_string))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_string) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . len) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_string) , "::" , stringify ! (len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bytes) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_string) , "::" , stringify ! (bytes))) ; } impl Default for aws_string { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Returns true if bytes of string are the same, false otherwise."] pub fn aws_string_eq (a : * const aws_string , b : * const aws_string) -> bool ; } extern "C" { # [doc = " Returns true if bytes of string are equivalent, using a case-insensitive comparison."] pub fn aws_string_eq_ignore_case (a : * const aws_string , b : * const aws_string) -> bool ; } extern "C" { # [doc = " Returns true if bytes of string and cursor are the same, false otherwise."] pub fn aws_string_eq_byte_cursor (str_ : * const aws_string , cur : * const aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Returns true if bytes of string and cursor are equivalent, using a case-insensitive comparison."] pub fn aws_string_eq_byte_cursor_ignore_case (str_ : * const aws_string , cur : * const aws_byte_cursor) -> bool ; } extern "C" { # [doc = " Returns true if bytes of string and buffer are the same, false otherwise."] pub fn aws_string_eq_byte_buf (str_ : * const aws_string , buf : * const aws_byte_buf) -> bool ; } extern "C" { # [doc = " Returns true if bytes of string and buffer are equivalent, using a case-insensitive comparison."] pub fn aws_string_eq_byte_buf_ignore_case (str_ : * const aws_string , buf : * const aws_byte_buf) -> bool ; } extern "C" { pub fn aws_string_eq_c_str (str_ : * const aws_string , c_str : * const :: std :: os :: raw :: c_char) -> bool ; } extern "C" { # [doc = " Returns true if bytes of strings are equivalent, using a case-insensitive comparison."] pub fn aws_string_eq_c_str_ignore_case (str_ : * const aws_string , c_str : * const :: std :: os :: raw :: c_char) -> bool ; } extern "C" { # [doc = " Constructor functions which copy data from null-terminated C-string or array of bytes."] pub fn aws_string_new_from_c_str (allocator : * mut aws_allocator , c_str : * const :: std :: os :: raw :: c_char) -> * mut aws_string ; } extern "C" { # [doc = " Allocate a new string with the same contents as array."] pub fn aws_string_new_from_array (allocator : * mut aws_allocator , bytes : * const u8 , len : usize) -> * mut aws_string ; } extern "C" { # [doc = " Allocate a new string with the same contents as another string."] pub fn aws_string_new_from_string (allocator : * mut aws_allocator , str_ : * const aws_string) -> * mut aws_string ; } extern "C" { # [doc = " Allocate a new string with the same contents as cursor."] pub fn aws_string_new_from_cursor (allocator : * mut aws_allocator , cursor : * const aws_byte_cursor) -> * mut aws_string ; } extern "C" { # [doc = " Allocate a new string with the same contents as buf."] pub fn aws_string_new_from_buf (allocator : * mut aws_allocator , buf : * const aws_byte_buf) -> * mut aws_string ; } extern "C" { # [doc = " Deallocate string."] pub fn aws_string_destroy (str_ : * mut aws_string) ; } extern "C" { # [doc = " Zeroes out the data bytes of string and then deallocates the memory."] # [doc = " Not safe to run on a string created with AWS_STATIC_STRING_FROM_LITERAL."] pub fn aws_string_destroy_secure (str_ : * mut aws_string) ; } extern "C" { # [doc = " Compares lexicographical ordering of two strings. This is a binary"] # [doc = " byte-by-byte comparison, treating bytes as unsigned integers. It is suitable"] # [doc = " for either textual or binary data and is unaware of unicode or any other byte"] # [doc = " encoding. If both strings are identical in the bytes of the shorter string,"] # [doc = " then the longer string is lexicographically after the shorter."] # [doc = ""] # [doc = " Returns a positive number if string a > string b. (i.e., string a is"] # [doc = " lexicographically after string b.) Returns zero if string a = string b."] # [doc = " Returns negative number if string a < string b."] pub fn aws_string_compare (a : * const aws_string , b : * const aws_string) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " A convenience function for sorting lists of (const struct aws_string *) elements. This can be used as a"] # [doc = " comparator for aws_array_list_sort. It is just a simple wrapper around aws_string_compare."] pub fn aws_array_list_comparator_string (a : * const :: std :: os :: raw :: c_void , b : * const :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Copies all bytes from string to buf."] # [doc = ""] # [doc = " On success, returns true and updates the buf pointer/length"] # [doc = " accordingly. If there is insufficient space in the buf, returns"] # [doc = " false, leaving the buf unchanged."] pub fn aws_byte_buf_write_from_whole_string (buf : * mut aws_byte_buf , src : * const aws_string) -> bool ; } extern "C" { # [doc = " Creates an aws_byte_cursor from an existing string."] pub fn aws_byte_cursor_from_string (src : * const aws_string) -> aws_byte_cursor ; } extern "C" { # [doc = " If the string was dynamically allocated, clones it. If the string was statically allocated (i.e. has no allocator),"] # [doc = " returns the original string."] pub fn aws_string_clone_or_reuse (allocator : * mut aws_allocator , str_ : * const aws_string) -> * mut aws_string ; } extern "C" { # [doc = " Computes the length of a c string in bytes assuming the character set is either ASCII or UTF-8. If no NULL character"] # [doc = " is found within max_read_len of str, AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED is raised. Otherwise, str_len"] # [doc = " will contain the string length minus the NULL character, and AWS_OP_SUCCESS will be returned."] pub fn aws_secure_strlen (str_ : * const :: std :: os :: raw :: c_char , max_read_len : usize , str_len : * mut usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Initializes the last-in-first-out cache. Sets up the underlying linked hash table."] # [doc = " Once `max_items` elements have been added, the latest(last-in) item will"] # [doc = " be removed. For the other parameters, see aws/common/hash_table.h. Hash table"] # [doc = " semantics of these arguments are preserved."] pub fn aws_cache_new_lifo (allocator : * mut aws_allocator , hash_fn : aws_hash_fn , equals_fn : aws_hash_callback_eq_fn , destroy_key_fn : aws_hash_callback_destroy_fn , destroy_value_fn : aws_hash_callback_destroy_fn , max_items : usize) -> * mut aws_cache ; } pub type aws_crt_statistics_category_t = u32 ; pub const aws_crt_common_statistics_category_AWSCRT_STAT_CAT_INVALID : aws_crt_common_statistics_category = 0 ; # [doc = " The common-specific range of the aws_crt_statistics_category cross-library enum."] # [doc = ""] # [doc = " This enum functions as an RTTI value that lets statistics handler's interpret (via cast) a"] # [doc = " specific statistics structure if the RTTI value is understood."] # [doc = ""] # [doc = " Common doesn't have any statistics structures presently, so its range is essentially empty."] # [doc = ""] pub type aws_crt_common_statistics_category = :: std :: os :: raw :: c_uint ; # [doc = " Pattern-struct that functions as a base \"class\" for all statistics structures.  To conform"] # [doc = " to the pattern, a statistics structure must have its first member be the category.  In that"] # [doc = " case it becomes \"safe\" to cast from aws_crt_statistics_base to the specific statistics structure"] # [doc = " based on the category value."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_crt_statistics_base { pub category : aws_crt_statistics_category_t , } # [test] fn bindgen_test_layout_aws_crt_statistics_base () { const UNINIT : :: std :: mem :: MaybeUninit < aws_crt_statistics_base > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_crt_statistics_base > () , 4usize , concat ! ("Size of: " , stringify ! (aws_crt_statistics_base))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_crt_statistics_base > () , 4usize , concat ! ("Alignment of " , stringify ! (aws_crt_statistics_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . category) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_base) , "::" , stringify ! (category))) ; } # [doc = " The start and end time, in milliseconds-since-epoch, that a set of statistics was gathered over."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_crt_statistics_sample_interval { pub begin_time_ms : u64 , pub end_time_ms : u64 , } # [test] fn bindgen_test_layout_aws_crt_statistics_sample_interval () { const UNINIT : :: std :: mem :: MaybeUninit < aws_crt_statistics_sample_interval > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_crt_statistics_sample_interval > () , 16usize , concat ! ("Size of: " , stringify ! (aws_crt_statistics_sample_interval))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_crt_statistics_sample_interval > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_crt_statistics_sample_interval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_time_ms) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_sample_interval) , "::" , stringify ! (begin_time_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time_ms) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_sample_interval) , "::" , stringify ! (end_time_ms))) ; } pub type aws_crt_statistics_handler_process_statistics_fn = :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_crt_statistics_handler , interval : * mut aws_crt_statistics_sample_interval , stats : * mut aws_array_list , context : * mut :: std :: os :: raw :: c_void) > ; pub type aws_crt_statistics_handler_destroy_fn = :: std :: option :: Option < unsafe extern "C" fn (handler : * mut aws_crt_statistics_handler) > ; pub type aws_crt_statistics_handler_get_report_interval_ms_fn = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut aws_crt_statistics_handler) -> u64 > ; # [doc = " Vtable for functions that all statistics handlers must implement"] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_crt_statistics_handler_vtable { pub process_statistics : aws_crt_statistics_handler_process_statistics_fn , pub destroy : aws_crt_statistics_handler_destroy_fn , pub get_report_interval_ms : aws_crt_statistics_handler_get_report_interval_ms_fn , } # [test] fn bindgen_test_layout_aws_crt_statistics_handler_vtable () { const UNINIT : :: std :: mem :: MaybeUninit < aws_crt_statistics_handler_vtable > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_crt_statistics_handler_vtable > () , 24usize , concat ! ("Size of: " , stringify ! (aws_crt_statistics_handler_vtable))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_crt_statistics_handler_vtable > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_crt_statistics_handler_vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . process_statistics) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_handler_vtable) , "::" , stringify ! (process_statistics))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . destroy) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_handler_vtable) , "::" , stringify ! (destroy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_report_interval_ms) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_handler_vtable) , "::" , stringify ! (get_report_interval_ms))) ; } # [doc = " Base structure for all statistics handler implementations."] # [doc = ""] # [doc = " A statistics handler is an object that listens to a stream of polymorphic (via the category RTTI enum) statistics"] # [doc = " structures emitted from some arbitrary source.  In the initial implementation, statistics handlers are primarily"] # [doc = " attached to channels, where they monitor IO throughput and state data (from channel handlers) to determine a"] # [doc = " connection's health."] # [doc = ""] # [doc = " Statistics handlers are a generalization of the timeout and bandwidth filters that are often associated with"] # [doc = " SDK network connections.  Configurable, default implementations are defined at the protocol level (http, etc...)"] # [doc = " where they can be attached at connection (channel) creation time."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_crt_statistics_handler { pub vtable : * mut aws_crt_statistics_handler_vtable , pub allocator : * mut aws_allocator , pub impl_ : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_crt_statistics_handler () { const UNINIT : :: std :: mem :: MaybeUninit < aws_crt_statistics_handler > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_crt_statistics_handler > () , 24usize , concat ! ("Size of: " , stringify ! (aws_crt_statistics_handler))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_crt_statistics_handler > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_crt_statistics_handler))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . vtable) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_handler) , "::" , stringify ! (vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_handler) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . impl_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_crt_statistics_handler) , "::" , stringify ! (impl_))) ; } impl Default for aws_crt_statistics_handler { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Submits a list of statistics objects to a statistics handler for processing"] # [doc = ""] # [doc = " handler - the statistics handler that will process the statistics objects"] # [doc = " interval - time period over which the statistics were gathered"] # [doc = " stats - list of pointers to structures that can be case to aws_crt_statistics_base (i.e. have category as a first"] # [doc = "   member)"] # [doc = " context - (optional) additional context specific to where the statistics handler has been attached"] pub fn aws_crt_statistics_handler_process_statistics (handler : * mut aws_crt_statistics_handler , interval : * mut aws_crt_statistics_sample_interval , stats : * mut aws_array_list , context : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = " Queries the frequency (via an interval in milliseconds) which a statistics handler would like to be informed"] # [doc = " of statistics."] pub fn aws_crt_statistics_handler_get_report_interval_ms (handler : * mut aws_crt_statistics_handler) -> u64 ; } extern "C" { # [doc = " completely destroys a statistics handler.  The handler's cleanup function must clean up the impl portion completely"] # [doc = " (including its allocation, if done separately)."] pub fn aws_crt_statistics_handler_destroy (handler : * mut aws_crt_statistics_handler) ; } extern "C" { # [doc = " Initializes the Least-recently-used cache. Sets up the underlying linked hash table."] # [doc = " Once `max_items` elements have been added, the least recently used item will be removed. For the other parameters,"] # [doc = " see aws/common/hash_table.h. Hash table semantics of these arguments are preserved.(Yes the one that was the answer"] # [doc = " to that interview question that one time)."] pub fn aws_cache_new_lru (allocator : * mut aws_allocator , hash_fn : aws_hash_fn , equals_fn : aws_hash_callback_eq_fn , destroy_key_fn : aws_hash_callback_destroy_fn , destroy_value_fn : aws_hash_callback_destroy_fn , max_items : usize) -> * mut aws_cache ; } extern "C" { # [doc = " Accesses the least-recently-used element, sets it to most-recently-used"] # [doc = " element, and returns the value."] pub fn aws_lru_cache_use_lru_element (cache : * mut aws_cache) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Accesses the most-recently-used element and returns its value."] pub fn aws_lru_cache_get_mru_element (cache : * const aws_cache) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Get an unpredictably random 64bit number, suitable for cryptographic use."] pub fn aws_device_random_u64 (output : * mut u64) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get an unpredictably random 32bit number, suitable for cryptographic use."] pub fn aws_device_random_u32 (output : * mut u32) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get an unpredictably random 16bit number, suitable for cryptographic use."] pub fn aws_device_random_u16 (output : * mut u16) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get an unpredictably random 8bit number, suitable for cryptographic use."] pub fn aws_device_random_u8 (output : * mut u8) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Fill a buffer with unpredictably random bytes, suitable for cryptographic use."] pub fn aws_device_random_buffer (output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } pub const aws_cpu_feature_name_AWS_CPU_FEATURE_CLMUL : aws_cpu_feature_name = 0 ; pub const aws_cpu_feature_name_AWS_CPU_FEATURE_SSE_4_1 : aws_cpu_feature_name = 1 ; pub const aws_cpu_feature_name_AWS_CPU_FEATURE_SSE_4_2 : aws_cpu_feature_name = 2 ; pub const aws_cpu_feature_name_AWS_CPU_FEATURE_AVX2 : aws_cpu_feature_name = 3 ; pub const aws_cpu_feature_name_AWS_CPU_FEATURE_ARM_CRC : aws_cpu_feature_name = 4 ; pub const aws_cpu_feature_name_AWS_CPU_FEATURE_COUNT : aws_cpu_feature_name = 5 ; pub type aws_cpu_feature_name = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Returns true if a cpu feature is supported, false otherwise."] pub fn aws_cpu_has_feature (feature_name : aws_cpu_feature_name) -> bool ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_thread_scheduler { _unused : [u8 ; 0] , } extern "C" { # [doc = " Creates a new instance of a thread scheduler. This object receives scheduled tasks and executes them inside a"] # [doc = " background thread. On success, this function returns an instance with a ref-count of 1. On failure it returns NULL."] # [doc = ""] # [doc = " thread_options are optional."] # [doc = ""] # [doc = " The semantics of this interface conform to the semantics of aws_task_scheduler."] pub fn aws_thread_scheduler_new (allocator : * mut aws_allocator , thread_options : * const aws_thread_options) -> * mut aws_thread_scheduler ; } extern "C" { # [doc = " Acquire a reference to the scheduler."] pub fn aws_thread_scheduler_acquire (scheduler : * mut aws_thread_scheduler) ; } extern "C" { # [doc = " Release a reference to the scheduler."] pub fn aws_thread_scheduler_release (scheduler : * const aws_thread_scheduler) ; } extern "C" { # [doc = " Schedules a task to run in the future. time_to_run is the absolute time from the system hw_clock."] pub fn aws_thread_scheduler_schedule_future (scheduler : * mut aws_thread_scheduler , task : * mut aws_task , time_to_run : u64) ; } extern "C" { # [doc = " Schedules a task to run as soon as possible."] pub fn aws_thread_scheduler_schedule_now (scheduler : * mut aws_thread_scheduler , task : * mut aws_task) ; } extern "C" { # [doc = " Cancel a task that has been scheduled. The cancellation callback will be invoked in the background thread."] # [doc = " This function is slow, so please don't do it in the hot path for your code."] pub fn aws_thread_scheduler_cancel_task (scheduler : * mut aws_thread_scheduler , task : * mut aws_task) ; } # [repr (C)] pub struct aws_mutex { pub mutex_handle : pthread_mutex_t , pub initialized : bool , } # [test] fn bindgen_test_layout_aws_mutex () { const UNINIT : :: std :: mem :: MaybeUninit < aws_mutex > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_mutex > () , 48usize , concat ! ("Size of: " , stringify ! (aws_mutex))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_mutex > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_mutex))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mutex_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_mutex) , "::" , stringify ! (mutex_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . initialized) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (aws_mutex) , "::" , stringify ! (initialized))) ; } impl Default for aws_mutex { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Initializes a new platform instance of mutex."] pub fn aws_mutex_init (mutex : * mut aws_mutex) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cleans up internal resources."] pub fn aws_mutex_clean_up (mutex : * mut aws_mutex) ; } extern "C" { # [doc = " Blocks until it acquires the lock. While on some platforms such as Windows,"] # [doc = " this may behave as a reentrant mutex, you should not treat it like one. On"] # [doc = " platforms it is possible for it to be non-reentrant, it will be."] pub fn aws_mutex_lock (mutex : * mut aws_mutex) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Attempts to acquire the lock but returns immediately if it can not."] # [doc = " While on some platforms such as Windows, this may behave as a reentrant mutex,"] # [doc = " you should not treat it like one. On platforms it is possible for it to be non-reentrant, it will be."] # [doc = " Note: For windows, minimum support server version is Windows Server 2008 R2 [desktop apps | UWP apps]"] pub fn aws_mutex_try_lock (mutex : * mut aws_mutex) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Releases the lock."] pub fn aws_mutex_unlock (mutex : * mut aws_mutex) -> :: std :: os :: raw :: c_int ; } pub const aws_timestamp_unit_AWS_TIMESTAMP_SECS : aws_timestamp_unit = 1 ; pub const aws_timestamp_unit_AWS_TIMESTAMP_MILLIS : aws_timestamp_unit = 1000 ; pub const aws_timestamp_unit_AWS_TIMESTAMP_MICROS : aws_timestamp_unit = 1000000 ; pub const aws_timestamp_unit_AWS_TIMESTAMP_NANOS : aws_timestamp_unit = 1000000000 ; pub type aws_timestamp_unit = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = " Get ticks in nanoseconds (usually 100 nanosecond precision) on the high resolution clock (most-likely TSC). This"] # [doc = " clock has no bearing on the actual system time. On success, timestamp will be set."] pub fn aws_high_res_clock_get_ticks (timestamp : * mut u64) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Get ticks in nanoseconds (usually 100 nanosecond precision) on the system clock. Reflects actual system time via"] # [doc = " nanoseconds since unix epoch. Use with care since an inaccurately set clock will probably cause bugs. On success,"] # [doc = " timestamp will be set."] pub fn aws_sys_clock_get_ticks (timestamp : * mut u64) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_bus { _unused : [u8 ; 0] , } # [doc = " Messages will be delivered, even if dynamic allocation is required. Default."] pub const aws_bus_policy_AWS_BUS_ASYNC_RELIABLE : aws_bus_policy = 0 ; # [doc = " Only memory from the bus's internal buffer will be used (if a buffer size is supplied at bus creation time)."] # [doc = " If the buffer is full, older buffered messages will be discarded to make room for newer messages."] pub const aws_bus_policy_AWS_BUS_ASYNC_UNRELIABLE : aws_bus_policy = 1 ; # [doc = " Message delivery is immediate, and therefore reliable by definition"] pub const aws_bus_policy_AWS_BUS_SYNC_RELIABLE : aws_bus_policy = 2 ; pub type aws_bus_policy = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_bus_options { pub policy : aws_bus_policy , # [doc = " Size of buffer for unreliable message delivery queue."] # [doc = " Unused if policy is AWS_BUS_ASYNC_RELIABNLE or AWS_BUS_SYNC_RELIABLE"] # [doc = " Messages are 40 bytes. Default buffer_size is 4K. The bus will not allocate memory beyond this size."] pub buffer_size : usize , pub event_loop_group : * mut aws_event_loop_group , } # [test] fn bindgen_test_layout_aws_bus_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_bus_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_bus_options > () , 24usize , concat ! ("Size of: " , stringify ! (aws_bus_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_bus_options > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_bus_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_bus_options) , "::" , stringify ! (policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_bus_options) , "::" , stringify ! (buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . event_loop_group) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_bus_options) , "::" , stringify ! (event_loop_group))) ; } impl Default for aws_bus_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub type aws_bus_listener_fn = :: std :: option :: Option < unsafe extern "C" fn (address : u64 , payload : * const :: std :: os :: raw :: c_void , user_data : * mut :: std :: os :: raw :: c_void) > ; extern "C" { # [doc = " Allocates and initializes a message bus"] pub fn aws_bus_new (allocator : * mut aws_allocator , options : * const aws_bus_options) -> * mut aws_bus ; } extern "C" { # [doc = " Cleans up a message bus, including notifying all remaining listeners to close"] pub fn aws_bus_destroy (bus : * mut aws_bus) ; } extern "C" { # [doc = " Subscribes a listener to a message type. user_data's lifetime is the responsibility of the subscriber."] pub fn aws_bus_subscribe (bus : * mut aws_bus , address : u64 , listener : aws_bus_listener_fn , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Unsubscribe a listener from a specific message. This is only necessary if the listener has lifetime concerns."] # [doc = " Otherwise, the listener will be called with an address of AWS_BUS_ADDRESS_CLOSE, which indicates that user_data"] # [doc = " can be cleaned up if necessary and the listener will never be called again."] pub fn aws_bus_unsubscribe (bus : * mut aws_bus , address : u64 , listener : aws_bus_listener_fn , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = " Sends a message to any listeners. payload will live until delivered, and then the destructor (if"] # [doc = " provided) will be called. Note that anything payload references must also live at least until it is destroyed."] # [doc = " Will return AWS_OP_ERR if the bus is closing/has been closed"] pub fn aws_bus_send (bus : * mut aws_bus , address : u64 , payload : * mut :: std :: os :: raw :: c_void , destructor : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> :: std :: os :: raw :: c_int ; } pub type aws_simple_completion_callback = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_ref_count { pub ref_count : aws_atomic_var , pub object : * mut :: std :: os :: raw :: c_void , pub on_zero_fn : aws_simple_completion_callback , } # [test] fn bindgen_test_layout_aws_ref_count () { const UNINIT : :: std :: mem :: MaybeUninit < aws_ref_count > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_ref_count > () , 24usize , concat ! ("Size of: " , stringify ! (aws_ref_count))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_ref_count > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_ref_count))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ref_count) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_ref_count) , "::" , stringify ! (ref_count))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . object) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_ref_count) , "::" , stringify ! (object))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . on_zero_fn) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_ref_count) , "::" , stringify ! (on_zero_fn))) ; } impl Default for aws_ref_count { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_shutdown_callback_options { pub shutdown_callback_fn : aws_simple_completion_callback , pub shutdown_callback_user_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_shutdown_callback_options () { const UNINIT : :: std :: mem :: MaybeUninit < aws_shutdown_callback_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_shutdown_callback_options > () , 16usize , concat ! ("Size of: " , stringify ! (aws_shutdown_callback_options))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_shutdown_callback_options > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_shutdown_callback_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . shutdown_callback_fn) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_shutdown_callback_options) , "::" , stringify ! (shutdown_callback_fn))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . shutdown_callback_user_data) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_shutdown_callback_options) , "::" , stringify ! (shutdown_callback_user_data))) ; } impl Default for aws_shutdown_callback_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Initializes a ref-counter structure.  After initialization, the ref count will be 1."] # [doc = ""] # [doc = " @param ref_count ref-counter to initialize"] # [doc = " @param object object being ref counted"] # [doc = " @param on_zero_fn function to invoke when the ref count reaches zero"] pub fn aws_ref_count_init (ref_count : * mut aws_ref_count , object : * mut :: std :: os :: raw :: c_void , on_zero_fn : aws_simple_completion_callback) ; } extern "C" { # [doc = " Increments a ref-counter's ref count"] # [doc = ""] # [doc = " @param ref_count ref-counter to increment the count for"] # [doc = " @return the object being ref-counted"] pub fn aws_ref_count_acquire (ref_count : * mut aws_ref_count) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = " Decrements a ref-counter's ref count.  Invokes the on_zero callback if the ref count drops to zero"] # [doc = " @param ref_count ref-counter to decrement the count for"] # [doc = " @return the value of the decremented ref count"] pub fn aws_ref_count_release (ref_count : * mut aws_ref_count) -> usize ; } # [doc = " Lockless ring buffer implementation that is thread safe assuming a single thread acquires and a single thread"] # [doc = " releases. For any other use case (other than the single-threaded use-case), you must manage thread-safety manually."] # [doc = ""] # [doc = " Also, a very important note: release must happen in the same order as acquire. If you do not your application, and"] # [doc = " possibly computers within a thousand mile radius, may die terrible deaths, and the local drinking water will be"] # [doc = " poisoned for generations with fragments of what is left of your radioactive corrupted memory."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_ring_buffer { pub allocator : * mut aws_allocator , pub allocation : * mut u8 , pub head : aws_atomic_var , pub tail : aws_atomic_var , pub allocation_end : * mut u8 , } # [test] fn bindgen_test_layout_aws_ring_buffer () { const UNINIT : :: std :: mem :: MaybeUninit < aws_ring_buffer > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_ring_buffer > () , 40usize , concat ! ("Size of: " , stringify ! (aws_ring_buffer))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_ring_buffer > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_ring_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_ring_buffer) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_ring_buffer) , "::" , stringify ! (allocation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_ring_buffer) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_ring_buffer) , "::" , stringify ! (tail))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocation_end) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_ring_buffer) , "::" , stringify ! (allocation_end))) ; } impl Default for aws_ring_buffer { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Initializes a ring buffer with an allocation of size `size`. Returns AWS_OP_SUCCESS on a successful initialization,"] # [doc = " AWS_OP_ERR otherwise."] pub fn aws_ring_buffer_init (ring_buf : * mut aws_ring_buffer , allocator : * mut aws_allocator , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cleans up the ring buffer's resources."] pub fn aws_ring_buffer_clean_up (ring_buf : * mut aws_ring_buffer) ; } extern "C" { # [doc = " Attempts to acquire `requested_size` buffer and stores the result in `dest` if successful. Returns AWS_OP_SUCCESS if"] # [doc = " the requested size was available for use, AWS_OP_ERR otherwise."] pub fn aws_ring_buffer_acquire (ring_buf : * mut aws_ring_buffer , requested_size : usize , dest : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Attempts to acquire `requested_size` buffer and stores the result in `dest` if successful. If not available, it will"] # [doc = " attempt to acquire anywhere from 1 byte to `requested_size`. Returns AWS_OP_SUCCESS if some buffer space is available"] # [doc = " for use, AWS_OP_ERR otherwise."] pub fn aws_ring_buffer_acquire_up_to (ring_buf : * mut aws_ring_buffer , minimum_size : usize , requested_size : usize , dest : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Releases `buf` back to the ring buffer for further use. RELEASE MUST HAPPEN in the SAME ORDER AS ACQUIRE."] # [doc = " If you do not, your application, and possibly computers within a thousand mile radius, may die terrible deaths,"] # [doc = " and the local drinking water will be poisoned for generations"] # [doc = " with fragments of what is left of your radioactive corrupted memory."] pub fn aws_ring_buffer_release (ring_buffer : * mut aws_ring_buffer , buf : * mut aws_byte_buf) ; } extern "C" { # [doc = " Returns true if the memory in `buf` was vended by this ring buffer, false otherwise."] # [doc = " Make sure `buf->buffer` and `ring_buffer->allocation` refer to the same memory region."] pub fn aws_ring_buffer_buf_belongs_to_pool (ring_buffer : * const aws_ring_buffer , buf : * const aws_byte_buf) -> bool ; } extern "C" { # [doc = " Cleans up a ring buffer allocator instance. Does not clean up the ring buffer."] pub fn aws_ring_buffer_allocator_clean_up (allocator : * mut aws_allocator) ; } pub type aws_condition_predicate_fn = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> bool > ; # [repr (C)] pub struct aws_condition_variable { pub condition_handle : pthread_cond_t , pub initialized : bool , } # [test] fn bindgen_test_layout_aws_condition_variable () { const UNINIT : :: std :: mem :: MaybeUninit < aws_condition_variable > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_condition_variable > () , 56usize , concat ! ("Size of: " , stringify ! (aws_condition_variable))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_condition_variable > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_condition_variable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . condition_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_condition_variable) , "::" , stringify ! (condition_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . initialized) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (aws_condition_variable) , "::" , stringify ! (initialized))) ; } impl Default for aws_condition_variable { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = " Initializes a condition variable."] pub fn aws_condition_variable_init (condition_variable : * mut aws_condition_variable) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cleans up a condition variable."] pub fn aws_condition_variable_clean_up (condition_variable : * mut aws_condition_variable) ; } extern "C" { # [doc = " Notifies/Wakes one waiting thread"] pub fn aws_condition_variable_notify_one (condition_variable : * mut aws_condition_variable) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Notifies/Wakes all waiting threads."] pub fn aws_condition_variable_notify_all (condition_variable : * mut aws_condition_variable) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Waits the calling thread on a notification from another thread."] pub fn aws_condition_variable_wait (condition_variable : * mut aws_condition_variable , mutex : * mut aws_mutex) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Waits the calling thread on a notification from another thread. If predicate returns false, the wait is reentered,"] # [doc = " otherwise control returns to the caller."] pub fn aws_condition_variable_wait_pred (condition_variable : * mut aws_condition_variable , mutex : * mut aws_mutex , pred : aws_condition_predicate_fn , pred_ctx : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Waits the calling thread on a notification from another thread. Times out after time_to_wait. time_to_wait is in"] # [doc = " nanoseconds."] pub fn aws_condition_variable_wait_for (condition_variable : * mut aws_condition_variable , mutex : * mut aws_mutex , time_to_wait : i64) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Waits the calling thread on a notification from another thread. Times out after time_to_wait. time_to_wait is in"] # [doc = " nanoseconds. If predicate returns false, the wait is reentered, otherwise control returns to the caller."] pub fn aws_condition_variable_wait_for_pred (condition_variable : * mut aws_condition_variable , mutex : * mut aws_mutex , time_to_wait : i64 , pred : aws_condition_predicate_fn , pred_ctx : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct aws_directory_iterator { _unused : [u8 ; 0] , } pub const aws_file_type_AWS_FILE_TYPE_FILE : aws_file_type = 1 ; pub const aws_file_type_AWS_FILE_TYPE_SYM_LINK : aws_file_type = 2 ; pub const aws_file_type_AWS_FILE_TYPE_DIRECTORY : aws_file_type = 4 ; pub type aws_file_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_directory_entry { # [doc = " Absolute path to the entry from the current process root."] pub path : aws_byte_cursor , # [doc = " Path to the entry relative to the current working directory."] pub relative_path : aws_byte_cursor , # [doc = " Bit-field of enum aws_file_type"] pub file_type : :: std :: os :: raw :: c_int , # [doc = " Size of the file on disk."] pub file_size : i64 , } # [test] fn bindgen_test_layout_aws_directory_entry () { const UNINIT : :: std :: mem :: MaybeUninit < aws_directory_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_directory_entry > () , 48usize , concat ! ("Size of: " , stringify ! (aws_directory_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_directory_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_directory_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . path) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_directory_entry) , "::" , stringify ! (path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . relative_path) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_directory_entry) , "::" , stringify ! (relative_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_type) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (aws_directory_entry) , "::" , stringify ! (file_type))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_size) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (aws_directory_entry) , "::" , stringify ! (file_size))) ; } impl Default for aws_directory_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = " Invoked during calls to aws_directory_traverse() as an entry is encountered. entry will contain"] # [doc = " the parsed directory entry info."] # [doc = ""] # [doc = " Return true to continue the traversal, or alternatively, if you have a reason to abort the traversal, return false."] pub type aws_on_directory_entry = :: std :: option :: Option < unsafe extern "C" fn (entry : * const aws_directory_entry , user_data : * mut :: std :: os :: raw :: c_void) -> bool > ; extern "C" { # [doc = " Don't use this. It never should have been added in the first place. It's now deprecated."] pub fn aws_fopen (file_path : * const :: std :: os :: raw :: c_char , mode : * const :: std :: os :: raw :: c_char) -> * mut FILE ; } extern "C" { # [doc = " Opens file at file_path using mode. Returns the FILE pointer if successful."] pub fn aws_fopen_safe (file_path : * const aws_string , mode : * const aws_string) -> * mut FILE ; } extern "C" { # [doc = " Creates a directory if it doesn't currently exist. If the directory already exists, it's ignored and assumed"] # [doc = " successful."] # [doc = ""] # [doc = " Returns AWS_OP_SUCCESS on success. Otherwise, check aws_last_error()."] pub fn aws_directory_create (dir_path : * const aws_string) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Returns true if the directory currently exists. Otherwise, it returns false."] pub fn aws_directory_exists (dir_path : * const aws_string) -> bool ; } extern "C" { # [doc = " Deletes a directory. If the directory is not empty, this will fail unless the recursive parameter is set to true."] # [doc = " If recursive is true then the entire directory and all of its contents will be deleted. If it is set to false,"] # [doc = " the directory will be deleted only if it is empty. Returns AWS_OP_SUCCESS if the operation was successful. Otherwise,"] # [doc = " aws_last_error() will contain the error that occurred. If the directory doesn't exist, AWS_OP_SUCCESS is still"] # [doc = " returned."] pub fn aws_directory_delete (dir_path : * const aws_string , recursive : bool) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Deletes a file. Returns AWS_OP_SUCCESS if the operation was successful. Otherwise,"] # [doc = " aws_last_error() will contain the error that occurred. If the file doesn't exist, AWS_OP_SUCCESS is still returned."] pub fn aws_file_delete (file_path : * const aws_string) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Moves directory at from to to."] # [doc = " Returns AWS_OP_SUCCESS if the operation was successful. Otherwise,"] # [doc = " aws_last_error() will contain the error that occurred."] pub fn aws_directory_or_file_move (from : * const aws_string , to : * const aws_string) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Traverse a directory starting at path."] # [doc = ""] # [doc = " If you want the traversal to recurse the entire directory, pass recursive as true. Passing false for this parameter"] # [doc = " will only iterate the contents of the directory, but will not descend into any directories it encounters."] # [doc = ""] # [doc = " If recursive is set to true, the traversal is performed post-order, depth-first"] # [doc = " (for practical reasons such as deleting a directory that contains subdirectories or files)."] # [doc = ""] # [doc = " returns AWS_OP_SUCCESS(0) on success."] pub fn aws_directory_traverse (allocator : * mut aws_allocator , path : * const aws_string , recursive : bool , on_entry : aws_on_directory_entry , user_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Creates a read-only iterator of a directory starting at path. If path is invalid or there's any other error"] # [doc = " condition, NULL will be returned. Call aws_last_error() for the exact error in that case."] pub fn aws_directory_entry_iterator_new (allocator : * mut aws_allocator , path : * const aws_string) -> * mut aws_directory_iterator ; } extern "C" { # [doc = " Moves the iterator to the next entry. Returns AWS_OP_SUCCESS if another entry is available, or AWS_OP_ERR with"] # [doc = " AWS_ERROR_LIST_EMPTY as the value for aws_last_error() if no more entries are available."] pub fn aws_directory_entry_iterator_next (iterator : * mut aws_directory_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Moves the iterator to the previous entry. Returns AWS_OP_SUCCESS if another entry is available, or AWS_OP_ERR with"] # [doc = " AWS_ERROR_LIST_EMPTY as the value for aws_last_error() if no more entries are available."] pub fn aws_directory_entry_iterator_previous (iterator : * mut aws_directory_iterator) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Cleanup and deallocate iterator"] pub fn aws_directory_entry_iterator_destroy (iterator : * mut aws_directory_iterator) ; } extern "C" { # [doc = " Gets the aws_directory_entry value for iterator at the current position. Returns NULL if the iterator contains no"] # [doc = " entries."] pub fn aws_directory_entry_iterator_get_value (iterator : * const aws_directory_iterator) -> * const aws_directory_entry ; } extern "C" { # [doc = " Returns true iff the character is a directory separator on ANY supported platform."] pub fn aws_is_any_directory_separator (value : :: std :: os :: raw :: c_char) -> bool ; } extern "C" { # [doc = " Returns the directory separator used by the local platform"] pub fn aws_get_platform_directory_separator () -> :: std :: os :: raw :: c_char ; } extern "C" { # [doc = " Returns the current user's home directory."] pub fn aws_get_home_directory (allocator : * mut aws_allocator) -> * mut aws_string ; } extern "C" { # [doc = " Returns true if a file or path exists, otherwise, false."] pub fn aws_path_exists (path : * const aws_string) -> bool ; } extern "C" { pub fn aws_fseek (file : * mut FILE , offset : i64 , whence : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_file_get_length (file : * mut FILE , length : * mut i64) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_hex_compute_encoded_len (to_encode_len : usize , encoded_length : * mut usize) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_hex_encode (to_encode : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_hex_encode_append_dynamic (to_encode : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_hex_compute_decoded_len (to_decode_len : usize , decoded_len : * mut usize) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_hex_decode (to_decode : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_base64_compute_encoded_len (to_encode_len : usize , encoded_len : * mut usize) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_base64_encode (to_encode : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_base64_compute_decoded_len (to_decode : * const aws_byte_cursor , decoded_len : * mut usize) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_base64_decode (to_decode : * const aws_byte_cursor , output : * mut aws_byte_buf) -> :: std :: os :: raw :: c_int ; } pub const aws_text_encoding_AWS_TEXT_UNKNOWN : aws_text_encoding = 0 ; pub const aws_text_encoding_AWS_TEXT_UTF8 : aws_text_encoding = 1 ; pub const aws_text_encoding_AWS_TEXT_UTF16 : aws_text_encoding = 2 ; pub const aws_text_encoding_AWS_TEXT_UTF32 : aws_text_encoding = 3 ; pub const aws_text_encoding_AWS_TEXT_ASCII : aws_text_encoding = 4 ; pub type aws_text_encoding = :: std :: os :: raw :: c_uint ; pub type aws_log_channel_send_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_log_channel , output : * mut aws_string) -> :: std :: os :: raw :: c_int > ; pub type aws_log_channel_clean_up_fn = :: std :: option :: Option < unsafe extern "C" fn (channel : * mut aws_log_channel) > ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_log_channel_vtable { pub send : aws_log_channel_send_fn , pub clean_up : aws_log_channel_clean_up_fn , } # [test] fn bindgen_test_layout_aws_log_channel_vtable () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_channel_vtable > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_channel_vtable > () , 16usize , concat ! ("Size of: " , stringify ! (aws_log_channel_vtable))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_channel_vtable > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_channel_vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . send) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_channel_vtable) , "::" , stringify ! (send))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . clean_up) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_channel_vtable) , "::" , stringify ! (clean_up))) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq , Eq)] pub struct aws_log_channel { pub vtable : * mut aws_log_channel_vtable , pub allocator : * mut aws_allocator , pub writer : * mut aws_log_writer , pub impl_ : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_aws_log_channel () { const UNINIT : :: std :: mem :: MaybeUninit < aws_log_channel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < aws_log_channel > () , 32usize , concat ! ("Size of: " , stringify ! (aws_log_channel))) ; assert_eq ! (:: std :: mem :: align_of :: < aws_log_channel > () , 8usize , concat ! ("Alignment of " , stringify ! (aws_log_channel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . vtable) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (aws_log_channel) , "::" , stringify ! (vtable))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocator) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (aws_log_channel) , "::" , stringify ! (allocator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . writer) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (aws_log_channel) , "::" , stringify ! (writer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . impl_) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (aws_log_channel) , "::" , stringify ! (impl_))) ; } impl Default for aws_log_channel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn aws_log_channel_init_foreground (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_log_channel_init_background (channel : * mut aws_log_channel , allocator : * mut aws_allocator , writer : * mut aws_log_writer) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aws_log_channel_clean_up (channel : * mut aws_log_channel) ; } # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq , Eq)] pub struct aws_event_loop_group { pub _address : u8 , }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +++++++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `__va_list_tag` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/scratchstack-wrapper-aws-c-common-efacff6837635847/out/bindings.rs:3:216714
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...logging_standard_formatting_data , args : * mut __va_list_tag) -> :: std :: os :: raw :: c_int ; } pub const aws_cli_options_has_arg_A...
[INFO] [stdout]   |                                                    ^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: aborting due to 2 previous errors
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0412`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `scratchstack-wrapper-aws-c-common` due to 3 previous errors
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] running `Command { std: "docker" "inspect" "c8616ae7c85cf039ed8287f063744c77607f81f6bb02efede5df11a86cddeeff", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "c8616ae7c85cf039ed8287f063744c77607f81f6bb02efede5df11a86cddeeff", kill_on_drop: false }`
[INFO] [stdout] c8616ae7c85cf039ed8287f063744c77607f81f6bb02efede5df11a86cddeeff
